Doymer Consultores

  • Increase font size
  • Default font size
  • Decrease font size
Inicio Blog Linux Hot Backup of Zimbra Community Edition

Hot Backup of Zimbra Community Edition

Print PDF

Open source version of Zimbra, Zimbra Community Edition or ZCS, is a mail server that has become very popular because its high number of features. But the fact of being it free limit the number of goodies that the owner include being the making of backup copies of our mailboxes one of them.

There are many web pages where you are shown how to make backups of this version but they have one or more of these drawbacks:

  • You have to stop the mail server
  • You have to backup account by account, though there are scripts that automate this process some way or other
  • They require the datastore to be in a LVM volume
  • The are not free

In this article we show you an alternate method that overcome this drawbacks and allow you to make consistent hot copies of your mail server.

The problem of hot copies is that the server may have locked the data store or files inside it on one side and that, between the point-in-time you start copying the data and the point-in-time that you finish copying it, changes may have happened that render it inconsistent. That's the reson that many instructions tell you to stop the mail server so that all locks are released and data is guaranteed not to change during copy.

The mechanism to get the same results not having to stop the mail server servidor goes through 'freezing' the data store by making what is called an snapshot. So that if your data is located in a LVM volume on in the new disk format of the latest Linux versiones you may use the features that these offer to achieve the same result.


The alternative way

But it is also common to have your data in standard volumes like ext3, ext4 o Reiserfs and here is where hotcopy from idera (formerly r1soft) enter the game and will allow us to get the needed snapshot.

Go and download it from the owner page (you will have to register for that but it will pay your effort). Now we have to install and configure it for our server. Instructions on doig this and examples of use are in the same web site but, in short, it all reduces to executing the command

hcp-setup --get-module --no-binary

so that we compile the right version of the driver for our running kernel. Not to say that you MUST have the kernel headers and the compiler subsystem but this is something that is usually already installed. Else go for it or you will not able to atch the driver version to that of your kernel's and it will be useles.

The former paragraph implicitly means that if you patch your server and there is a change in the kernel version you will have to rebuild the driver with the former command or it will stop working.


Making the Copy

Now we can 'freeze' our data store so that all former troubles desappear. To do this you only have to identify the device where your mail storage is located and execute the following command

hcp --read-only /dev/sda2

supossing that it is in /dev/sda2 whaere your mail boex are stored. This command might reply with the name of the device where we can pull the data from, something like

Hot Copy created at: /dev/hcp1

that inform us that we have the desired data available from /dev/hcp1 and that now we can use our favorite tool like tar, cp, rsync, sincrify or whatever to copy the data off our system with the full warranty that they will not change and we will hit no locked files.

When finished we have to delete the snapshot with the following command

hcp -r /dev/sda2


What else can you do with Hot Copy

In the product page the owner offer some ideas about what you can do with it like:

  • Add point-in-time open file backups to your existing backup scripts for free e.g. tar and rsync
  • Check your disk for errors with fsck without rebooting and without unmounting your file system!
  • Test scripts and programs in an instant snapshot of your live environment before you use them on real data
  • Keep instantly recoverable snapshots available by taking periodic snapshots via cron

Contrary to other traditional snapshot products hotcopy does not need dedicated volume space to maintain the snapshots and this is a big advantage over LVM or even the existing snapshot schemes of SAN devices that require you to dedicate volume space (about 20% is the recommended value) to snapshots.

Happy backuping!!!.


Last Updated on Tuesday, 29 January 2013 15:23  


0 # Johny Jackson 2018-01-21 05:20
Hi there it's me, I am also visiting this website regularly, this
web page is genuinely nice and the viewers are genuinely sharing good thoughts.

Review my page :: Johny Jackson:
Reply | Reply with quote | Quote
0 # MichaelDeele 2018-03-04 14:36
Romantic Piano by Andrew_Studio | AudioJungle
Reply | Reply with quote | Quote
0 # JeffreyInpum 2018-03-04 21:08
Reply | Reply with quote | Quote
0 # Stephenbaipt 2018-03-04 21:30
Lad mig vise dig, hvordan du tjener penge LIVE lige nu
Reply | Reply with quote | Quote
0 # JeffreyInpum 2018-03-05 09:44
Reply | Reply with quote | Quote

Add comment

The owner of this site is not responsible of the opinions that users pour in their comments, and can or cannot agree with what they write.

Fair Play, Please

Please do not make offensive or insult-ant comments. Avoid publicity and Spam. Do not use the comments area to 'plug' your own site. Links you write may be erased. We pretend to create an open space for the authors and users to communicate.

Everyone will enjoy the right use of language, because not all are able to understand 'codified' messages SMS alike. Please do not write only with UPPER case because this is like yelling and you will probably not get attended faster only for yelling, probably the opposite.

Editing reserves

We reserve the right to not include comments that are offensive, unpleasant, that attack third parties (racists, homophobes, etc) or that have nothing to do with the site or the article.
Supplied data is private and owned by you and will not be used to start any commercial or other kind of action.

Security code

Archived Items

Powered by ArtTree