Daily backup Wiki
A small bash script that creates daily incremental backups
Brought to you by:
nvaytet
Welcome to your wiki!
This is the default page, edit it as you see fit. To add a new page simply reference it within brackets, e.g.: [SamplePage].
The wiki uses Markdown syntax.
How to use the backup script:
The current version requires to have rsync installed.
You can run the script manually from a terminal or include it in the list of your startup applications (I would not include it in your .bashrc as it will launch a new instance every time you open a new terminal tab/window). I also recommend running it with "nohup ./backup.sh &" in case you close the terminal window you launched from.
For remote backups, you need to have generated a ssh key so that the script does not have to ask for password to connect to the remote host.
The script will look back for previous backups and will use the most recent one as a basis for linking old files that have not changed. Only new files will be copied, thus limiting the size of the backups. The original copy will automatically be created the first time the script is run, and will perform linking from there onwards.
Each backup will be a snapshot of your files at the time of backup. rsync's use of hard links makes the backed up directories look exactly like the original ones, with no sign of the linking that is performed behind the scenes. The incremental nature of the backups should ensure that the total size of your backed up folders should be only slightly larger than the single original backup. If you see that the total size of your backups is doubled the second day and tripled the third, then there is a configuration problem.
Last edit: Neil Vaytet 2014-03-22