Page 1 of 4 123 ... LastLast
Results 1 to 10 of 33

Thread: Backing Up Zimbra

  1. #1
    gforsyth is offline Active Member
    Join Date
    Aug 2007
    Location
    Columbus Ohio
    Posts
    39
    Rep Power
    7

    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:
    $ 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?

  2. #2
    raj's Avatar
    raj
    raj is offline Moderator
    Join Date
    Oct 2005
    Location
    USA, Canada and India
    Posts
    777
    Rep Power
    10

    Default

    i2k2 Networks
    Dedicated & Shared Zimbra Hosting Provider

  3. #3
    dwmtractor's Avatar
    dwmtractor is offline Moderator
    Join Date
    Jul 2007
    Location
    San Jose, CA
    Posts
    1,027
    Rep Power
    10

    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

  4. #4
    gforsyth is offline Active Member
    Join Date
    Aug 2007
    Location
    Columbus Ohio
    Posts
    39
    Rep Power
    7

    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.

  5. #5
    gforsyth is offline Active Member
    Join Date
    Aug 2007
    Location
    Columbus Ohio
    Posts
    39
    Rep Power
    7

    Default

    In this code snippet:

    # 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.

  6. #6
    raj's Avatar
    raj
    raj is offline Moderator
    Join Date
    Oct 2005
    Location
    USA, Canada and India
    Posts
    777
    Rep Power
    10

    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

  7. #7
    dwmtractor's Avatar
    dwmtractor is offline Moderator
    Join Date
    Jul 2007
    Location
    San Jose, CA
    Posts
    1,027
    Rep Power
    10

    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

  8. #8
    Rich Graves is offline Outstanding Member
    Join Date
    Jan 2007
    Location
    Minnesota
    Posts
    719
    Rep Power
    9

    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

  9. #9
    gforsyth is offline Active Member
    Join Date
    Aug 2007
    Location
    Columbus Ohio
    Posts
    39
    Rep Power
    7

    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.

    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?

  10. #10
    gforsyth is offline Active Member
    Join Date
    Aug 2007
    Location
    Columbus Ohio
    Posts
    39
    Rep Power
    7

    Default

    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
    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.

Page 1 of 4 123 ... LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 8
    Last Post: 01-12-2012, 02:20 AM
  2. zmperditionctl start asking for password
    By k7sle in forum Administrators
    Replies: 32
    Last Post: 02-20-2008, 11:13 AM
  3. Replies: 31
    Last Post: 12-15-2007, 09:05 PM
  4. Zimbra shutdowns every n hours.
    By Andrewb in forum Administrators
    Replies: 13
    Last Post: 08-14-2007, 08:55 AM
  5. Fedora Core 3, Clean Install - Not working!
    By pcjackson in forum Installation
    Replies: 17
    Last Post: 03-05-2006, 07:38 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •