Re: how to backup a cyrus server?
On Dec 4, 2006, at 6:42 PM, Andrew Morgan wrote: On Mon, 4 Dec 2006, Rafael Mahecha wrote: [...] I used to use tivoli to backup the old server (which was ok since no data bases were involved)... but since cyrus has databases and such, I am concern about file-locking and database corruption. What is the best way to back up the server? shutdown cyrus for a while, then snap shot it, and then back up to tivoli or should I just be able to back up the running server directly to tivoli? what other software can I use to backup? Check out the Cyrus Wiki page at: http://cyrusimap.web.cmu.edu/twiki/bin/view/Cyrus/Backup Most people just make a regular backup of the filesystem using whatever tools they normally use. The only trick is to export your mailboxes.db to a flat text file in order to back it up (which you should be doing periodically anyways). [...] We're using TSM for backups. The Wiki notes using LVM snapshots so we ended up doing that. We have a pre-backup script that does the ctl_mboxlist -d for a text mailboxes file, ctl_cyrusdb -c to checkpoint, a sync, and then a lvcreate --snapshot --size 10G --name lv_cyrus_snapshot /dev/vg_cyrus/lv_cyrus. We then mount the snapshot and back it up normally with TSM. Haven't had a lot of restore experience but testing worked out OK. 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
Re: how to backup a cyrus server?
I chose that number based on scientific total lack of clue. Also, that was the nearest round number of space left over in the cyrus VG (~68G). I take it I overestimated a little :) On Dec 5, 2006, at 9:02 AM, Guus Leeuw jr. wrote: I am just wondering why in the world you are using 10G for your snapshot? This is 10G worth of snapshot bitmap + changes to the source while the snapshot is active. Hence you either have a *large* source, or a very *active* mail system...? Just my $0.02, Guus -Original Message- From: [EMAIL PROTECTED] [mailto:info-cyrus- [EMAIL PROTECTED] On Behalf Of Nik Conwell Sent: 05 December 2006 12:05 To: Cyrus User's Mailing List Subject: Re: how to backup a cyrus server? ctl_mboxlist -d for a text mailboxes file, ctl_cyrusdb -c to checkpoint, a sync, and then a lvcreate --snapshot --size 10G --name lv_cyrus_snapshot /dev/vg_cyrus/lv_cyrus. We then mount the snapshot 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
FW: how to backup a cyrus server?
-Original Message- From: Guus Leeuw jr. [mailto:[EMAIL PROTECTED] Sent: 05 December 2006 15:03 To: 'Nik Conwell'; 'Cyrus User's Mailing List' Subject: RE: how to backup a cyrus server? Normally, LVM builds a bitmap indicating which raw blocks it has to copy. If the bit is down, it reads the block from the source, if the bit is down, It reads the block from its own buffer area stored in the snapshot. The copy-before-write technique guarantees validity of both the snap and the source. Now, depending on the implementation, LVM either takes a bit per physical extend, or per disk block. For sake of calculations, a per disk block guess is better... ;) So 10G source equals 10485760K source. Divide by 4 (normal disk block == 4K) equals 2621440K. Divide by 8 (every source block needs 1 bit) equals 327680. 327680K equals 320M. Now this won't allow the source to be changed, so pop it up to the next round number, say 1G, and that's all you need. Why this more accurate snapshot-sizing? This way you don't have to make sure your vg always has 10GB available! You can snap with far less than that! In your situation you can probably still snap all the while the vg is used for about 62GB... I normally use chunks of 200M for my snapshots in an doubling fashion; that is, if the lvcreate --snapshot -L${size}M fails, I use 400M, then 800M, etc. Just to let you know, Guus -Original Message- From: [EMAIL PROTECTED] [mailto:info-cyrus- [EMAIL PROTECTED] On Behalf Of Nik Conwell Sent: 05 December 2006 14:17 To: Cyrus User's Mailing List Subject: Re: how to backup a cyrus server? I chose that number based on scientific total lack of clue. Also, that was the nearest round number of space left over in the cyrus VG (~68G). I take it I overestimated a little :) On Dec 5, 2006, at 9:02 AM, Guus Leeuw jr. wrote: I am just wondering why in the world you are using 10G for your snapshot? This is 10G worth of snapshot bitmap + changes to the source while the snapshot is active. Hence you either have a *large* source, or a very *active* mail system...? Just my $0.02, Guus -Original Message- From: [EMAIL PROTECTED] [mailto:info-cyrus- [EMAIL PROTECTED] On Behalf Of Nik Conwell Sent: 05 December 2006 12:05 To: Cyrus User's Mailing List Subject: Re: how to backup a cyrus server? ctl_mboxlist -d for a text mailboxes file, ctl_cyrusdb -c to checkpoint, a sync, and then a lvcreate --snapshot --size 10G --name lv_cyrus_snapshot /dev/vg_cyrus/lv_cyrus. We then mount the snapshot -- No virus found in this outgoing message. Checked by AVG. Version: 7.5.432 / Virus Database: 268.15.7/569 - Release Date: 05/12/2006 03:00 -- No virus found in this outgoing message. Checked by AVG. Version: 7.5.432 / Virus Database: 268.15.7/569 - Release Date: 05/12/2006 03:00 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
how to backup a cyrus server?
I recently moved all my users from proprietary wemail (using local sendmail) to latest cyrus and sendmail using lmtp. I used to use tivoli to backup the old server (which was ok since no data bases were involved)... but since cyrus has databases and such, I am concern about file-locking and database corruption. What is the best way to back up the server? shutdown cyrus for a while, then snap shot it, and then back up to tivoli or should I just be able to back up the running server directly to tivoli? what other software can I use to backup? Thanks : Rafael Mahecha Email / Systems Administrator JSU OIM - Web Services [EMAIL PROTECTED] http://www.jsums.edu : 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
Re: how to backup a cyrus server?
On Mon, 4 Dec 2006, Rafael Mahecha wrote: I recently moved all my users from proprietary wemail (using local sendmail) to latest cyrus and sendmail using lmtp. I used to use tivoli to backup the old server (which was ok since no data bases were involved)... but since cyrus has databases and such, I am concern about file-locking and database corruption. What is the best way to back up the server? shutdown cyrus for a while, then snap shot it, and then back up to tivoli or should I just be able to back up the running server directly to tivoli? what other software can I use to backup? Check out the Cyrus Wiki page at: http://cyrusimap.web.cmu.edu/twiki/bin/view/Cyrus/Backup Most people just make a regular backup of the filesystem using whatever tools they normally use. The only trick is to export your mailboxes.db to a flat text file in order to back it up (which you should be doing periodically anyways). It is probably not worth the downtime to actually shutdown Cyrus in order to get a consistent backup of the entire mail spool. So what if a few files change while the backup is happening? Unless you have really unreliable hardware, you'll create more downtime doing the backups than you'll ever prevent by having a consistent backup. :) Andy 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
RE: how to backup a cyrus server?
I have found a link to a process that might be helpful: http://cyrusimap.web.cmu.edu/twiki/bin/view/Cyrus/Backup Aside from this, we have done it the old fashion way: tar zip on a live system late at night. We just had a major server failure on 10/25/2006 which we were able to recover from. Since this worked we most likely will go with this (Knock on wood), but the above is a bit more streamlined (rsync). -Bob From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Rafael Mahecha Sent: Monday, December 04, 2006 4:50 PM To: info-cyrus@lists.andrew.cmu.edu Subject: how to backup a cyrus server? I recently moved all my users from proprietary wemail (using local sendmail) to latest cyrus and sendmail using lmtp. I used to use tivoli to backup the old server (which was ok since no data bases were involved)... but since cyrus has databases and such, I am concern about file-locking and database corruption. What is the best way to back up the server? shutdown cyrus for a while, then snap shot it, and then back up to tivoli or should I just be able to back up the running server directly to tivoli? what other software can I use to backup? Thanks : Rafael Mahecha Email / Systems Administrator JSU OIM - Web Services [EMAIL PROTECTED] http://www.jsums.edu : 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
RE: Tutorial on how to backup/restore cyrus
I don't completely agree here, there are ways to do snapshots without any downtime for example in a SAN environment or using filesystem or LVM based snapshot methods. However, it does not mean your snapshots are really consistent from the aplications point of view. And that's the big question: How inconsistent can things be without shutting down cyrus? I think nobody can really tell you. There are several possible inconsistencies which depend on how you are doing snapshots or backups and what filesystem you are using. However, exactly the same inconsistencies will show up when your box crashes (kernel panic, power failure) and properly configured systems should survive this without loosing much. Of course, one has to make sure that the obvious is properly configured like for example disabling raid/disk write caches with no battery backup or making sure that the OS/filesystem really writes data out to the disk when the application thinks it has been written. It's not always an easy task and you will usually loose some performance by disabling those dangerous tuning things. Simon 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
RE: Tutorial on how to backup/restore cyrus
On Mon, 2005-09-19 at 17:48 +0300, [EMAIL PROTECTED] wrote: Thank you Vittorio for your script, but you are stopping the cyrus and I think it's very problematic in production environment. I think the point is that, short of using some of the replication stuff from pre-2.3 in CVS, there's no proper way of doing a hot backup. All of the snapshotting techniques (whether filesystem snapshots, rsync or otherwise) require a little bit of downtime to complete, but are employed *specifically* to minimize downtime. I don't completely agree here, there are ways to do snapshots without any downtime for example in a SAN environment or using filesystem or LVM based snapshot methods. However, it does not mean your snapshots are really consistent from the aplications point of view. Simon 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
RE: Tutorial on how to backup/restore cyrus
Hello All, Thanks for all responses. After reading your posts on the issue and reading some more stuff, I'll make a summary below: 1) I'll make a dump of all mailboxes to the text file: su - cyrus -c ctl_mboxlist -d /var/lib/imap/mailboxlist.txt And I can restore it with: su - cyrus -c ctl_mboxlist -u /var/lib/imap/mailboxlist.txt 2) I will make a regular backups (in my case with DSM client) of /var/spool/imap/ and /var/lib/imap/, without stopping cyrus, in this case I endanger myself in some data inconsistency and maybe some e-mails lost (which were in process while backup was running). Please correct me on the above if there are some other dangers I'm not aware of??? 3) In case of disaster I can just copy mail directly from the backup to the mail store directory (/var/spool/imap/user/%username%), And run: /usr/lib/cyrus/bin/reconstruct -rf user/username 4) All quotas (in /var/lib/imap/quota/%firstletter of username%/)will not be reconstructed, so I'll need to do it manually. 5) All subscription and seen info (in /var/lib/imap/user/%firstletter of username%/) will not be reconstructed, but I could restore it from the regular backup. Please read my summary and tell me if the things right? Should I be aware of other things I didn't mentioned here and what scripts to implement for this case? Best Regards, Leon Kolchinsky -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Wil Cooley Sent: Tuesday, September 20, 2005 1:03 AM To: info-cyrus@lists.andrew.cmu.edu Subject: RE: Tutorial on how to backup/restore cyrus On Mon, 2005-09-19 at 17:48 +0300, [EMAIL PROTECTED] wrote: Thank you Vittorio for your script, but you are stopping the cyrus and I think it's very problematic in production environment. I think the point is that, short of using some of the replication stuff from pre-2.3 in CVS, there's no proper way of doing a hot backup. All of the snapshotting techniques (whether filesystem snapshots, rsync or otherwise) require a little bit of downtime to complete, but are employed *specifically* to minimize downtime. Wil -- Wil Cooley [EMAIL PROTECTED] Naked Ape Consulting, Ltd. http://nakedape.cc 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
RE: Tutorial on how to backup/restore cyrus
I don't completely agree here, there are ways to do snapshots without any downtime for example in a SAN environment or using filesystem or LVM based snapshot methods. However, it does not mean your snapshots are really consistent from the aplications point of view. And that's the big question: How inconsistent can things be without shutting down cyrus? John -- John Madden UNIX Systems Engineer Ivy Tech Community College of Indiana [EMAIL PROTECTED] 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
RE: Tutorial on how to backup/restore cyrus
On Tue, 20 Sep 2005, John Madden wrote: I don't completely agree here, there are ways to do snapshots without any downtime for example in a SAN environment or using filesystem or LVM based snapshot methods. However, it does not mean your snapshots are really consistent from the aplications point of view. And that's the big question: How inconsistent can things be without shutting down cyrus? How consistent does it need to be? We dump the mailboxes.db to a flat file at midnight, then start a regular filesystem backup of the system. In the event of a complete system failure or disaster recovery, our plan is to restore everything from the latest backup then (most likely) rebuild the mailboxes.db from the flat file. Our mail store is on a SAN, so it seems unlikely that we'll ever reach this point unless the building falls down. The more common case is individual mailbox restores. I do a fair amount of mailbox restores at the request of users that have accidently deleted a message. I simply create a new subfolder in the user's INBOX named RESTORE and recover all the message files and the cyrus.header file into it. Then I run reconstruct and quota on the mailbox to fix things up. This has always worked without fail for me. Andy 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
RE: Tutorial on how to backup/restore cyrus
Hello again. Is it really no one on the list can suggest me some backup/restore howto for Cyrus mailboxes? I believe that there are someguys on the list who can help. So please be so nice to answer me. Best Regards, Leon Kolchinsky From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]Sent: Sunday, September 18, 2005 12:44 PMTo: info-cyrus@lists.andrew.cmu.eduSubject: Tutorial on how to backup/restore cyrus 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
RE: Tutorial on how to backup/restore cyrus
--On Monday, September 19, 2005 02:00:14 PM +0300 [EMAIL PROTECTED] wrote: Is it really no one on the list can suggest me some backup/restore howto for Cyrus mailboxes? I believe that there are some guys on the list who can help. So please be so nice to answer me. As a start you could look at: http://acs-wiki.andrew.cmu.edu/twiki/bin/view/Cyrus/Backup Didi -- - Didi Rieder [EMAIL PROTECTED] PGPKey ID: 3431D0B0 - pgpjCZ3c4MKiU.pgp Description: PGP signature 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
Re: Tutorial on how to backup/restore cyrus
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 21 echo rsync of /var/imap $tmplog 21 rsync -a --delete /var/imap /raid/mail_backup/tmpstore/varimap/ \ $tmplog 21 echo rsync of /raid/mail/imap $tmplog 21 rsync -a --delete /var/spool/mail/imap \ /raid/mail_backup/tmpstore/varspoolimap/ $tmplog 21 #now we do an rsync to stabilize the backup #shut down cyrus echo stopping cyrus $tmplog 21 /usr/local/bin/cyrus stop $tmplog 21 #sync with rsync to get a 'stable' backup # rsync -a --delete /var/imap /raid/mail_backup/tmpstore/varimap/ $tmplog 21 rsync -a --delete /var/spool/mail/imap \ /raid/mail_backup/tmpstore/varspoolimap/ $tmplog 21 #start cyrus echo starting cyrus... $tmplog 21 /usr/local/bin/cyrus start $tmplog 21 #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 21 /root/backupdir/backup_imap echo ...done. $tmplog 21 # 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 RD 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
RE: Tutorial on how to backup/restore cyrus
Zitat von [EMAIL PROTECTED]: Hello again. Is it really no one on the list can suggest me some backup/restore howto for Cyrus mailboxes? I believe that there are some guys on the list who can help. So please be so nice to answer me. As a starting point have a look at http://acs-wiki.andrew.cmu.edu/twiki/bin/view/Cyrus/Backup Regards Andreas 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
Re: Tutorial on how to backup/restore cyrus
Hi Leon, [EMAIL PROTECTED] schrieb: A) So if anyone have some scripts with the snapshot feature who can share them, it would be nice to see them here. B) Also any scripts with the minimal downtime for the cyrus are welcomed. C) Any snapshot techniques (on reiserfs) are also very interesting and I like to here them. in early June, there were several messages on this list with the subject backup without stopping the imap server? I haven't read them all but perhaps you find somethinb usefil in these mails. Klaus 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
RE: Tutorial on how to backup/restore cyrus
I currently use kolab which uses cyrus/postfix/ldap. They have a pretty good overview on their wiki in maintence section. Http://wiki.kolab.org I'd start there... And post specific questions to the list. -kevin -Original Message- From: [EMAIL PROTECTED] Subj: RE: Tutorial on how to backup/restore cyrus Date: Mon 2005 Sep 19 4:00 am Size: 1K To: [EMAIL PROTECTED], info-cyrus@lists.andrew.cmu.edu Hello again. Is it really no one on the list can suggest me some backup/restore howto for Cyrus mailboxes? I believe that there are someguys on the list who can help. So please be so nice to answer me. Best Regards, Leon Kolchinsky From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Sund --- message truncated --- 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
Tutorial on how to backup/restore cyrus
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
RE: Backup of Cyrus
Yes i have it too ! but how can i have a backup of the all mailbox automatically done ? thks alain -Message d'origine- De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] la part de Simon Matter Envoyé : vendredi 12 décembre 2003 17:50 À : Doug Koobs Cc : [EMAIL PROTECTED] Objet : Re: Backup of Cyrus I've been doing some reading of the list archives, and have learned that my current backup process is not sufficient. I'm hoping to get some feedback on my new proposed process. I only have about 20 users, total mail store is under 300 MB. I can stop the services. I want to be able to recover from total disaster, and from user errors. For now, I will do a full backup nightly I'm using RH9 and Simon Matter's RPMs. Here are the beginnings of a script that I hope to use: My rpms already do mailbox backups daily and rotate them through a week. Have a look at /var/lib/imap/backup/ where you find mboxlist.gz, mboxlist.1.gz... Simon ### postfix stop # Stop MTA etc/rc.d/init.d/cyrus-imapd stop # Stop Cyrus su cyrus -c ctl_mboxlist -d mailboxes-`date '+%m%d%y'` # List mailboxes; file makes restore easier??? #Backup the following directories (I haven't decided on which tool yet): #/var/spool/imap #/var/lib/imap etc/rc.d/init.d/cyrus-imapd start # Start Cyrus postfix start #Start MTA Will this be sufficient? Thanks, Doug Confidential: This electronic message and all contents contain information from Financial Credit Services which may be privileged, confidential or otherwise protected from disclosure. The information is intended to be for the addressee only. If you are not the addressee, any disclosure, copy, distribution or use of the contents of this message is prohibited. If you have received this electronic message in error, please notify the sender and destroy the original message and all copies.
RE: Backup of Cyrus
If someone have a solution to have a backup of cyrus...please post it on the list I have the same problem, how can i backup without stopping the mail server... alain -Message d'origine- De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] la part de Craig Ringer Envoye : vendredi 12 decembre 2003 18:01 A : Doug Koobs Cc : [EMAIL PROTECTED] Objet : Re: Backup of Cyrus Doug Koobs wrote: I've been doing some reading of the list archives, and have learned that my current backup process is not sufficient. I'm hoping to get some feedback on my new proposed process. I only have about 20 users, total mail store is under 300 MB. I can stop the services. I want to be able to recover from total disaster, and from user errors. For now, I will do a full backup nightly I'm using RH9 and Simon Matter's RPMs. Here are the beginnings of a script that I hope to use: ### postfix stop # Stop MTA etc/rc.d/init.d/cyrus-imapd stop # Stop Cyrus su cyrus -c ctl_mboxlist -d mailboxes-`date '+%m%d%y'` # List mailboxes; #file makes restore easier??? It's not quite as critical as I originally thought (as the ACL information _is_ stored somewhere else as well), but it can make recovery from db corruption easier, and can make restoring to a different machine a _lot_ less fuss. That said, I think Simon Matter's RPM builds take care of making these backups for you anyway. According to a recent post by Simon it makes backups in /var/lib/imap/backups - so verify that they're there and look right, and you should be fine. #Backup the following directories (I haven't decided on which tool yet): #/var/spool/imap #/var/lib/imap etc/rc.d/init.d/cyrus-imapd start # Start Cyrus postfix start #Start MTA Will this be sufficient? Thanks, It's pretty similar to what I do. Though I use snapshots instead of stopping the daemons, I'd /prefer/ to be able to just stop the daemons. Unfortunately, my mail spools are growing - fast - and I have users who keep weird hours (not least myself). At last check the gzipped backup files were 3gb, from mail spools of 4.6GB. This would mean too much downtime if I stopped the daemons, especially since I'm doing network backups to (slow) tape. IMHO the best way to make sure your backups are OK is to restore them. Preferably to a test machine ;-) - ideally the one you'd be restoring to if there was a hardware failure right now (and maybe another, different, one as well). Alas, you're proabably in a situation like me - what cold spare?!? - where this isn't possible. I did my restore testing on a hapless debian 3.0 box - and this is why I'm so paranoid about converting the mailboxes.db . Everything else about the restore went perfectly, but it couldn't use the mailboxes.db because of a different berkley db version. I'm very glad I learned that then, and not after a server failure. Craig Ringer
RE: Backup of Cyrus
Zitat von [EMAIL PROTECTED]: If someone have a solution to have a backup of cyrus...please post it on the list I have the same problem, how can i backup without stopping the mail server... alain http://asg.web.cmu.edu/twiki/bin/view/Cyrus/Backup
Re: Backup of Cyrus
Doug Koobs wrote: I've been doing some reading of the list archives, and have learned that my current backup process is not sufficient. I'm hoping to get some feedback on my new proposed process. I only have about 20 users, total mail store is under 300 MB. I can stop the services. I want to be able to recover from total disaster, and from user errors. For now, I will do a full backup nightly I'm using RH9 and Simon Matter's RPMs. Here are the beginnings of a script that I hope to use: ### postfix stop# Stop MTA etc/rc.d/init.d/cyrus-imapd stop# Stop Cyrus su cyrus -c ctl_mboxlist -d mailboxes-`date '+%m%d%y'` # List mailboxes; file makes restore easier??? #Backup the following directories (I haven't decided on which tool yet): #/var/spool/imap #/var/lib/imap etc/rc.d/init.d/cyrus-imapd start # Start Cyrus postfix start #Start MTA Will this be sufficient? Thanks, If you're using sieve, you'll also want to backup sievedir, unless you have it nested under configdir like I do. -- Kenneth Murchison Oceana Matrix Ltd. Software Engineer 21 Princeton Place 716-662-8973 x26 Orchard Park, NY 14127 --PGP Public Key--http://www.oceana.com/~ken/ksm.pgp
Re: Backup of Cyrus
I've been doing some reading of the list archives, and have learned that my current backup process is not sufficient. I'm hoping to get some feedback on my new proposed process. I only have about 20 users, total mail store is under 300 MB. I can stop the services. I want to be able to recover from total disaster, and from user errors. For now, I will do a full backup nightly I'm using RH9 and Simon Matter's RPMs. Here are the beginnings of a script that I hope to use: My rpms already do mailbox backups daily and rotate them through a week. Have a look at /var/lib/imap/backup/ where you find mboxlist.gz, mboxlist.1.gz... Simon ### postfix stop # Stop MTA etc/rc.d/init.d/cyrus-imapd stop # Stop Cyrus su cyrus -c ctl_mboxlist -d mailboxes-`date '+%m%d%y'` # List mailboxes; file makes restore easier??? #Backup the following directories (I haven't decided on which tool yet): #/var/spool/imap #/var/lib/imap etc/rc.d/init.d/cyrus-imapd start # Start Cyrus postfix start #Start MTA Will this be sufficient? Thanks, Doug Confidential: This electronic message and all contents contain information from Financial Credit Services which may be privileged, confidential or otherwise protected from disclosure. The information is intended to be for the addressee only. If you are not the addressee, any disclosure, copy, distribution or use of the contents of this message is prohibited. If you have received this electronic message in error, please notify the sender and destroy the original message and all copies.
Re: Backup of Cyrus
Doug Koobs wrote: I've been doing some reading of the list archives, and have learned that my current backup process is not sufficient. I'm hoping to get some feedback on my new proposed process. I only have about 20 users, total mail store is under 300 MB. I can stop the services. I want to be able to recover from total disaster, and from user errors. For now, I will do a full backup nightly I'm using RH9 and Simon Matter's RPMs. Here are the beginnings of a script that I hope to use: ### postfix stop# Stop MTA etc/rc.d/init.d/cyrus-imapd stop# Stop Cyrus su cyrus -c ctl_mboxlist -d mailboxes-`date '+%m%d%y'` # List mailboxes; #file makes restore easier??? It's not quite as critical as I originally thought (as the ACL information _is_ stored somewhere else as well), but it can make recovery from db corruption easier, and can make restoring to a different machine a _lot_ less fuss. That said, I think Simon Matter's RPM builds take care of making these backups for you anyway. According to a recent post by Simon it makes backups in /var/lib/imap/backups - so verify that they're there and look right, and you should be fine. #Backup the following directories (I haven't decided on which tool yet): #/var/spool/imap #/var/lib/imap etc/rc.d/init.d/cyrus-imapd start # Start Cyrus postfix start #Start MTA Will this be sufficient? Thanks, It's pretty similar to what I do. Though I use snapshots instead of stopping the daemons, I'd /prefer/ to be able to just stop the daemons. Unfortunately, my mail spools are growing - fast - and I have users who keep weird hours (not least myself). At last check the gzipped backup files were 3gb, from mail spools of 4.6GB. This would mean too much downtime if I stopped the daemons, especially since I'm doing network backups to (slow) tape. IMHO the best way to make sure your backups are OK is to restore them. Preferably to a test machine ;-) - ideally the one you'd be restoring to if there was a hardware failure right now (and maybe another, different, one as well). Alas, you're proabably in a situation like me - what cold spare?!? - where this isn't possible. I did my restore testing on a hapless debian 3.0 box - and this is why I'm so paranoid about converting the mailboxes.db . Everything else about the restore went perfectly, but it couldn't use the mailboxes.db because of a different berkley db version. I'm very glad I learned that then, and not after a server failure. Craig Ringer