08.02.2018 18:43, Nick Gilmour пишет: > On Thu, Feb 8, 2018 at 5:32 AM, Andrei Borzenkov <arvidj...@gmail.com> wrote: >> 08.02.2018 06:03, Chris Murphy пишет: >>> On Wed, Feb 7, 2018 at 6:26 PM, Nick Gilmour <nickefo...@gmail.com> wrote: >>>> Hi all, >>>> >>>> I have successfully restored a snapshot of root but now when I try to >> ... > >> How exactly was it done? > 1. # mount /dev/sde6 /mnt > 2. # cd /mnt > 3. # mv @ @_old > 4. # btrfs subvol snapshot /mnt/@_old/.snapshots/1594/snapshot /mnt/@ >
That's wrong for openSUSE. When you have installation with snapshots enabled, @ is dummy subvolume that never holds actual content. >> No, you should create subvolume @/.snapshots and mount it as /.snapshots >> (and have it in /etc/fstab). Snapshots should always be available in >> running system under fixed path and this only possible when it is >> mounted, otherwise after rollback /.snapshots will be lost just like it >> happened now. > > When I run this command I get an error: > # btrfs subvolume create @/.snapshots > ERROR: cannot access '@': No such file or directory > You have to give it path on mounted btrfs filesystem of course. > but when I'm doing this: > # btrfs subvolume create /.snapshots > Create subvolume '//.snapshots' > it works > > and this is what I see in the subvolumes list: > ID 3541 gen 175955 parent 3540 top level 3540 path .snapshots > Without actual command that shows where you look it does not provide much useful information. > and then I can create a snapshot with snapper: > # snapper -c root create --description "test" > > but snapper starts numbering from 1 again which I don't really like. I > would like to keep the previous snapshots and continue the numbering > after the last restored snapshot (1594). > openSUSE offers native support for reverting to previous root snapshot while keeping all existing snapper snapshots. May be you should look at it instead of reinventing the wheel? -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html