I spent a few hours searching the web on how to have the Synology NAS automatically rsync to the DreamHost backup account. I think I figured it out. Please review the process to see if it works, and how to improve it.
As you might know, DreamHost now allows you to
back up to 50 gigs of your files onto their servers. Each DreamHost account gets one backup account that you have to set up from the DreamHost control panel. Once you set it up, you will get a login, password, and server. The DreamHost backup server is currently "hanjin.dreamhost.com" and the login is bxxxxxx (where x are numbers). The home directory in your DreamHost backup account is bxxxxxx. You can't ssh into the DreamHost account, so you have to use a SFTP client to access it. I used FileZilla.
The first step is to make your Synology rsync into DreamHost without a password prompt, so you can script the process later on. SSH into your Synology using the root account, which has the same password as your admin account. Type in "mkdir /root/.ssh" to create a directory, and switch to it by typing in "cd /root/.ssh". Create your keys by entering "ssh-keygen -t rsa". This should create two files in your /root/.ssh directory, one of them named "id_rsa.pub". That's your public key.
Use a SFTP client to access your DreamHost backup account. Create a directory named ".ssh" on your DreamHost backup home directory. Copy "id_rsa.pub" from your Synology to your DreamHost backup account using your SFTP client, then rename it to "authorized_keys". Use your SFTP client to set the share of this file to 644. Create your backup folder on the DreamHost backup account. I called it "backup".
Type this command into your Synology:
rsync -aP --protocol=29 /mnt/volume1/*
bXXXXXXX@backup.dreamhost.com:backup
It should ask if you're sure you want to add the DreamHost server. Type in "yes" and hit enter.
It should not ask for your password. If it does, something is wrong. If it does not ask for a password, the rsync should start uploading documents. If it doesn't, something is wrong. If it starts uploading files, break the operation using Ctrl-C.
If everything works, all that is left to do is to add the job to the Synology NAS crontab. First, copy the rsync command into a file named autorsync.sh. Copy autorsync.sh to /volume1 on your Synology. Edit /etc/crontab on your Synology to add the following line to it.
0 1 * * * root /volume1/autorsync.sh
Then restart the cron process by typing the following commands into the Synology prompt:
/usr/syno/etc.defaults/rc.d/S04crond.sh stop
/usr/syno/etc.defaults/rc.d/S04crond.sh start
This should have rsync run every morning at 1 AM. I have this running on my system. I hope this helps.