Hi, > Hi to all, > > I was wondering, what is happening in case of system > failuire, for ex: if we loose all data from the HDD. > > I backup-ed the mysql database, configuration files and > /var/spool/imap folder and /var/lib/sieve for the sieve scripts. > > Now, my main question is: How to restore the saved emails, > and recreate the accounts from the existing database. Is > there a script or something that does this? For the emails > (/var/spool/imap folder) probably will work a simple copy, > but what about the email accounts??
I've two machines, one in prodction, one for backup and on the first one two scripts, the first is running hourly: /usr/local/mysql/bin/mysqldump -A -c --create-options -u root --password=xxx > mysqldump_all_`date '+%Y-%m-%d-%H'` /usr/local/mysql/bin/mysqldump -c -n -t --create-options -u root --password=xxx mail > mysqldump_mail_`date '+%Y-%m-%d-%H'` tar cfz mysqldump_all_`date '+%Y-%m-%d-%H'`.tar.gz mysqldump_all_`date '+%Y-%m-%d-%H'` tar cfz mysqldump_mail_`date '+%Y-%m-%d-%H'`.tar.gz mysqldump_mail_`date '+%Y-%m-%d-%H'` rm -f mysqldump_all_`date '+%Y-%m-%d-%H'` rm -f mysqldump_mail_`date '+%Y-%m-%d-%H'` rsync -qrpog -e ssh /var/spool/imap [EMAIL PROTECTED]:/var/spool rsync -qrpog -e ssh /var/imap [EMAIL PROTECTED]:/var rsync -qrpog -e ssh /usr/sieve [EMAIL PROTECTED]:/usr rsync -qrpog -e ssh /usr/local/mysql/var/mail [EMAIL PROTECTED]:/usr/local/mysql/var And one every day: tar cfz /root/backup/web-cyradm_htdocs_`date '+%Y-%m-%d'`.tar.gz usr/local/httpd/htdocs/web-cyradm tar cfz /root/backup/configs_`date '+%Y-%m-%d'`.tar.gz etc/postfix/* etc/amavis* usr/local/httpd/conf etc/imapd.conf etc/cyrus.conf su - cyrus -c "/usr/cyrus/bin/ctl_mboxlist -d > /usr/cyrus/dump/mboxdump_`date '+%Y-%m-%d'`" tar cfz /root/backup/cyrus_`date '+%Y-%m-%d'`.tar.gz usr/cyrus/dump/mboxdump_`date '+%Y-%m-%d'` usr/sieve var/imap var/spool/imap rsync -qrpog -e ssh /usr/local/httpd/htdocs/web-cyradm [EMAIL PROTECTED]:/usr/local/httpd/htdocs When I start all services on the backup machine everything works fine. Michael _______________________________________________ This mailing list is hosted and supported by bit-heads GmbH | http://www.bit-heads.ch _______________________________________________ Web-cyradm mailing list [email protected] http://www.web-cyradm.org/mailman/listinfo/web-cyradm
