Home Services About Contact Legal Network Status

Rsync Instructions

Step 1

Log in to your server through SSH, telnet, or another shell access method. If you use a control panel such as Cpanel or Plesk, you may do this through the control panel. If you have root access, log in as root. If not, log in through the account you will be using to perform backups. (Note: To work properly, rsync must have read access to the files it is to back up. For this reason, it is often executed as the root user. However, it may also work when executed from individual user accounts)

Step 2

Create an RSA encryption key for use with the SSH transport. You may check if a key already exists by executing the following command:

# cat ~/.ssh/id_rsa.pub

If the file already exists, you may skip to step 3. Otherwise, create a key with the ssh-keygen utility (press enter at the prompts to accept the default options):

# ssh-keygen -t rsa -N '' (note: these are two single quotes)

Step 3

Copy your RSA encryption key to the BQ Internet backup system. You may do this through the shell as well.

# scp ~/.ssh/id_rsa.pub yourusername@yourusername.bqbackup.com:keys/server1
# ssh yourusername@yourusername.bqbackup.com mergekeys

Step 4

You may now test rsync by copying a small directory, such as /etc:

# rsync -avz -e ssh /etc yourusername@yourusername.bqbackup.com:server1

This command should run without prompting for a password. If you are prompted for a password at this step, or if you receive any error messages, please contact technical support at support@bqinternet.com. Otherwise, congratulations on configuring rsync to work with our system. You may now add rsync as a daily cron job, as outlined in step 5.

Step 5

As root, execute the following command (variations listed below):

# echo "30 18 * * * root rsync -avz --exclude=/proc -e ssh / yourusername@yourusername.bqbackup.com:server1" >> /etc/crontab
(note: don't forget both brackets...that's >>)

Various rsync configurations:
Back up entire server: rsync -avz --exclude=/proc -e ssh / yourusername@yourusername.bqbackup.com:server1
Back up home directories: rsync -avz -e ssh /home yourusername@yourusername.bqbackup.com:server1
Back up specific users: rsync -avz -e ssh ~bob ~bill ~sarah yourusername@yourusername.bqbackup.com:server1

Copyright © 2001-2015 BQ Internet Corporation