There is a way to secure you against file deletion. When using (readonly) snapshots You can recover all your files from the last snapshot. This does come with a cost. You have to use a filesystem like btrfs and an utility that automatically takes snapshots like snapper, and you will need some additional space on your drive. But i think it is worth the work. In the last years i did not loose a single file (only because i could recover them every time from the snapshots)
This is no replacement for a good backup (lightning may strike, or your disk may break), but an addition that comes handy in daily work.
Snapshots are a good addition to backups, especially for recovering accidentally deleted files because:
- they are fast to access
- every user on the machine is able to recover his own files easily
- they are readonly (you can’t mess them up accidentally)
- they are taken with no delay (only cleaning them up needs some time)
- they take only a small amount of filespace, because they are in place
- they do include ALL files (even .something , links , permissions …), so you don’t have to maintain a list of files or folders
- snapper does this automatically (you can’t forget), even on boot, or on update (when configured so). On my system taken once every hour.
- you even can make fast incremental external backups from snapshots with btrfs. (When restored this will be bootable)
- These external backups of snapshots are mountable. Then you are able to browse them like every other snapshot in your running system.
good backup: best kept disconnected from the working PC
snapshots: inside the working PC