Building a compatible rdiff-backup RPM
It seems rdiff-backup expects to find the same version of rdiff-backup on the remote machine as well. Our backup box uses 1.0.4 so here's how to build the same version on
CentOS / Fedora / Red Hat.
# download the src RPM
wget -O /usr/src/rdiff-backup-1.0.4-1.rf.src.rpm http://dag.wieers.com/rpm/packages/rdiff-backup/rdiff-backup-1.0.4-1.rf....
# install it
rpm -ivh /usr/src/rdiff-backup-1.0.4-1.rf.src.rpm
# install dependencies necessary to build the RPM
yum -y install librsync librsync-devel
# build the RPM
rpmbuild -bb /usr/src/redhat/SPECS/rdiff-backup.spec
# install your new rdiff-backup RPM
rpm -ivh /usr/src/redhat/RPMS/i386/rdiff-backup-1.0.4-1.rf.i386.rpm
RDiff backups and restores
Contents
Restore stuff
On the machine the backups are on: eg Restore the iptables file from 2 days ago on VPN then scp to G8Keeper
rdiff-backup -r 2D /backups/integr8it/g8keeper/etc/sysconfig/iptables /tmp/g8
scp /tmp/g8 root@g8keeper.integr8it.net:/etc/sysconfig/iptables
-source and target machines need to be using the same rdiff-backup version
-remote backups:
WD - radius backups up hosting
MTN - pinpoint2 backups up pinpoint1
Adding Servers to Synaq backups (vpn.synaq.com)
VPN server runs rdiff-backup 0.12.7 and so must any target host
On some hosts you may have to also install librsync when using the rpm
(centos here: http://centos.karan.org/el4/extras/stable/i386/RPMS/repodata/repoview/li...)
For independant backups (like MTN pinpoint1 backs up to pinpoint2) you can use yum to upgrade to the latest version. As long as the source and target hosts run the same
version of rdiff-backup.
-ssh vpn.synaq.com
-cd /backups
-mkdir scripts/newserver
-copy existing scripts from another routine eg
cp /backups/scripts/mailg8/* /backups/scripts/newserver
-edit the backup.sh to change server name from mailg8
vi /backup/scripts/newserver/backup.sh and backup-debug.shcurrent_mirror.2006-11-03T01\:20\:09+02\:00.data
-Check the includes.txt and excludes.txt
-Copy the id-dsa.pub from VPN to the new servers' authorised keys:
scp /root/.ssh/id-dsa.pub root@newserver:/root/.ssh/vpn
-log into newserver and add the key:
cat /root/.ssh/vpn >> /root/.ssh/authorized_keys2
-On the VPN box check out then edit then restart the crontab:
crontab -l
crontab -e
/etc/init.d/crond restart
-Copy the rdiff package to the newserver and install (assuming Centos)
scp rdiff-backup-0.12.7-1.i386.rpm newserver:/usr/local/src/
rpm -ivh rdiff-backup-0.12.7-1.i386.rpm
-Test the VPN box rdiff to the newserver
rdiff-backup --test-server newserver::/ignored
-If the servers are remote like MTN where they backup to each other not VPN then get the reports still sent to VPN appended to the report
For some reason rdiff-backup failed while backing up. Now every time it runs it says "regressing destination" and then fails again. What should I do?
Firstly, this shouldn't happen. If it does, it indicates a corrupted destination directory, a bug in rdiff-backup, or some other serious recurring problem.
However, here is a workaround that you might want to use, even though it probably won't solve the underlying problem: In the destination's rdiff-backup-data directory, there
should be two "current_mirror" files, for instance:
current_mirror.2003-09-07T16:43:00-07:00.data
current_mirror.2003-09-08T04:22:01-07:00.data
Delete the one with the earlier date. Also move the mirror_metadata file with the later date out of the way, because it probably didn't get written correctly because that session
was aborted:
RDIFF backup and restores - Technical Support - ... http://wiki.synaq.com/display/Technical/RDIFF+ba...
1 of 2 09/03/2008 05:55 PM
mv mirror_metadata.2003-09-08T04:22:01-07:00.snapshot.gz aborted-metadata.2003-09-08T04:22:01-07:00.snapshot.gz
The next time rdiff-backup runs it won't try regressing the destination. Metadata will be read from the file system, which may result in some extra files being backed up, but there
shouldn't be any data loss.
Fatal Error: Bad rdiff-backup-data dir on destination side
The rdiff-backup data directory
/var/www/html-backup/rdiff-backup-data
exists, but we cannot find a valid current_mirror marker. You can
avoid this message by removing this directory; however any data in it
will be lost.
The problem was caused by an empty file that went missing
The solution:
touch /var/www/html-backup/rdiff-backup-data/current_mirror.2004-02-29T00:13:23-08:00.dataOne to one backups
One to one backups to external source
1. Create the necessary directories on external machine
# rsync -a --partial --progress /shares --rsh=ssh root@192.168.0.15:/backup/support/shares