Need a good script to save kolab online.

Alexander Gran alexg at moduleworks.com
Tue May 25 17:37:54 CEST 2010


Hi,

Im using the following combination of scripts:

rsback for / of the server.
Then stopping ldap&cyrus,snapshoting /var, starting again:
/etc/init.d/kolab-cyrus stop
/etc/init.d/slapd stop
lvcreate  -s --name varsnap --size 1g /dev/main/var
/etc/init.d/slapd start
/etc/init.d/kolab-cyrus start
mount -o nouuid,ro /dev/main/varsnap /varsnap
Then rsync from /varsnap to the backup destination's /var.
In my case that is
rsync --exclude-from=/etc/rsback/rsback.exclude --stats  --partial 
--numeric-ids -r -H -e ssh -al --delete --delete-excluded  -W -v 
hostname:/varsnap/* /backup/hostname/daily.1/var/
And afterwards removing the snapshot with
umount /varsnap
lvremove -f /dev/main/varsnap
again.

That way I have only a few seconds donwtime.
If you use OpenPKG your paths will vary, but basically things should 
work the same way.

Some people just backup selected files, like a text dump of the 
mailbox database etc. But I don't like that idea for several 
reasons:

a.) Storage is cheap. Backing up an additional GB (especially when 
doing incremental backups) costs roughly nothing.
b.) KISS. When I backup everything I cannot miss something.
c.) Restore of a complete crash is very simple. Just rsync back 
(maybe booting from CD), call grub/lilo, reboot, done.
d.) In case I need the textdump (i.e. version change) and the system 
is chrashed, I can use virtualisation or chroot to get it from the 
backup system anyway.


regards
Alex


-- 

Dipl. Inform. Alexander Gran, MBA
alexg at moduleworks.com
http://www.moduleworks.com
SkypeID: mw_alexg
M: +49(0)163/5598933  

ModuleWorks GmbH
Ritterstraße 12a
52072 Aachen
HRB 11871
Amtsgericht Aachen
Geschäftsführer Yavuz Murtezaoglu

This message is for the designated recipient only and may contain
privileged, proprietary, or otherwise private information.
If you have received it in error, please notify the sender 
immediately
and delete the original.
Any other use of the email by you is prohibited.




More information about the users mailing list