Hello Bas,
> At the xen-users mailinglist I saw you use LVM2 snapshotting for your
> Xen DomU''s. You said you have a script that covers errors. Could
you
> please send me your backup script or point me in the right direction?
> Also, which versions do you use (kernel, xen, etc)?
I nearly forgot you, sorry! Here is my script. It''s anything but
beautiful (the reader can change that and post it back here) but it does
it''s job.
System: Debian Etch
Xen: 3.0.2-3 (xen-3.0-x86_32)
Kernel: 2.6.16-2-xen-k7
LVM version: 2.02.06 (2006-05-12)
Library version: 1.02.08 (2006-07-17)
Driver version: 4.5.0
Please note: rdiff-backup will only be started, if there is a file
called ''backup'' in the partition''s root directory.
cu cp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#!/bin/sh
broot=/backup
vg=/dev/xenlvm
p="--print-statistics"
for h in $vg/*-disk
do
d=`echo $h | awk -F''/'' ''{print
$3"/"$4}''`
echo -n "$d ... "
date
if lvcreate -l 10 --snapshot --name snap $h
then mount $vg/snap /mnt
fi
if [ $? -eq 0 ]
then
if [ -f /mnt/backup ]
then /usr/bin/rdiff-backup $p $* /mnt/ $broot/$d/
else echo "NOTE: I should not backup this one!"
fi
else echo "ERROR: Snapshot wasn''t mountable!"
fi
sleep 1
umount /mnt
sleep 1
lvremove -f $vg/snap
sleep 1
echo
/usr/bin/rdiff-backup --remove-older-than 4W $broot/$h/
echo "________________________________________________________"
echo
done
date
_______________________________________________
Xen-users mailing list
Xen-users@lists.xensource.com
http://lists.xensource.com/xen-users