Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Administrators

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-12-2011, 07:53 AM
Loyal Member
 
Posts: 77
Default Compressing Zimbra Directory for Backup

I have my zimbra directory RSYNCed to another directory as a backup. I want to compress the backup directory into a file that will preserve all permissions, symlinks, hardlinks, and everything else necessary to keep zimbra operational.

Someone told me to look into using TAR for this. I checked the MAN page and see lots of different options for that command. Does anyone know the necessary options needed in the TAR command to properly archive zimbra into a single file?
Reply With Quote
  #2 (permalink)  
Old 05-12-2011, 09:49 PM
Loyal Member
 
Posts: 97
Default

rsync -azv will do the job..look here

How to Backup Linux? 15 rsync Command Examples

I'm backing up using rsync to other standby server.
__________________
Rgds;
Matnor
Reply With Quote
  #3 (permalink)  
Old 05-13-2011, 01:41 AM
Intermediate Member
 
Posts: 18
Default

Hi,
if you need to compress Zimbra directory with tar, you just need a command line like:
Code:
tar -jcvf /tmp/zimbraarchive.tar.bz2 /opt/zimbra
-j ... compress with bzip2
-c ... create
-v ... verbose, prints each file processed, but you can miss some errors in the output (optional)
-f <file> ... name of archive file

Adjust the names and paths for your needs.
An archive like this can then be restored (into current working directory) with
Code:
tar -jxvpf /tmp/zimbraarchive.tar.bz2
-x ... extract
-p ... preserve permissions when extracting

Ofcourse Zimbra has to be down to be able to archive a consistent and restorable state. Or use some kind of volume snapshoting for example with LVM, but that's a bit advanced stuff.

Hope this helps.
__________________
Michal Belica - IT consultant
www.beli.sk
Reply With Quote
  #4 (permalink)  
Old 05-23-2011, 12:26 AM
Special Member
 
Posts: 162
Default

Quote:
Originally Posted by beli.sk View Post
Ofcourse Zimbra has to be down to be able to archive a consistent and restorable state.
I work-around this by rsyncing to local storage first, then tar-ing to the remote backup server. The steps I user are:

- rsync to local (live)
- Stop ZCS
- rsync to local (down)
- Start ZCS
- TAR local rsync copy to remote storage

I know that doubles the storage requirements on my ZCS box but it minimises downtime and also means that if something goes wrong I can be back up and running in a few line at the CLI; move the broken ZCS out of the way, rename the backup copy, fixperms and restart!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.