I am backing up data from a GNU/Linux system to a CIFS mount. There are clear limitations to this, such as characters in filenames (eg. colons (:)) and symlinks not being supported by the destination Windows file system.
Rsync backup proceeds well enough using the following (note mirror backup):
rsync --bwlimit=62500 --log-file=${logfile} -av --no-links --delete ${src_dir} ${dest_dir}
Rsync reports errors on transferring file according to limitations above and returns error code:
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1052) [sender=3.0.9]
Issue is that I want ensure rsync completes successfully, given the limitations of the destination file system.
The error code reported appears to be too general (code 23: Partial transfer due to error
) to just skip over in the wrapper bash
script that checks the return code ie, if I skip over this error I may ignore a failed backup.
I have tried adding exclusion criteria to rsync, such as --no-links --exclude='*:*'
, which does work on that specific case. However, this seems like a piece-meal solution as I would need to update this when new conditions arise that cause backup to fail due to destination file system incompatibilities.
I prefer not to tar
backups as users require option to retrieve deleted files from backup.
Thanks for the help.