From: remi@georgianit.com
To: "Bernd Lentes" <bernd.lentes@helmholtz-muenchen.de>,
"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: rollback to a snapshot
Date: Wed, 07 Jun 2023 15:46:16 -0400 [thread overview]
Message-ID: <d708df28-a0fc-411b-97a0-7d2bea2f5f72@app.fastmail.com> (raw)
In-Reply-To: <PR3PR04MB7340CB95E5AB4FC10706604DD653A@PR3PR04MB7340.eurprd04.prod.outlook.com>
On Wed, Jun 7, 2023, at 3:37 PM, Bernd Lentes wrote:
> VM images are on host BTRFS and i create the snapshots from them on the host.
>
So there are a couple choices on how you want to restore.
You can make a new snapshot from your 'good' snapshot. This will roll back the entire subvolume.
mv /subvolume /subvolume-bad
btrfs sub snap /path-to-snapshot /subvolume
When you are confident that you want to delete the replaced subvolume
btrfs sub del /subvolume-bad
*Note*. you might want to first rename sobvolume-bad to something safe, like mv subvolume-bad deleteme; btrfs sub del deleteme
That way, is not not possible to accidentally hit <Enter> when you have btrfs sub del /subvolume on the command line.
Alternatively, you can just copy the disk image file from your snapshot into your active subvolume
cp -a --reflink=always /path-to-snapshot/vm.img /subvolume/vm.img
next prev parent reply other threads:[~2023-06-07 19:47 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-06 20:58 rollback to a snapshot Bernd Lentes
2023-06-06 23:20 ` Eldon
2023-06-07 4:36 ` Andrei Borzenkov
2023-06-07 10:38 ` Bernd Lentes
2023-06-07 11:51 ` Andrei Borzenkov
2023-06-07 20:08 ` Phillip Susi
2023-06-07 20:51 ` Bernd Lentes
2023-06-07 22:18 ` Nicholas D Steeves
2023-06-08 19:39 ` Bernd Lentes
2023-06-08 20:09 ` Bernd Lentes
2023-06-13 16:01 ` Bernd Lentes
2023-06-07 10:45 ` Bernd Lentes
2023-06-07 16:35 ` Andrei Borzenkov
2023-06-07 19:37 ` Bernd Lentes
2023-06-07 19:46 ` remi [this message]
2023-06-07 20:07 ` Bernd Lentes
2023-06-07 20:14 ` Bernd Lentes
2023-06-07 20:48 ` Roman Mamedov
2023-06-07 21:00 ` Bernd Lentes
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d708df28-a0fc-411b-97a0-7d2bea2f5f72@app.fastmail.com \
--to=remi@georgianit.com \
--cc=bernd.lentes@helmholtz-muenchen.de \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox