Hi,

Ok, here are the scripts. I've used them to migrate backuppc with all
data from one server to another. Put both scripts in /var/lib/backuppc.
Make sure both are executable for the backuppc user.
Note on pathnames: I'm running Debian, other distro's may have stuff in
different places.
First copy /etc/backuppc from the old server to the new. Then start
backuppc. This should create the whole /var/lib/backuppc/pc/<machine>
tree. If this tree isn't there after starting, you can change the for
loop in the shell script to something like
for i in `grep -v ^# /etc/backuppc/hosts | cut -f1`
and add a
mkdir /var/lib/backuppc/pc/$i
just before the
cd /var/lib/backuppc/pc/$i
in the final if statement.

Then stop backuppc. 
Now use regular rsync to transfer the contents
in /var/lib/backuppc/pc/<machine>/ for 1 machine from the old server to
the new. This is done by installing an rsync daemon on the old machine
with a sharename "remotebackup" which maps to /var/lib/backuppc. When
this is complete, recreate the hardlinks the same way the link script
does when a backup is complete. Then go to the next machine, etc etc.
The shellscript runs the whole show. Be sure to modify it according to
your needs (correct UID for the backuppc user, IP address of the old
server, various paths).
Run the shellscript in a screen (if you prefer), sit back and let it do
its work.
It prints which backup it's processing so you can follow the progress.
It may take several days, depending on the size of your installation.
Stop backuppc on both servers when you're running this, because I think
stuff may go wrong if backuppc starts doing backups while this is
running.

Have fun!

Regards,

-- 
Guus Houtzager                           Email: [EMAIL PROTECTED]
PGP fingerprint = 5E E6 96 35 F0 64 34 14  CC 03 2B 36 71 FB 4B 5D
Early to rise, early to bed, makes a man healthy, wealthy and dead.
        --Rincewind, The Light Fantastic

Attachment: make_hardlinks.pl
Description: Perl program

Attachment: syncbackuppc.sh
Description: application/shellscript

Reply via email to