Re: Backup advice

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello

I use FreeBSD 6.x and do a snapshot on full file system. Here is my
script which I use:

#!/bin/sh


# Cyrus, Sasl, Apache, APC, fwanalog, majordomo, Squirrelmail etc.
/bin/cp -R /usr/local/etc /usr/backup/usr/local
/bin/cp -R /usr/local/www /usr/backup/usr/local
/bin/cp -R /usr/local/majordomo /usr/backup/usr/local
/bin/cp /usr/local/sbin/fw* /usr/backup/usr/local/sbin
/bin/cp -R /var/spool/squirrelmail /usr/backup/var/spool

# Kopiert eine Kopie von sasldb2.db
/bin/cp /usr/local/etc/sasldb2.db /usr/home/martin
/usr/sbin/chown martin:wheel /usr/home/martin/sasldb2.db


# Erstellt eine Klartext-Datei von Cyrus mboxlist

/usr/bin/su cyrus -c '/usr/local/cyrus/bin/ctl_mboxlist -d > /tmp/mailboxes.txt'
/bin/cp /tmp/mailboxes.txt /usr/backup

# Erstellt den Snapshot
/sbin/mksnap_ffs /usr /usr/snap

# Mountet den Snapshot
/sbin/mdconfig -a -t vnode -f /usr/snap -u 4
/sbin/mount -r /dev/md4 /mnt

/usr/bin/tar -cjf /usr/backup/cyrus.tar.bz2 /mnt/imap
# /usr/bin/tar -cjf /usr/backup/cyrus2.tar.bz2 /var/imap

# Löst /mnt wieder auf
/sbin/umount /mnt
/sbin/mdconfig -d -u 4

# Löscht den Snapshot
/bin/rm -f /usr/snap

exit 0

Regards,


2007/10/26, Dmitriy Kirhlarov <dimma@xxxxxxxx>:
> Nikos Gatsis wrote:
> > I had to be more specific.
> > I need advices for backing up cyrus emails...
>
> My solution is:
> 1. Some tuning for Berkley DB confg:
> [root@mail ~]# cat /var/imap/db/DB_CONFIG
> set_lg_max 104857600
> set_lg_bsize 204800
> set_lg_regionmax 409600
> set_cachesize 0 5120000 2
>
> 2. regular dump of mbox list:
> [root@mail ~]# grep mbox /usr/local/etc/cyrus.conf
>    mboxlist      cmd="ctl_mboxlist.sh" period=60
> [root@mail ~]# cat /usr/local/cyrus/bin/ctl_mboxlist.sh
> #!/bin/sh
>
> /usr/local/cyrus/bin/ctl_mboxlist -d > /var/imap/mboxlist.dump
>
> 3.backing up /var/imap/mboxlist.dump to cvs with
> ftp://segfault.kiev.ua/pub/cvsbackup.pl
> ftp://segfault.kiev.ua/pub/cvsbackup.cf.sample
>
> 4. backing up mail spool with http://www.rsnapshot.org
>
> 5. Also, I using replication (sync_{client,server}) for
> ----
> Cyrus Home Page: http://cyrusimap.web.cmu.edu/
> Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
> List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
>


-- 
Martin Schweizer
schweizer.martin@xxxxxxxxx
Tel.: +41 32 512 48 54 (VoIP)
Fax: +1 619 3300587
----
Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


[Index of Archives]     [Cyrus SASL]     [Squirrel Mail]     [Asterisk PBX]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [KDE]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux