Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Eldon <btrfs@eldondev.com>
To: Bernd Lentes <bernd.lentes@helmholtz-muenchen.de>
Cc: "linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: rollback to a snapshot
Date: Tue, 6 Jun 2023 23:20:20 +0000	[thread overview]
Message-ID: <ZH+/NKVEk7Lc31mr@invalid> (raw)
In-Reply-To: <PR3PR04MB73400D4878EB0F8328B5D50BD652A@PR3PR04MB7340.eurprd04.prod.outlook.com>

On Tue, Jun 06, 2023 at 08:58:03PM +0000, Bernd Lentes wrote:
> Hi guys,
> 
> thanks for your help.
> 
> I have an Ubuntu box which I wanted to upgrade. Fortunately I made a snapshot before.
> The upgrade ran only partially and now I want to go back to my snapshot.
> I booted the system now with a recuse cd.
> This is my setup:
> 
> root@Microknoppix:/home/knoppix# mount|grep btrfs
> /dev/mapper/ubuntu--vg-ubuntu--lv on /mnt/btrfs type btrfs (rw,relatime,space_cache,subvolid=5,subvol=/)
> 
> root@Microknoppix:/home/knoppix# btrfs sub list /mnt/btrfs
> ID 430 gen 1215864 top level 5 path .snapshots
> ID 434 gen 1213568 top level 430 path .snapshots/06-06-2023--15:16_PRE_UPGRADE
> ID 435 gen 1216086 top level 430 path .snapshots/06-06-2023
> I want to go back to ID 434 or 435.

Hi Bernd,
I would generally agree that changing the default subvolume is the best
strategy to get the desired result. I would create a new writable
subvolume from the snapshot you want to use, in a reasonable place to
put it. I use my own idiosyncratic paths, but you can use whatever you
want. I would use a destination outside of the .snapshots directory,
maybe something like .live .
Then, do the btrfs subvolume set-default to that subvolume.

That's how I usually do my rollbacks, hope it helps with your situation.

Cheers,
Eldon

  reply	other threads:[~2023-06-06 23:28 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 [this message]
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
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=ZH+/NKVEk7Lc31mr@invalid \
    --to=btrfs@eldondev.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