After recent experiences like these ([^1], [^2]) now I fresh installed EOS with LUKS encrypted BTRFS, GRUB.
Since I’m going in this path I’ve decided to use Snapper not Timeshift for Btrfs.
I’ve installed following packages
yay -S btrfs-assistant btrfsmaintenance
sudo pacman -S snapper snap-pac grub-btrfs
Now what to do next, what are the recommended configurations/changes needs to be done for GRUB and Btrfs Assistant?
I understand it depends on your personal preference but still can you share your way of managing them and thought process so that I can take some ideas for myself.
Why I don’t have @/.snapshots subvolume by default? Do I need to manually create it? | reference: according to @dalto it’s unnecessary. (old post though)
What are the @/var/lib/machines and @/var/lib/portables? Do I need snapshots of those as well?
Necessary to snapshot @cache and @log subvolumes? | reference : link
What are recommended “timeline snapshots” configuration from ‘Snapper Settings’? | reference : @dalto 's recommendation here.
Recommended “Btrfs maintenance setting” ?
Any manual intervention necessary for snap-pac? Do I need to enable it like grub-btrfs? It suggests no configuration is needed.
On plasma desktop Btrfs Assistant is in White theme as always no matter what global theme I set for the desktop. How to make it Dark?
@dalto 's preference/recommendations matters as he is one of the maintainer/dev of Btrfs Assistant
I’d need to double check but I think there should be a .snapshots subvolume. I remember seeing it in my installation.
There is a section with recommendations for different use cases in the btrfsmaintenance README on GitHub.
The default time settings should be fine. Just turn on the scrub and balance tasks and leave the defrag task off. I’ve activated it for all subvolumes, but I’m not entirely sure if that is necessary or if for example @ and @home would be enough. Maybe someone else could say more about that.
snap-pac is set up to take snapshots of a snapper config named root out of the box. So if you created a snapper config for @ in btrfs-assistan that is named root and you only want to take snapshots of @, you don’t need to do anything else. If you want to also take snapshots of @home for example, you’d need to create additional configs for that. But strictly speaking @ should be enough.
For this I actually have no idea. Maybe someone else can help
Thanks, just checked summary. Will read their full readme.
I was thinking same but not sure either. Thanks for your insights.
Ok, I’ll wait for others reply.
Actually GRUB_BTRFS_SNAPSHOT_KERNEL_PARAMETERS="rd.live.overlay.overlayfs=1" to /etc/default/grub-btrfs/config part was already there by default in latest ISO installation. Already did the sudo /etc/grub.d/41_snapshots-btrfs part. @dalto So do I need to change anything now…remove eos-dracut package or /etc/grub.d/41_snapshots-btrfs file ? Any conflicts between the two?
No actually it’s recommended to take snapshots of neither of those subvolumes. @cache is temporary stuff anyway so it’s not needed to back that up, and @log shouldn’t be backed up because when you encounter problems and revert your snapshot of @ to temporarily fix them, you usually still want to be able to look at the logs for troubleshooting. If you backup and reset the logs while reverting your root subvolume, you’ll also delete the log entries that the problem might have left, so you’ll make it harder for yourself to troubleshoot without the needed logs.
tl;dr - Just take snapshots of @ and ignore anything else. You can additionally take timed or manual snapshot of @home if you want backups of files in there, but there is no need to set snap-pac to take snapshots of @home or to revert them if you encounter problems after an update for example. For that restoring @ is enough.
I think the line is there, but it’s commented out (there is a # in front of the line which means it is ignored). Nonetheless I tested if booting from snapshots is already read-only / edits are only temporary on my identical btrfs set-up, and they are. So it definitely is working out of the box without any change needed, no matter if the line is there and uncommented by default or not.
And no you don’t need to change anything. eos-dracut and 41_snapshots-btrfs are two entirely different things and both are needed.
eos-dracut generates the initram-fs needed for booting, 41_snapshots-btrfs basically generates the sub menu that will let you select the snapshot for booting in grub itself.
Restoring @ will not restore @log and @cache will not cause those to be restored even if you take snapshots of them.
That being said, I see no value in taking snapshots of @cache. For @log, I suppose it is personal preference, I would not take snapshots of it, personally.
I would strongly recommend taking snapshots of @home. Don’t use snap-pac for those snapshots, just take them on a schedule.
No, not at all. snap-pac is taking snapshots of @ before and after each update.
I am saying that for @home, you should take snapshots on a schedule. To be honest, I would also take snapshots of @ on a schedule but those are in addition to your pacman snapshots.
You have already done the setup, so there would be not point in installing snapper-support at this point.
snapper-tools is just another front-end for snapper. An opinionated one. It is up to you if you want it or not. You definitely don’t need it.
I thought snap-pac only able to take snapshots of @ not @home. So I need not to change anything. And yes taking snapshots of @home on schedule with snapper through Btrfs Assistant.
Your intention of these @home snapshots are purely for data recovery purpose not restore correct ?
I think all my doubts are clear for now, besides this one.
You both somehow seem to have missed the second part of my comment about snapshoting @home
So yeah that’s basically what I also recommended, but it’s good see that you’re recommending the same
snap-pac is able to take snapshots of other subvolumes, it’s just not set up to do so by default. Just make sure your snapper config for @ is called root and it will take snapshots of this config out of the box. Everything else you need to configure manually. So you don’t need to do anything else to not make it take snapshots of @home
And of course this is right too, my wording here was a bit off and the explanation not detailed enough. Was typing this from my phone, so please forgive me
Happy we were able to help and clear things up for you.