Hi Leon,

There is (one of many) way(s) how you can perfom a backup:

This script is only for the mailboxes (/var/spool/mail/imap in my case) and the files in /var/imap (for example: mailboxes.db)

<script>
#/bin/bash

#first do an unstable copy  (just to reduce the downtime of cyrus later)

        tmplog=/root/backupdir/tmpimaplog

        echo "start backup of imap..." >> $tmplog 2>&1

        echo "rsync of /var/imap" >> $tmplog 2>&1
rsync -a --delete /var/imap /raid/mail_backup/tmpstore/varimap/ \ >> $tmplog 2>&1

        echo "rsync of /raid/mail/imap" >> $tmplog 2>&1
        rsync -a --delete /var/spool/mail/imap \
        /raid/mail_backup/tmpstore/varspoolimap/ >> $tmplog 2>&1


#now we do an rsync to "stabilize" the backup

#shut down cyrus
echo "stopping cyrus" >> $tmplog 2>&1
/usr/local/bin/cyrus stop >> $tmplog 2>&1


#sync with rsync to get a 'stable' backup

#
rsync -a --delete /var/imap /raid/mail_backup/tmpstore/varimap/ >> $tmplog 2>&1

rsync -a --delete /var/spool/mail/imap \ /raid/mail_backup/tmpstore/varspoolimap/ >> $tmplog 2>&1

#start cyrus
echo "starting cyrus..." >> $tmplog 2>&1
/usr/local/bin/cyrus start >> $tmplog 2>&1



#finally we move the whole temporary backup of the disk onto a tape:
#(requires an own script)

#do the rest... (like a normal backup, but with the archived paths in imap.list

echo "starting rest of backup..." >> $tmplog 2>&1

/root/backupdir/backup_imap

echo "...done." >> $tmplog 2>&1

# clean the temporary directory
rm -Rf /raid/mail_backup/tmpstore/*

</script>


I hope you can use it... If you have questions just feel free to ask.

best regards,

Vittorio




[EMAIL PROTECTED] wrote:
Hello All,
Could you please point me to some good tutorial/manual on how to backup and restore Cyrus DB and mailboxes. Best Regards,
Leon Kolchinsky


------------------------------------------------------------------------

----
Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html

--
____________________________________________________

Muth Vittorio . System Administration
Hyperwave R&D GmbH . Albrechtgasse 9 . A-8010 Graz

t: +43.316.820.918.607  f: +43.316.820.918.99
m: [EMAIL PROTECTED]  w: http://www.hyperwave.com
____________________________________________________

----
Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html

Reply via email to