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 11-09-2009, 04:03 PM
Senior Member
 
Posts: 58
Default Backup using tape backup

Hi all

I have a tape backup, But I need to make the backup of zimbra on a Tape backup IBM SCSI, somebody know a shell script ??

Regards
Reply With Quote
  #2 (permalink)  
Old 11-10-2009, 01:08 AM
Special Member
 
Posts: 162
Default

This is (adapted from) the simplest script I use. I use SSH to another server rather than tape.

Code:
#!/bin/bash
ZIMBRADIR=/opt/zimbra
BACKUPDIR=/opt/zbackup
TAPE=/dev/tape
OPTS=-zcf

# Timestamp start
echo ==
echo == Backup started: $(date +"%d/%m/%Y %H:%I:%S") ==
echo ==

# Live sync before stopping Zimbra to minimize sync time with the services down
rsync -aHK --delete $ZIMBRADIR $BACKUPDIR

# Timestamp server stop
echo ==
echo == Zimbra services stopped: $(date +"%d/%m/%Y %H:%I:%S") ==
echo ==

# Stop Zimbra
su - zimbra -c"/opt/zimbra/bin/zmcontrol stop"
sleep 15
kill -9 `ps -u zimbra -o "pid="`

# Cold sync to bring backup directory up-to-date
rsync -aHK --delete $ZIMBRADIR $BACKUPDIR

# Restart Zimbra
su - zimbra -c"/opt/zimbra/bin/zmcontrol start"

# Timestamp server start
echo ==
echo == Zimbra services started: $(date +"%d/%m/%Y %H:%I:%S") ==
echo ==

# Tarball the Zimbra files onto the tape
tar $OPTS $TAPE $BACKUPDIR

# Timestamp finish
echo ==
echo == Backup finished: $(date +"%d/%m/%Y %H:%I:%S") ==
echo ==
I run this as a cron job with output redirected to a file, then e-mail the file at about 6AM. As it is it'll use compression, change to "OPTS=-cf" for uncompressed (quicker/larger) backups.

Thats about as simple as I can make it. Hope it's of use.

Jon
Reply With Quote
  #3 (permalink)  
Old 11-12-2009, 12:05 PM
Moderator
 
Posts: 1,147
Default

You should probably take a look at the scripts here as well:
Backup and Restore Articles - Zimbra :: Wiki
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.