1

An automatic backup script executes the following rsync command to sync a local directory tree with a remote one:

env RSYNC_PASSWORD=$rsync_password rsync -aqrxz --delete --timeout=30 \
    "${rsync_username}"@"${rsync_host}"::"${rsync_module}" ./ \
    --exclude /$(basename "$0") --exclude /config/local_host.sh --exclude /local

Files and directories are copied / updated / created into the target host, however, they are not deleted from target if they cease to exist in source. That is, the command above is able to only create and update files and directories from source to target, but not to delete them.

On the target host, rsync is executed by the user www-data, and the whole target directory tree is owned by www-data with 755 permissions.

On the source host, rsync is executed as a root daemon thru the rsync protocol.

1
  • Which is the module configuration? does it have settings against delete options (ie refuse options)?
    – hmontoliu
    Feb 1, 2015 at 11:22

0

You must log in to answer this question.

Browse other questions tagged .