I use rsync to backup home dir of my computer 1 to computer 2 like this:
rsync --recursive --archive --copy-unsafe-links --hard-links \
--delete-after --fuzzy --compress --human-readable \
--quiet --delete-excluded \
--exclude mail \
--exclude .ssh \
--exclude .wine \
--exclude .byobu/.ssh-agent \
--exclude .config/pulse/*-runtime \
\ # some more excludes go here
/home/myusername/ \
computer2hostname:/mnt/storrrage/computer1_backup/
Some programs like pulseaudio create bad symlinks on my computer regularly. So, when it finds a bad symlink, it does this:
symlink has no referent: "/home/myusername/.kde/tmp-computer1"
symlink has no referent: "/home/myusername/.kde/socket-computer1"
How can I make rsync proceed even after encountering a bad symlink, just don't copy it or copy it, whatever, I don't care? Just log it and don't cancel the backup. (by cancelling I mean --delete-after
is not performed, and maybe files are not copied, not sure.
rsync --recursive --archive --copy-links --copy-unsafe-links --hard-links
in the first line of the command? So just include the--copy-links
parameter too but preferable after the--archive
parameter as per the man page from what I gathered.chroot
so read about it when you get a chance. I assume these are two simple things you can try at least.