BTRFS why not snapshot @home?

I use btrfs on all my linux pc’s and RPI 4’s. As such I have investigated tools like snapper and timeshift. It seems a lot of the advice out there says you only need to snapshot / and not /home.

I’ve noticed that if I install an application and something goes wrong, if I restore / to a “before” snapshot the application is gone, but there are remnants of that app installation with files in ~/.config and maybe other /home related directories.

So for me I think /home snapshots that match the / snapshots are critical. To that end I have updated /etc/snap-pac.ini to include /home snapshots.

Anyone agree with this or are there downsides to this?

First thing that comes to mind is that restoring a snapshot of home would overwrite the personal files and possible loss of some data and also the loss of any changes that have been done to the configs in the time between the taking of the snapshot and its restoration.

1 Like

I would always take snapshots of /home. I think it is fairly crazy not to do so.

However, I wouldn’t restore a snapshot of /home along with a / snapshot in most cases because it may overwrite user data.

For me, snapshots of my user data are far more valuable than snapshots of /.

Personally, I would use timeline snapshots for this. There is no relationship between important data in your /home and pacman. What if you don’t install/update any packages for a week? There are probably still important changes in your /home.

2 Likes

I agree with you.
For me, I am using BTRFS Assistant to snapshot home.
Furthermore, just to be on the safe side I am using kopia (https://aur.archlinux.org/packages/kopia) and I configured to take snapshots of my data to an external USB drive.
So far it is doing great.

Usually when I need a snapshot I know almost immediately after a system update or application install that was a bad mistake. So I would not have updated any personal files or settings prior to the snapshot.

Well, in that case, then …

I do have timeline snapshots every hour. So I’m protected that way as well.

The other thing to remember about snapshots is that restoring a snapshot is not the only thing you can do with them.

You can also copy files out of them. So if you make a mistake in a file, you don’t need to restore the whole snapshot.

3 Likes

I’ve struggled with the external backups of snapshots. When I first built a server with btrfs it booted from an SSD and had a RAID 1 mirror that served as my home NAS, all in BTRFS. This was all on Ubuntu 22.04 and I only used btrfs cli commands in scripts to do the daily snapshots and then weekly btrfs send/receive of incremental backups of my / and /home to a subvolume on my NAS mirror.

The problem with this is that when you loose the boot SSD due hardware failure you have to install a base OS and then send/receive your external backup back to /mnt on your new SSD and then edit your UUIDs to match you new OS install prior to restoring the backup snapshots.

I’ve done this for real and it required a few shots of bourbon to steady my nerves while I did it.

It’s certainly is not as easy a clonezilla, I just want something that works as good a Snapper but had a simpler external restore to new hardware component

There are some tools for snapper that will automate the replication for you.

I heard of this tool: https://www.urbackup.org/, Chris Titus Tech recommended it although I didn’t test it yet…

https://christitus.com/urbackup/
https://www.youtube.com/watch?v=tXGVzMUsuE4&pp=ugMICgJwdBABGAE%3D

This is why I am using kopia.
All what I need is to just remember the name of the repo and the password.
By the way, I am using as well Resilio, where I installed it on this laptop, an old laptop (running EndeavourOS) and an old iPad. So I get my data synced real time to all Plus I can access the data from my iPhone while outside. (I know some will frown at me because it is not open source).
May I add, I am using some cloud services for some documents just in case.

Last week, i restored a snapshot of /, my /home is not in btrfs, so no snapshot for /home obviously.

I restored / with xfce 4.16, but my /home was in 4.18 (.config folder and so on) → big issue with thunar, it could not start anymore, although i did not investigate further.

So, currently, i think this is also a good practice to have /home in btrfs and take a snapshot of /home when you take a snapshot of /. At least, in my case i would have been useful.

m2c

1 Like