how to set up timeshift for system files backup
- install timeshift - it is almost certainly in your package manager
- launch the timeshift application
- you can do everything for timeshift in the terminal, but i am going to cover the graphical version here
- select the snapshot type - if you don’t understand the options, choose rsync
- select snapshot location - pick which drive you want to save your backups to
- they will be saved in a folder called ’timeshift’ at the top level of that drive
- if you are blessed with multiple drives, i would suggest picking a different drive than where your os is installed
- this way if something goes wrong with your os drive, you still have your backups
- select snapshot levels - how many of each type of backup you want to keep
- i would recommend (2) monthly, (2) daily, (4) boot
- you can read my reasoning in the additional notes section below if you are curious
- keep in mind that the two is one and one is none rule applies here
- additional snapshots beyond the first one cost little additional space (usually)
- this is because additional snapshots only record changes
- for example: the ‘original’ snapshot for me is 24.9gb - and (for me) each additional one adds less than 1gb each
- i would recommend (2) monthly, (2) daily, (4) boot
- select what to include in snapshots
- select ‘include all files’ for the root user
- select ’exclude all files’ for all other users
- i would suggest backing up your user files using cryptomator with cloud storage instead
- maybe also look into running a raid setup if you /really/ don’t want to lose your user files
- backing up user files with timeshift will dramatically increase the amount of storage used
- i would suggest backing up your user files using cryptomator with cloud storage instead
- that’s it! close timeshift and check back tomorrow or +15 min after your next boot to confirm a snapshot was created
make sure you use timeshift (either graphical or cli) to delete snapshots if needed, avoid deleting them manually
in the future, if you need to rollback and you aren’t able to access the graphical version of timeshift:
just type ’timeshift’ into the terminal to get a list of commands and helpful info
you will use ‘sudo timeshift --restore’ to be prompted to pick a backup and a location to apply the backup
(optional) additional notes, if you want to know more
full vs incremental vs differential backups
full: creating complete copies of every file for each snapshot - uses a /ton/ of space
incremental: the first backup is full, then each snapshot is a record of changes since the last snapshot
differential: each snapshot is just a record of the changes since the last full backup
there are variations on how these are implemented, but that is the general idea
full uses just /so/ much more storage than the others and so is rarely used for the purpose of rollbacks
incremental is the most storage efficient, but requires the most computation to rollback to a snapshot
differential is the easiest and simplest to implement and saves vast amounts of storage over full backups
timeshift is differential, and only looks at changes on the file level
this means that if a file changed at all, a new full version of the file will be saved
unless you are making far reaching changes to your computer v regularly
i would feel safe expecting your backups to be smaller than 1.5x your root folder
the first time you are able to just rollback easily when your system breaks, you will agree it’s worth it
you should have at least two of each frequency of snapshot you want
imagine you set snapshot levels to one for month, day and boot
you make some change which will break your computer on restart on the 31st of the month before midnight
but you don’t notice because you haven’t restarted - you just turn off your pc and go to sleep
you wake up the next day and turn on your computer just before the start of an hour
your system boots broken in some obnoxious way to fix but you are busy making breakfast so you don’t notice
the boot backup fires and overwrites the last one & at the hour your month and day snapshots also overwrite
you come back to your pc with your breakfast in hand with no unbroken snapshots to bail you out
obviously this is a worst case situation, and unlikely to happen in practice
the more applicable usage of this understanding is that whatever n number of snapshots you have, treat it as n-1
so if you have two monthly backups, you should think of this as having at least /a/ snapshot at least /one/ month ago
with that in mind, you can see why having at least two snapshots for month, day, and boot is a good idea
just remember the rule: “two is one and one is none” (which applies to anything you count on, not just this)
boot is the most likely one you are to use since things being broken is most often discovered at boot
but if you reboot a few times trying to troubleshoot you could loose those
(which is why i like to have four)
day is useful for times when you don’t shut down your computer daily
or if you overwrite your boot snapshots troubleshooting
monthly is useful for when there is some insidious problem that you don’t realize until several days and boots later
if you can’t spare the extra space for more snapshots, in my opinion, monthly snapshots are the first to disable
this is especially the case since they are likely to be the largest snapshots since they will have the biggest diffs