Windows: rsync
|
Compatibility: Setup Time: Less than 15min Current EV Setup Script: Legend: |
||
Here's how to setup rsync to backup certain directories on your PC, or even your entire system, to ExaVault backup servers. If you need any help, send us an email or give us a call. Info is on the Contact Page.
Remember Your Username: In the instructions below, you should replace any instance of username with the login name that you were given when you signed up for your account.
Note on Other Servers: Several people have asked us if it is possible to use these instructions to setup rsync to servers other than ExaVault. While we certainly encourage the use of our backup plans, the answer is yes; you are welcome use these instructions to backup to any server. All you need to do is make sure you have rsync running on the remote server, replace username.exavault.com below with use your own server's name, and manually add your SSH key to your authorized_keys file in the 'Activate Your Key' step, below.
Step I: Install cwRsync
Windows is the only platform that doesn't come with rsync built-in, but there is a freely available installer to get it onto your system. The software is called cwRsync, and is available from ITeF!x.
I.a. Download the cwRsync Installer from SourceForge. We recommend you save the download on your desktop, or somewhere else easy to find. Download Now »
I.b. Install the software on
your computer. To do this, open the zip file
from the download (e.g. cwRsync_2.0.7_Installer.zip)
and then double-click to run the installer inside
the zip file. All of the defaults in the install
are fine, you just need to keep clicking 'Next'.
I.c. Once the installation
is finished, click
'Close' and then make sure you have a 'cwRsync'
item in your Start Menu.
Step II. Setup a Security (SSH) Key & Copy It To ExaVault
In order to make a secure connection to the ExaVault backup servers, you need to create an SSH key. This is done via a program called 'ssh-keygen', which comes with cwRsync.
II.a. Bring up a command line prompt by going to Start -> Accessories -> Command Prompt.
II.b. Add cwRsync to your windows 'path' so that you can run it. Just type this at the command line:
path = %PATH%;c:\program
files\cwRsync\binII.c. Create the backup directory. All of your backup
configuration files need to be stored somewhere.
We recommend c:\backup.
Issue the command to create the directory:
mkdir c:\backupII.d. Create the Key. Issue the command:
ssh-keygen
-f /cygdrive/c/backup/ssh_key -t rsa -N '' (Please
note those are two single quotes)The part that says '/cydrive/c/backup/ssh_key'
is telling the software where to save your new
SSH key. You'll learn more about '/cygdrive/c'
later, but for now know that it represents your
C: drive.
II.e. Upload the Key to ExaVault. Issue the command (all on one line):
rsync -e ssh /cygdrive/c/backup/ssh_key.pub username@username.exavault.com:ssh_keys/key1.pubThis will ask you if you want to connect to username.exavault.com, since the host can't be verified. Type 'yes'. Then it will ask you for your account password, which you should enter. If it doesn't say anything after that, the upload was a success. If it didn't work, check your username and password, and make sure you replaced the word 'username' above with your actual username.
Note: if you are planning to use this account
for multiple servers, you should rename key1.pub
to key2.pub for the second server, key3.pub
for the third, and so on.
II.f. Activate the Key. Issue this command:
ssh username@username.exavault.com addkeysAgain, you will be asked for your password. This
command copies your public keys (e.g. key1.pub)
to the 'authorized_keys' file in your backup
account. This is the last step in setting up
the secure link.
Step III. Test the Backup
Now you've got the authentication all setup. All that is left is to start the backup. We strongly recommend you do a small test backup first, to make sure everything is working.
III.a. Run a test backup. The command below will backup all the files on your Desktop to the 'backup-test' directory on the backup server. Type this all on one line.
rsync -avz -e "ssh
-i /cygdrive/c/backup/ssh_key" "Desktop" username@username.exavault.com:backup-testYou should see all the files on your desktop being transferred to the backup server. If you don't, triple-check all your settings, and if you still don't, contact us for help.
II.b. Verify the test backup. Using
an SFTP program, login
to your account via SFTP and navigate into
the 'backup-test' directory. You should see the
files from your desktop in that directory! Assuming
that everything looks good, you may want to delete
those files so they don't use part of your quota.
Step IV. Setup & Automate the Backup
The final step is to setup and automate the backup. You'll use a small script to do this, and we've created a sample for you to help you get started.
IV.a. Decide what to backup. You'll first need to decide which files and directories you want to backup. You are welcome to backup whatever data you like; however cwRsync is designed to backup files only, and not special Windows data areas such as the Windows Registry. Therefore, we recommend you use cwRsync to make a remote backup of important customer data, and use a local backup solution (such as tape, DVD-R, or hard disk) for full system backups.
IV.b. Setup a backup script. You'll
setup all the cwRsync commands to run via a script,
which can be run via Windows Task Scheduler.
We've provided
a sample for you to get started;
after you download it, read through the comments
in the file for more instructions. You should
store the batch file in the directory you created
earlier at C:/backup/ Download
Now »
IV.c. Run your first FULL backup manually. (Optional) We recommend you run your first full backup from the command line, so that you can monitor it in case anything goes wrong. To do this, just run the backup script after you've got it setup:
c:\backup\data-backup.batIf it doesn't work, make sure that you've double
checked all your settings in the script. In particular,
make sure you're referencing everything with
the /cygdrive/c prefix; cwRsync won't know what
to do if you give it a c:\ prefix. If something
is still wrong, contact
us.
IV.d. Setup Windows Task
Scheduler to run your file. Go to
Start -> Control Panel -> Scheduled Tasks
and click 'Add a Scheduled Task'. Click 'Next'
on the introductory screen, and then click
'Browse...' on the second screen to locate
your script file (which should be in C:/backup/
). Follow the prompts
to set the schedule and enter your account
password to allow the software to run.
You're Done!
You're now done! Your computer will backup the data you specified whenever you've asked it to, using the efficient rsync protocol. If you ever want to check the backup, simply use SFTP to go into the backup server.
Windows Compatibility Note: Please note that while rsync is compatible with all versions of Windows since Windows 95, it is only designed to backs up files, and not protected data areas like the Windows Registry.
