Koozali.org: home of the SME Server
Legacy Forums => Experienced User Forum => Topic started by: Karl Ponsonby on September 08, 2002, 07:29:16 PM
-
Can anbody shed some light on a way to make a sme5.5 box backup another linux server during the backup. I've modded the flexbackup.conf and mounted the shares into the file system, but it fails on accessing the shares. I've also tried as a machine backup ie server1:/stuff, but it fails on ssh access.What user does the backup script run as, so as i maybe able to bypass the ssh password request.
thanks,
Karl
-
Karl,
I approached this a different way - I rsync my test server to my production box in advance of the scheduled backup. My script is as follows:
#!/bin/bash
ssh -i /root/.ssh/identity 192.168.0.2 '/sbin/e-smith/signal-event mysql-delete-dumps > /dev/null 2>&1'
ssh -i /root/.ssh/identity 192.168.0.2 '/sbin/e-smith/signal-event mysql-dump-tables > /dev/null 2>&1'
rsync -auvz --exclude /proc/ --exclude /dev/ --rsh="ssh -i /root/.ssh/identity" 192.168.0.2:/ /root/bertie_backup
This uses the built-in MySQL dump routines, then rsyncs to a directory tree under my /root directory. I generated keys so bypass the need for passwords. "man ssh-keygen" will tell you how that's done.
Des Dougan
-
Hi Des,
So if I understand you, you basically run a copied version of data from your test server to your production server, in a directory under /root. I have managed to have a go at network backup using server1:/stuff in a test setup using manual entry for the keys, but it fails with a broken pipe, although the regular backup works. I am battling with the ssh-keygen idea, if you can spare me some time, could you please elaborate on this a bit more.
Thanks for your reply and help,
Karl
-
Karl,
I ran ssh-keygen -t rsa1 on my production box and then copied the public part to the other server, per the man page. I then set up and tested the script that I posted previously and then set up a cron job to run it. It took a while to understand how the keygen works, but it is more straightforward than I thought initially. Email me off-list if you need more help.
Des