Hallo all
I have been trying to get LVM2 snapshot backups working here for a couple of days now.
I suspect my problem is more bash related than rdiff-backup related :-)
On my target server I have the following in /root/.ssh/authorized_keys
command="/usr/local/bin/backup-zimbra-to-lnxbck01",from="05rnb-lnxbck01.test.com",no-port-forwarding,no-X11-forwarding,no-pty
The backup-zimbra-to-lnxbck01 script looks like this.
---------------------------------------
#!/bin/bash
export PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
# Stop Zimbra
/etc/init.d/zimbra stop
# Take LVM snapshot
lvcreate -L5000M -s -n zmb_snapshot /dev/zimbra/lvol0
mount /dev/zimbra/zmb_snapshot /mnt/zimbra-snapshot/
# Start Zimbra
/etc/init.d/zimbra start
# Rdiff-backup the Snapshot
exec /usr/local/bin/rdiff-backup --server --restrict-read-only /mnt/zimbra-snapshot/
# Stop the LVM snapshot
umount /mnt/zimbra-snapshot/
lvremove -f /dev/zimbra/zmb_snapshot
---------------------------------------
My cron job on the backup server looks like this.
@daily rdiff-backup 05rnb-zmb02::/mnt/zimbra-snapshot /home/backups/05rnb-zmbtest
Now when I hash out all the LVM stuff and just copy files into /mnt/zimbra-snapshot/ it works perfectly, running the script as it is shown here
I get the following errors in my /var/log/messages
Sep 28 00:00:02 05rnb-lnxbck01 python: abrt: detected unhandled Python exception in /usr/bin/rdiff-backup
Sep 28 00:00:02 05rnb-lnxbck01 abrtd: dumpsocket: New client connected
Sep 28 00:00:02 05rnb-lnxbck01 abrtd: dumpsocket: Saved Python crash dump of pid 16970 to /var/spool/abrt/pyhook-1317160802-16970
Sep 28 00:00:02 05rnb-lnxbck01 abrtd: Directory 'pyhook-1317160802-16970' creation detected
Sep 28 00:00:02 05rnb-lnxbck01 abrtd: Crash is in database already (dup of /var/spool/abrt/pyhook-1316728802-1793)
Sep 28 00:00:02 05rnb-lnxbck01 abrtd: Deleting crash pyhook-1317160802-16970 (dup of pyhook-1316728802-1793), sending dbus signal
Sep 28 00:00:02 05rnb-lnxbck01 abrtd: dumpsocket: Socket client disconnected
What am I doing wrong?
Stefaans Mostert
Bytes Connect Back Office Engineer
Bytes Connect - Back Office
Tel: +27112895317 Mobile: +27844634590 Email: address@hidden
Website: www.multichoice.co.za
“MultiChoice Africa (Pty) Ltd is an authorized financial services provider. FSP license number 11514.” THINK GREEN - CONSIDER THE ENVIRONMENT BEFORE PRINTING THIS EMAIL.