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

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 12-04-2008, 11:56 AM
Active Member
 
Posts: 39
Exclamation Backing Up Zimbra

I have the Open Source Edition installed on Ubuntu 8.04 Server.

I am using the script found here: WebSVN - zimbrackup - Rev 8 - /trunk/

The first time I ran it I received the error so I installed the lvm2 package. Now when I run it I get this:
Quote:
$ sudo ./test.sh
2008-12-04 14:36:15 zimbra backup: backup started
2008-12-04 14:36:15 zimbra backup: stopping the Zimbra services, this may take some time
2008-12-04 14:36:47 zimbra backup: creating a LV called opt-snapshot
Volume group "data" doesn't exist
2008-12-04 14:36:47 error creating snapshot, exiting
This is where I am stuck. Is there anyone that can help?
Reply With Quote
  #2 (permalink)  
Old 12-04-2008, 02:45 PM
raj raj is offline
Moderator
 
Posts: 768
Default

Try this link:
Open Source Edition Backup Procedure - Zimbra :: Wiki

Raj
__________________
i2k2 Networks
Dedicated & Shared Zimbra Hosting Provider
Reply With Quote
  #3 (permalink)  
Old 12-04-2008, 05:01 PM
Moderator
 
Posts: 1,027
Default

I strongly recommend you follow the link Raj mentioned and review several of the scripts. But the key I would hope you realize is that NO script can simply be downloaded and run as-is because the paths, and in this case even the mounted volumes, on your server obviously aren't the same as the other guy's--the one who wrote the script. This error
Quote:
Originally Posted by gforsyth View Post
Volume group "data" doesn't exist
means exactly what it says--at least one of the settings in backup_zimbra_config doesn't match what you have in your system. That config file has to be tweaked with settings that reflect your own setup.

If that script and its parameters are too complex for you, the simplest script on the wiki is probably a good place to start:
Open Source Edition Backup Procedure - Zimbra :: Wiki
__________________
Cheers,

Dan
Reply With Quote
  #4 (permalink)  
Old 12-05-2008, 06:48 AM
Active Member
 
Posts: 39
Default

Well I thank you guys for replying. I have "The Perl way of doing it (without LVM)" running since before I posted yesterday, however with the amount of data that will be on the mail server in the future, I can't have it down for 4 hours for back ups. That is why I am trying to get the back-up with LVM running because it seems like it would be a lot faster.

Does the simple shell script method take long to back up? I see it does use rsync so I can't imagine it would take too long after the first back up. My plan is to back up the /opt/zimbra every night, and then on the weekend take an image of the entire disc.

Thanks.
Reply With Quote
  #5 (permalink)  
Old 12-05-2008, 06:51 AM
Active Member
 
Posts: 39
Default

In this code snippet:

Quote:
# Transfer file to backup server
ncftpput -u -p / /tmp/mail.backup.tgz
Could I change it to just back up to move the file to /media/usr/usbhd instead of ftping it?

I don't see anything that would stop me from doing it, just making sure.
Reply With Quote
  #6 (permalink)  
Old 12-05-2008, 06:59 AM
raj raj is offline
Moderator
 
Posts: 768
Default

yes..you can chosse any action once the backup is done..in the example author is doing FTP, You can move, ftp, copy, to any media or place you like..after all its your backup

Raj
__________________
i2k2 Networks
Dedicated & Shared Zimbra Hosting Provider
Reply With Quote
  #7 (permalink)  
Old 12-05-2008, 08:11 AM
Moderator
 
Posts: 1,027
Default

Quote:
Originally Posted by gforsyth View Post
Does the simple shell script method take long to back up? I see it does use rsync so I can't imagine it would take too long after the first back up. My plan is to back up the /opt/zimbra every night, and then on the weekend take an image of the entire disc.
Depends on the size of your datastore, of course. Down time is minimized by doing one rsync while the Zimbra services are still live (which picks up new messages, deletes deleted ones, etc.) then downs Zimbra and does a second rsync just to handle those files that aren't properly locked in an open, dynamic system. The result is a drastically shortened downtime--in my case (35 users, roughly 5-6GB mailstore that compresses to a 2.7GB backup file) the actual downtime is measured in minutes--usually somewhere around 2-4 minutes including the time for stopping and restarting of the services.

YMMV of course, but the double-rsync is the key.
__________________
Cheers,

Dan
Reply With Quote
  #8 (permalink)  
Old 12-05-2008, 09:19 AM
Outstanding Member
 
Posts: 708
Default

You should be able to speed up the second rsync somewhat by switching between primary message volumes.

Create a new volume, which for this purpose can simply be a subdirectory of /opt/zimbra, not a separate partition: zmvolume -a -n message2 -p /opt/zimbra/store2

That volume will be written to *only* during backup windows.

Before you start the first rsync of /opt/zimbra, use zmvolume -sc -id 3 (zmvolume -l to confirm volume ids) to flag message2 as current. At that point, all new mail will be delivered to the significantly smaller /opt/zimbra/message2. Moving messages between folders, including to Trash or Junk, affects only the databases in db/data/, not store/. Only "empty trash" or periodic automated purges will affect the contents of /opt/zimbra/store, and you don't really need to worry about those. If you restore a "stale" backup of a non-current primary message volume, you could theoretically end up with a small number of "orphaned" files with random names that include the content of deleted+purged messages, but those orphaned files won't hurt anybody.

Procedure:

1) zmvolume -sc -id 3 to direct new writes to the alternate message volume.

2) Run a "live" rsync of all of /opt/zimbra

3) zmcontrol stop

4) rsync --exclude /opt/zimbra/store (for the "cold" resync, there's no need to compare the content of a very large directory tree that you know has no incremental changes worth backing up)

5) zmcontrol start

6) zmvolume -sc -id 1 to start delivering to the main, larger message store again
Reply With Quote
  #9 (permalink)  
Old 01-19-2009, 06:48 AM
Active Member
 
Posts: 39
Default

I have the 'The Perl way of doing it (without LVM)' from the wiki installed, packages all installed, and it is running nightly. However, I believe it is not working.

Quote:
drwxrwxrwx 1 root root 12288 2008-11-19 12:46 01-03-2009-Saturday-02-00-1230966001
drwxrwxrwx 1 root root 12288 2008-11-19 12:46 01-04-2009-Sunday-02-00-1231052402
drwxrwxrwx 1 root root 12288 2008-11-19 12:46 01-05-2009-Monday-02-00-1231138801
drwxrwxrwx 1 root root 12288 2008-11-19 12:46 01-06-2009-Tuesday-02-00-1231225202
drwxrwxrwx 1 root root 12288 2008-11-19 12:46 01-07-2009-Wednesday-02-00-1231311602
drwxrwxrwx 1 root root 12288 2008-11-19 12:46 01-08-2009-Thursday-02-00-1231398001
drwxrwxrwx 1 root root 12288 2008-11-19 12:46 01-09-2009-Friday-02-00-1231484401
drwxrwxrwx 1 root root 12288 2008-11-19 12:46 01-10-2009-Saturday-02-00-1231570801
drwxrwxrwx 1 root root 12288 2008-11-19 12:46 01-11-2009-Sunday-02-00-1231657201
drwxrwxrwx 1 root root 12288 2008-11-19 12:46 01-12-2009-Monday-02-00-1231743602
drwxrwxrwx 1 root root 12288 2008-11-19 12:46 01-13-2009-Tuesday-02-00-1231830005
drwxrwxrwx 1 root root 12288 2008-11-19 12:46 01-14-2009-Wednesday-02-00-1231916402
drwxrwxrwx 1 root root 12288 2008-11-19 12:46 01-15-2009-Thursday-02-00-1232002802
drwxrwxrwx 1 root root 12288 2008-11-19 12:46 01-16-2009-Friday-02-00-1232089201
drwxrwxrwx 1 root root 12288 2008-11-19 12:46 01-17-2009-Saturday-02-00-1232175602
drwxrwxrwx 1 root root 12288 2008-11-19 12:46 01-18-2009-Sunday-02-00-1232262002
drwxrwxrwx 1 root root 12288 2008-11-19 12:46 01-19-2009-Monday-02-00-1232348402
Everything is the same size, so it is not running? Also why are all the dates executed the same date?
Reply With Quote
  #10 (permalink)  
Old 01-22-2009, 07:38 AM
Active Member
 
Posts: 39
Default

Quote:
drwxrwxrwx 1 root root 12288 2008-11-19 12:46 01-15-2009-Thursday-02-00-1232002802
drwxrwxrwx 1 root root 12288 2008-11-19 12:46 01-16-2009-Friday-02-00-1232089201
drwxrwxrwx 1 root root 12288 2008-11-19 12:46 01-17-2009-Saturday-02-00-1232175602
drwxrwxrwx 1 root root 12288 2008-11-19 12:46 01-18-2009-Sunday-02-00-1232262002
drwxrwxrwx 1 root root 12288 2008-11-19 12:46 01-19-2009-Monday-02-00-1232348402
drwxrwxrwx 1 root root 12288 2008-11-19 12:46 01-20-2009-Tuesday-02-00-1232434802
drwxrwxrwx 1 root root 12288 2008-11-19 12:46 01-21-2009-Wednesday-02-00-1232521201
drwxrwxrwx 1 root root 8192 2008-11-19 12:46 01-22-2009-Thursday-02-00-1232607602
Well the file size switched last night, but I have at least 10 gigs of mail stored on this server.

I'm running Ubuntu 8.04 on the newest Zimbra Open Source. I have all the necessary perl packages installed. I have the script saved in /etc/cron.daily

In my crontab I have
Quote:
30 23 * * * root ./etc/cron.daily/zimbraColdBackup.sh --confirm
I edited the crontab with sudo nano crontab -e


Is this running correctly or is it not?

Any help is greatly appreciated.
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.