The best way to backup your data is to use rsync. Take a quick look through the man pages for rsync and rsyncd.conf but skip the stuff on "modules" since they're not needed.
If you use an external USB drive for backup, there are only things you need to know:
- Rsync backs up directories by default, so plan your backups on a directory-by-directory basis.
- Always use the -a (archive) switch to retain file permissions etc.
- Use the --delete switch to remove old files from the backup. If this is omitted, old files will either be overwritten or left untouched.
- Add a trailing slash to the source path to prevent rsync from creating a top-level directory named for the final directory on the source path.
rsync -a --delete /path/to/source/ /path/to/destination
If you have a home network and wish to backup across it, rsync uses ssh so you'll need to know something about it. You'll need to know the network IP address of the other machine, along with a username (root is the most powerful as always) and password.
- Ssh keeps a record of known_hosts in ~/.ssh. If connection is refused, check that the other machine is not listed in this file. If it is, delete the line contaning its IP address.
- Use the standard user@host:/path/to/files format.
rsync -a --delete /path/to/source/ email@example.com:/path/to/destination
The following websites give useful information: