Hi
but that’s a problem, in my opinion a unsafe option to use for the goal we want.
You can setup the system, use ro-snapshots and even boot into these ro-snapshots into DE/GUI with only minor problems. And that’s a safety point.
- Filesystem browsing: this feature is always present fully independent of Timeshift, you can use any filemanager to browse your snapshots
Snapper is good but there exists some caveats for normal users:
- use it as it was planned by suse developer, then u have to use snapshots/subvolume layouts that use nested child-subvolumes, means a hirarichical layout, and such layout is in common sense more complicated, like “notramo” above correctly sayed. I personaly don’t setup my BTRFS layout the Suse-way
- with Snapper you have to use a bootloader that use the default SubVolume setup, liek the patched GRUB from OpenSuse. Otherwise you can’t boot into Rollback-Snapshots taken.
- prior two points lead us to a way of using Snapper where we do never use Snapper for rollback, because we rollback manually on CLI (only two command are needed for, but thats to much for normal user without knownledge of BTRFS). On my setups i can use Snapper to make rollbacks but i can’t use it fully, menas boot into rollback-snapshots, because Snapper/Suse based his logic fully on BTRFS default-Subvolume setup.
I use BTRFS, snapper, snapper-gui, snap-pac, grub-btrfs and snap-sync on 5 machines. All machines use a central BTRFS backup storage and SSH tunnels. This setup need knownledge of BTRFS but i think is a lightweight and a commonly easy setup to understand with most features enabled we want.
- flat BTRFS layout for @ → ‘/’, @home ->‘/home’, @var → ‘var’, @snapshots → no montpoint
- hirarchical BTRFS layout for snapshots. I use configuration of snapper for “root” and “home”, thus use subvolumes @snapshots/root and @snapshots/home.
- /boot/efi is mountpoint for UEFI FAT32 partition, we include anything in /boot into snapshots of / = root-system
- swap-partition instead of swapfile in BTRFS, if we don’t use system encryption, that’s easier. With system-encryption a @swap subvolume with BTRFS Swapfile, to get only one LUKS encrypted partition for the full system
- /var is full into a separate @var subvolume. Instead of using many different subvolumes of each folder into @var to separate/splitout the one folder we need realy into our root-snapshots i separate @var-> /var fully from root-snapshots and include the only folder we need into root-snapshots → /var/lib. /var/lib must be snapshotted with our root system because we don’t have to break dependencies of installed library configuration or more important the pacman/pamac config files of installed packages of our current system. To get this behavior i copy /var/lib to /usr/var/lib and in fstab i make a bind-mount from /usr/var/lib to /var/lib. This is then the only point we have to consider. My /var have +C attribute set.
- I use a fstab mount point of subvolid=5 to /btrfs folder, means i mount the BTRFS Root-Filesystem to folder /btrfs. Most btrfs command i use access the filesystem trough this /btrfs folder to ensure i use the right place for any action into the BTRFS filesystem hirarchy.
- Now, this system can boot with GRUB ro-snapshots into DE/GUI.
- Rollbacks i make by hand, easy case:
sudo btrfs subvolume delete /btrfs/@
sudo btrfs subvolume snapshot /btrfs/@snapshots/root/15/snapshot /btrfs/@
- because we exchange our @ subvolume on rollbacks, anything setup’ed in GRUB, grub-btrfs and so on works, even if we bootet into a ro-snapshot. We don’t have to update-grub later or so on, because we boot our working system always at @.
- thus i don’t have to tweak GRUB on startup and edit his menuentries on bootup, no patched GRUB needed like in Suse, no update-grub after rollbacks and so on.
Even better would be a solution to boot on damage into a ro-snapshot with GRUB, start a small scriptlet that make above rollback automatically and reboot.
On my USB backup drive i installed a identical bootable Manjaro system like on all my machines. The only difference is another subvolume @backups. Into this @backups subvolume if store with snap-sync my backups of my machines, like @backups/($hostname)/root/#/snapshot.
On realy hard damages of my machines i attach this USB drive, boot his Manjaro Installation with his @backups subvolume and made my recovery, by hand. Because we never knew exactly what errors we get in future we can’t relay on a fully automatical tool to make this recovery for us.
// sudo btrfs su li /btrfs
// subvolumes
ID 1372 gen 73430 top level 5 path @
ID 669 gen 73432 top level 5 path @home
ID 259 gen 73420 top level 5 path @var
ID 327 gen 43489 top level 5 path @snapshots
ID 504 gen 72482 top level 327 path @snapshots/root
ID 505 gen 73417 top level 327 path @snapshots/home
// snapshots
ID 1147 gen 34449 top level 504 path @snapshots/root/1/snapshot
ID 1148 gen 34450 top level 505 path @snapshots/home/1/snapshot
ID 1149 gen 34487 top level 505 path @snapshots/home/2/snapshot
ID 1211 gen 38203 top level 505 path @snapshots/home/48/snapshot
# Swap
UUID=06686a06-c069-49f7-86e4-7a962740b364 none swap defaults 0 0
# UEFI
UUID=447C-E2BC /boot/efi vfat noatime,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8 0 2
# System
UUID=26c8751d-2747-4a4d-b857-32c82d67b20a /btrfs btrfs noatime,ssd,compress-force=zstd:5,subvolid=5 0 0
UUID=26c8751d-2747-4a4d-b857-32c82d67b20a / btrfs noatime,ssd,compress-force=zstd:5,subvol=@ 0 0
UUID=26c8751d-2747-4a4d-b857-32c82d67b20a /home btrfs noatime,ssd,compress-force=zstd:5,subvol=@home 0 0
UUID=26c8751d-2747-4a4d-b857-32c82d67b20a /var btrfs noatime,ssd,nodatacow,subvol=@var 0 0
UUID=26c8751d-2747-4a4d-b857-32c82d67b20a /.snapshots btrfs noatime,ssd,compress-force=zstd:5,subvol=@snapshots/root 0 0
UUID=26c8751d-2747-4a4d-b857-32c82d67b20a /home/.snapshots btrfs noatime,ssd,compress-force=zstd:5,subvol=@snapshots/home 0 0
# var/lib mount into subvol=@
/usr/var/lib /var/lib none defaults,bind 0 0
# Backup
UUID=d49e1730-5137-473c-8e28-a76cf14e9830 /media/Backups btrfs nofail,noatime,ssd,compress-force=zstd:5,subvol=@backups 0 0
You see, the @snapshots subvolume is outside of the subvolume we make snapshots from, this is the most often suggested layout for BTRFS. Opensuse goes another way and i don’t know why suse goes the more complicated way.
My setup need knowledge by the user. Using Snapper, his manual setup, the trick with the bind-mount of /var/lib, the manual rollback, the recovery with help of the backups made (manual), all this are small traps.
In my opinion: using BTRFS is the same discussion as using cryptography. In both cases you have to known about it, you have to learn some basic stuff to handle it correctly. A easy-dumb-use is currently not possible. The needed toolchain is’nt ready yet. Using Timeshift seems on first look a nice idea but on second look, it’s not the right choice. The goal is system-stability, safety and writable snapshots are contradicted in my eyes.
But otherside: if Manjaro where the first great distribution that had manage these pitfalls with BTRFS, Snapshots and Backups and made it easily available for common users, then it where a big win for Manjaro.
I was a windows user over about 25 years, but now with BTRFS and his features correctly used i would never go back again. My descision to choose Manjaro as my linux distributation is based on the use of BTRFS.
PS: sorry for my english 