You're missing two *
very* important options when using rsync between FreeBSD and Linux systems:
--hard-links and
--numeric-ids
FreeBSD uses a lot of hardlinks (/rescue/* is a single binary, for example). If you omit that option, your backup will be huge (each hard-link gets copied as a separate file). And you won't be able to restore back to the same size harddrive.
The numeric IDs option is important when transferring between OSes. Without it, rsync will send the username/groupname and the remote system will set the UID/GID to match whatever it has on the local system. These are not the same across Unix-like OSes, and bad things can happen on restores.
These are the options we are currently using for our rsync backups:
--archive --hard-links --sparse --xattrs --numeric-ids
--verbose is handy to see what it's backing up, while it's running.
If you have /home on a separate filesystem, you can add
--one-file-system to only backup the / filesystem and nothing else (no /dev, no /home, no other mounted filesystems).
Or, you can use
--exclude /dev --exclude /home --exclude /blahblah to skip directory trees.
However, if you want to make restoring easy, then do a complete backup of everything except virtual filesystems. So something like the following:
# rsync --archive --hard-links --sparse --xattrs --numeric-ids --exclude=/dev --exclude=/tmp --rsh="ssh -what -ever -options -needed" / username@linuxbox:/path/to/USB/drive/
That way, the restore process is just:
- Minimal install of FreeBSD onto new harddrive (to get partitions and filesystems right, installs boot loader correctly)
- Boot LiveCD
- Mount FreeBSD filesystems to /mnt
- rsync --archive --hard-links --sparse --xattrs --numeric-ids --exclude=/dev --exclude=/tmp --rsh="ssh -what -ever -options -needed" username@linuxbox:/path/to/USB/drive/ /
- Reboot
If you try to do a piecemeal backup, then you have to a convoluted piecemeal restore.