A rollback can act like a backup? I keep my works online, in Google Drive, so I don’t loose them. I have a separate partiton for /home. A rollback affect also the home partition? It’s usefull to use a backup app (I like Deja Dup) ? What for?
Rollback
If you installed Tumbleweed with the default configuration (BTRFS+snapper) most of the system partition is “freezed” in a “snapshot” before updates etc., so that you can “rollback” your system to the situation before the update etc. if something goes wrong.
In the default configuration /home is not included in snapshots, so damages to /home cannot be repaired via a “rollback”.
Backup
To restore damages to /home (or any of the directories not included in a snapshot) you need a copy saved elsewhere, that is a “backup”.
The means to save that “backup” is up to you, you may include /home in snapshots (not recommended AFAIK), have a local copy saved every x days, have G-Drive manage backups for you etc.
In case of trouble, you may resort to the saved copy, losing only work done in the last x days.
But if I have a separate partition for home, do I still need a backup? The partition itself should be a form of backup.
@valc_2024 for sure… unless there is nothing in $HOME you need…
I’m not sure I understand. The role of a separated home partition is to preserve. So rolling back will erase any documents in the home partiton? Photos, presentations, everything?
@valc_2024 So if the disk dies containing that partition and you have no external backup of the data???
Yes, a rollback won’t affect the partition, however if there is some software configuration in $HOME for application X, and upgrade to snapshot X changed this (perhaps a database), then you rollback to snapshot Y, application X may not work. So be prepared for transient issues until you get back to the latest version.
Negative. Having a separate /home partition does nothing as far as a backup. You still only have one copy of the files in your home dir, the originals. They aren’t “backed up” anywhere, on the machine, or elsewhere. If anything happens to the physical device - stolen, voltage spike from a lightning strike, fire, flooding, whatever - that data is gone.
Having a separate partition for /home might help protect you (a little) in a situation where an application on the machine goes awry, and starts filling up /var/log - you’ll still have usable space in /home. Similarly, if you fill up /home with torrent downloads, it won’t cripple the system as a whole - because they are separated.
In theory, you can enable snapshots of /home somewhere in yast, and you can restore/rollback your user files using that… but it’s probably not going to have the granularity of an actual dedicated backup system i.e. daily for the last n days, weekly for the last n weeks, monthly, yearly, etc. Snapshots would better than nothing - at least you have a second copy of the data - but it’s still probably going to be stored on the same drive as the original. Anything happens to that drive - or that partition - and you’ll have nothing.
Technically - a backup is done to a different drive to provide a way to recover from a drive failure.
a rollback is an undo to a previous time. Rollback of btrfs system will not recover a failed drive.
A backup is useless unless you test it to make sure you can recover the backup to a different drive to prove you got everything and have a recovery plan.
The easiest backup is to dd the entire system drive to an identical backup drive. It is best to have a rolling set of backups so that you can go back to a know good backup. I keep 10 weekly images as my backup.
My 2 cents - you mileage will vary.
You can never have too many backups.
Here is where I have to lear more. My sistem works fine now, but the whole thing is a mistery to me. So I have important/unimportant snaps. I also know that the program can keep only 10 snaps. And if I make a small move - install a program - a new snap is created. But at this rate, I can end with only unimportand snaps. This can be a problem.
I also have the option to create a new snap, but how can I preserve it? How can I distinguish a good snap from a bad one? Should I take my own snaps?
All my important works are on Google Drive, so no problem with a major crash. I use a separate home partition for settings, fonts, icons, themes etc. I have also some backups, but keeping home intact can save me from a tone of work in case I need to reinstall everything.
Whatever “program” you mean, it is incorrect. There is no artificial limit on the number of snapshots.
Which is why snapper cleanup algorithm has different setting for “important” snapshots. And you can disable automatic cleanup and only delete manually if you want.
If you are using snapper automatic cleanup - you cannot. There is no provision for excluding a single snapshot from periodic cleanup. If you are not using snapper automatic cleanup then nothing is deleted automatically and it is up to you to delete whatever you do not need.
How can I do that? How many snaps can be without blocking snapper or something?
Maybe it is time for the documentation…
How much space do you have for root partition??? that is the limit. Every snapshot takes up space . Run out of space and things will lockup!!! The number of snaps is not limited it is the space needed to store them that is limited.
Ok, but if I do a single snapshot using the Create button - entitled Sistem OK or something - and I do this from time to time? This can help?
The problem with documentation is that it only shows you HOW to do it, but doesn’t answer your specific needs and questions. Suppose that in a snapshot - say no. 20 - an error occurs. The error does not manifest itself from the beginning and goes unnoticed. When it begins to manifest, we already have snapshot 45, and snapshot 19 - which represents the clean system - is long gone. It would have been nice if snapshot 19 was fixed somehow without getting deleted. How can we solve this problem?
FAQ
What error? Snapshot is a read-only copy of the root filesystem at some point. It is not used after it is created. If you did not observe errors at the time snapshot was created - how can errors suddenly “occur” in the read-only snapshot?
I already answered it. Do not enable (or, better, disable, because it is default) automatic cleanup.
Or simply create btrfs snapshot manually outside of the usual /.snapshots
location.
If you insist on using snapper
, I suppose you can create the second configuration for the root subvolume using different location for snapshots.
They are like at least 4 snaps keept for a long time, if ti is enough space. Only minor snaps are deletet. At least this is what I understood from the manual. So I figure I can create a new benchmark snap from time to time, and it can be ok. Because this is what I mean, to have a small number of benchmark snaps.
With the default configuration of Snapper, a snapshot has links to all files of your default subvolume (you are working at). If you modify/delete/add a file, any different than the snapshot will be recorded and Btrfs decides the changed files shown in your default subvolume, and original files not shown, but still laying in the block or snapshot. So if you modify a file several times with only one snapshot created, you only can get the original file and latest file, so snapshot is not a real backup.