Turning on BTRFS Snapshots after a fresh install of Manjaro

Hi all,

This is the easiest and quickest way I’ve found to enable BTRFS snapper snapshots on Manjaro, after a clean install (tested on Plasma version but should work on all).

REMEMBER! to select btrfs filesystem option during the installation process. Not the default, which is ext4.

After a fresh installation of Manjaro, right after your first boot into the new installed system, immediately remove timeshift to avoid any timeshift snapshot if you make an update.

Here are the steps:

pamac remove timeshift timeshift-autosnap-manjaro

This step is optional:

Edit /etc/fstab and add noatime,compress=zstd to every BTRFS entry.

Example of what the / entry should look like:

UUID=a421daab-6583-4360-8cf4-b70d21bb2ba0 /              btrfs   subvol=/@,defaults,discard=async,ssd,noatime,compress=zstd 0 0

Adding noatime and compression will now save storage space and also you will see increased IO speed.

— end of optional step —

Next:

Enable the grub menu option:

sudo nano /etc/default/grub

Make sure the line GRUB_TIMEOUT_STYLE reads like this:

GRUB_TIMEOUT_STYLE=menu

Then save the file, exit nano and run sudo update-grub.

After that, install the following programs:

pamac install snapper btrfs-assistant grub-btrfs snap-pac inotify-tools

When prompted, choose optional dependency 1:
btrfsmaintenance

Next:

sudo systemctl enable --now grub-btrfsd.service
sudo snapper -c root create-config /

Now create one snapshot for validation:

sudo snapper -c root create --description "First snapshot before updates"
sudo chmod a+rx /.snapshots
sudo chmod 700  /.snapshots
sudo chown :users /.snapshots

The End!

And that’s all you need.

After that, any updates that you do, either with pamac, pacman, yay, paru, etc., will trigger a snapper pre/post update and will show on your boot menu when powering up, so you have a choice to boot into you snapshot history.

I REALLY hope Manjaro developers put a little extra effort in the installation process and include this in the default installations of Manjaro when BTRFS is selected.

Anyway, KUDOS to all their work for the best arch based distro!
This is really a must for accidental recovery of any OS/user/F*up made by anything and guarantees a rollback recovery instead of having to do a full reinstall process.

Thanks.

3 Likes

On my straight Arch system, the fstab entries are “compress-force=zstd:3”

2 Likes

Edited post for general readability and tidyness. No charge.

1 Like

Indeed they are, and also on arcolinux and I believe also on Garuda. And that’s the way they should be set for all fstabs related to BTRFS on any distro during installation.
BTW, the setting “compress-force=zstd:3” I believe defaults to zstd by just specifying “compress=zstd”

1 Like