Backups are part of a sane recovery scheme that should help recover lost data. They can be thought of anything that is done to archive important system and user data.
For home users
Keep a folder with files that you want to keep secure. You need to copy it to another disk so the data survives when one disk fails. Best, have your archive folder on your hard disk and copy it to at least one USB disk. Now you need software to synchronize this folder on the two disks. A good choice is UnisOn. It allows you to sync bidirectionally, and it compares the files' content rather than their change date. This allows you to identify corrupted files.
How to do it
Backup your home directory
From the command line, type:
tar -cvzf myhomebackup.tar.gz ~
Backup your computer
tar -cvlf slash.tar.gz /
The l option says "local filesystems only". You need it because you do not want to backup /proc.
To store a backup of your computer on another computer in the network, use
tar -cv -f- $(ls -1 | grep -Ev "proc|sys|tmp|media|mnt") | ssh root@target "cat >/root/slash.tar"
This stores a backup of your computer, but not /proc, /sys, /tmp, /media and /mnt on the computer target in /root/slash.tar.
Backup and synchronise several computers
If you have several computers (maybe because you have several flats), you can upkeep an eternal archive on USB disk that you can transport. For data security, you synchronize your USB disk with your computers then. Let's say the USB disk is mounted on /mnt/sda1, and your archive is in /root/archive. You create your archive with
You can then show the differences between your archive on a USB disk and on your computer with
rsync -e ssh -avz --delete --dry-run /mnt/sda1/archive /root/archive
And you can update your computer's archive from a USB disk using
rsync -e ssh -avz /mnt/sda1/archive /root/archive
You can add the --delete option behind -avz to delete all content on the target that is not on the source.
- Clone your computer
- List of backup applications
- Step By Step Backup Tutorials with all different types of backup applications.