I just figured out how to automate my rsync backups using
authorized_keys and the
command= parameter so that my rsync script can't be modified by the user.
So my authorized key file looks like this:
command="rsync --server -vlogDtprze.iLsf . /mybackupfolder/Pictures" ssh-rsa AAAAB3Nz…
The rsync script I run from the computer being backed up is:
rsync -avz -e ssh /home/me/Pictures [email protected]:/mybackupfolder/Pictures </b>
What I want to do is back up
/home/me/Documents. Just those two directories.
How do I accomplish this but keep it secure? The thing I like about the authorized keys file setting is that the user can't change where the backup is going...just what is being backed up.