backup system files (and permissions) over ssh

rsync-mail-gateway at rsync-mail-gateway at
Thu Oct 12 10:19:14 GMT 2006

how do you backup system files like /etc/ over ssh to another machine
and keep permissions the same on the remote backup location ?

i tried using -a flag, but because i'm connecting through ssh i'm not using Rsync module on the remote computer and therefore i cant write files as root so -a flag is not working.
all the files are being written with owner SSH_USER and group SSH_USER_GROUP

i think the problem is here (from rsync man) : -o, --owner  preserve owner (root only)
and SSH_USER is neither  root nor rsync module that can run as root

my Rsync command is:
rsync -e "ssh -i key_path" -a flags excludes local_path ssh_user at server2:/full/path

is there a way to do what i'm trying WITHOUT giving root ssh access ?


Read this topic online here:

Sent using Mail2Forum (


-------------- next part --------------
HTML attachment scrubbed and removed

More information about the rsync mailing list