Setup rdiff-backup for incremental backups to RTMD repository
From Lehigh RTMD Wiki
Windows
- Download rdiff-backup [[1]]
- Install to "C:\Program Files\rdiff-backup"
- Download PuTTY on the host machine [[2]]
- Use PuTTY Key Generator to create an SSH-2 RSA Key
- Use PuTTY to SSH to rtmdrepos.nees.lehigh.edu
- Append ~/.ssh/authorized_keys2 with the created public key
- Save private key (no passphrase) to mykey.ppk on host machine
- Connect to rtmdrepos.nees.lehigh.edu using plink.exe and save key when prompted
- Add "C:\Program Files\rdiff-backup" and "C:\Program Files\rdiff-backup\bin" to Windows path
- Perform a backup:
- Open command prompt
- rdiff-backup.bat (source folder) (user@rtmdrepos.nees.lehigh.edu::(full path))
- ie, rdiff-backup.bat "c:\Documents and Settings\Owner\My Documents" tmm3@rtmdrepos.nees.lehigh.edu::/home/array0/backups/tmm3/MyDocs/
- Schedule in Scheduled Tasks:
- Start -> Programs -> Accessories -> System Tools -> Scheduled Tasks
- Double click Add Scheduled Task
- Click Next
- For now, choose any program (ie, Address Book). This will be changed
- Enter a name for the task and select when it should run
- At the password screen, enter your Windows password
- At the final screen, check "Open advanced properties for this task when I click Finish"
- Enter under Run: rdiff-backup.bat (source folder) (user@rtmdrepos.nees.lehigh.edu::(full path))
- Enter under Start in: "C:\Program Files\rdiff-backup\"
- Hit Ok and enter your Windows password again
Linux
- Download rdiff-backup using yum install rdiff-backup or apt-get install rdiff-backup
- Become root
- Run ssh-keygen -t rsa and hit enter 3 times
- Copy the contents of .ssh/id_rsa.pub
- SSH to rtmdrepos.nees.lehigh.edu
- Edit .ssh/authorized_keys2 and append the file with the public key
- Log off of the remote machine
- Add a cron script to the host machine with something like: rdiff-backup /var/ 128.180.53.50::/home/array0/backups/machine/var/
- Use `echo "back" | mailx -s "backup" user@mail` to send a confirmation that the command finished