[prev in list] [next in list] [prev in thread] [next in thread] 

List:       info-cyrus
Subject:    Re: Server Backup
From:       Shawn Bakhtiar via Info-cyrus <info-cyrus () lists ! andrew ! cmu ! edu>
Date:       2016-02-08 20:04:41
Message-ID: CY1PR14MB05203C21C8B229C45EE895E7C4D50 () CY1PR14MB0520 ! namprd14 ! prod ! outlook ! com
[Download RAW message or body]


> On Feb 8, 2016, at 6:19 AM, Giuseppe Ravasio (LU) via Info-cyrus \
> <info-cyrus@lists.andrew.cmu.edu> wrote: 
> Hi,
> I'm rewriting my backup script and I cannot find any hint about how to
> backup the cyrus server in a good way.
> 
> Actually I'm using this method:
> 
> - Stop Postfix and Cyrus
Although prudent, given that we have a lot of mobile devices constantly hitting our \
server, I don't do this step.

> - making tar of /var/lib/sieve
> - making tar of /var/lib/imap

Making tar balls of the stores can be time consuming so if I shut down the server, I \
would be increasing the time my servers are not responding. running an rsync to a NAS \
(in my case a simple network share) works much faster. Since the jobs are at night, \
traffic is low (running the same rsync multiple times could decrease the delta, if \
data integrity is important).

> - dumping mailboxes.db in plain text (ctl_mboxlist -d)
> - taking snapshots of all the mailstores
> - Restarting the Services
> - taking mailstore backups from the snapshots
> 
> The last night the imaps was not restarted because the socket for IMAPS
> was busy and so I was wondering if today it's really needed to stop the
> service before taking the snapshots.

Again this is a question of data integrity and how important the information is. In \
my case, given we can always re-contruct it's not an important step, I don't care \
(too much) if files change during the rsync process.

> Avoiding the service stop could also be useful in order to stop having a
> 1/2min downtime (I also take vmware snapshots of the machine)
> 
Correct. For us, the downtime has people calling the NOC if their devices happen to \
try to connect and error out. But the store can always be reconstructed if \
differences exists between store and db.

> I was thinking to move in this direction:
> 
> - Checkpoint and archive the databases (with ctl_cyrusdb -r)
> - making tar of /var/lib/imap
> - making tar of /var/lib/sieve
> - dumping mailboxes.db in plain text (ctl_mboxlist -d)
> - taking snapshots of all the mailstores
> - taking mailstore backups from the snapshots
> 

Sounds good to me. I would only substitute tar with rsync (your only "syncing" \
deltas).

> What kind of backup strategy are you using?
> Thanks
> Giuseppe
> ----
> Cyrus Home Page: http://www.cyrusimap.org/
> List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
> To Unsubscribe:
> https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus

----
Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic