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 08-06-2009, 09:37 PM
Active Member
 
Posts: 48
Default [SOLVED] problem taking opensource backup

hi.. am new at this ... please help
have tried out the following backup script but keep getting errors

{{#!/bin/bash

# Zimbra Backup Script
# Live sync before stopping Zimbra to minimize sync time with the services down
# Comment out the following line if you want to try single cold-sync only
rsync -avHK /opt/zimbra/ /backup/zimbra

# Stop Zimbra Services
sudo -u zimbra /opt/zimbra/bin/zmcontrol stop
sleep 15

# Sync to backup directory
rsync -avHK /opt/zimbra/ /backup/zimbra

# Restart Zimbra Services
sudo -u zimbra /opt/zimbra/bin/zmcontrol start

# Create archive of backed-up directory for offsite transfer
# cd /backup/zimbra
tar -zcvf /tmp/mail.backup.gz -C /backup/zimbra .

# Transfer file to backup server
ncftpput -u <username> -p <password> <ftpserver> /<desired dest. directory> /tmp/mail.backup.gz
}}




zimbra@cccbl:~> sudo -u zimbra /opt/zimbra/bin/zmcontrol stop sleep 15
Host cccbl.citizencredit.com
Stopping stats...Done
Stopping mta...Done
Stopping spell...Done
Stopping snmp...Done
Stopping archiving...Done
Stopping antivirus...Done
Stopping antispam...Done
Stopping imapproxy...Done
Stopping mailbox...Done
Stopping logger...Done
Stopping ldap...Done
zimbra@cccbl:~> rsync -avHK /opt/zimbra/ /backup/zimbra
building file list ... rsync: opendir "/opt/zimbra/ssl/zimbra.20090710125610" failed: Permission denied (13)
rsync: opendir "/opt/zimbra/ssl/zimbra.20090710125612" failed: Permission denied (13)
rsync: opendir "/opt/zimbra/ssl/zimbra" failed: Permission denied (13)
rsync: opendir "/opt/zimbra/data/postfix/spool/hold" failed: Permission denied (13)
rsync: opendir "/opt/zimbra/data/postfix/spool/corrupt" failed: Permission denied (13)
rsync: opendir "/opt/zimbra/data/postfix/spool/defer" failed: Permission denied (13)
rsync: opendir "/opt/zimbra/data/postfix/spool/flush" failed: Permission denied (13)
rsync: opendir "/opt/zimbra/data/postfix/spool/saved" failed: Permission denied (13)
rsync: opendir "/opt/zimbra/data/postfix/spool/trace" failed: Permission denied (13)
rsync: opendir "/opt/zimbra/data/postfix/spool/maildrop" failed: Permission denied (13)
rsync: opendir "/opt/zimbra/data/postfix/spool/active" failed: Permission denied (13)
rsync: opendir "/opt/zimbra/data/postfix/spool/bounce" failed: Permission denied (13)
rsync: opendir "/opt/zimbra/data/postfix/spool/deferred" failed: Permission denied (13)
rsync: opendir "/opt/zimbra/data/postfix/spool/public" failed: Permission denied (13)
rsync: opendir "/opt/zimbra/data/postfix/spool/incoming" failed: Permission denied (13)
rsync: opendir "/opt/zimbra/data/postfix/spool/private" failed: Permission denied (13)
rsync: opendir "/opt/zimbra/.saveconfig/zimlet" failed: Permission denied (13)
done
rsync: mkdir "/backup/zimbra" failed: No such file or directory (2)
rsync error: error in file IO (code 11) at main.c(509) [receiver=2.6.8]
rsync: connection unexpectedly closed (8 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(459) [sender=2.6.8]

Reply With Quote
  #2 (permalink)  
Old 08-06-2009, 10:03 PM
Advanced Member
 
Posts: 186
Post

Hi,
try this rsync -avrlHKpogDt /opt/zimbra/ /backup/zimbra_bak

Regards
Adeel
Reply With Quote
  #3 (permalink)  
Old 08-06-2009, 10:09 PM
Active Member
 
Posts: 48
Default

Quote:
Originally Posted by adeelarifbhatti View Post
Hi,
try this rsync -avrlHKpogDt /opt/zimbra/ /backup/zimbra_bak

Regards
Adeel
hi... i'm sorry i forgot to mention we are using SLES 10 as our OS .. does this command still apply??
Reply With Quote
  #4 (permalink)  
Old 08-06-2009, 10:28 PM
Advanced Member
 
Posts: 186
Post

Did you mean solaris?
Reply With Quote
  #5 (permalink)  
Old 08-06-2009, 11:50 PM
Active Member
 
Posts: 48
Default

no .. Suse Linux Enterprise Server 10.2
Reply With Quote
  #6 (permalink)  
Old 08-06-2009, 11:53 PM
Active Member
 
Posts: 48
Default

this worked...

{{{su - zimbra
zmcontrol stop
switch back to root
ps aux | grep zimbra (kill -9 pid# of any remaining)
mkdir /zcsbackup
rsync -avHK /opt/zimbra/ /zcsbackup/zimbra
mkdir /zcsbackuptars
tar -zcvf /zcsbackuptars/backup.zimbra.version.date.time.tar.gz -c /zcsbackup/zimbra .
su - zimbra
zmcontrol start }}

how exactly would the restore work?? what commands??
Reply With Quote
  #7 (permalink)  
Old 08-07-2009, 01:32 AM
Moderator
 
Posts: 7,911
Default

You would need to untar the backup file pull out any of the files you need.
__________________
Reply With Quote
  #8 (permalink)  
Old 08-07-2009, 01:36 AM
Advanced Member
 
Posts: 186
Exclamation

did u mean taring and untaring don't work in a good way with zimbra ?



regards
Adeel
Reply With Quote
  #9 (permalink)  
Old 08-07-2009, 02:53 AM
Active Member
 
Posts: 48
Default

hi
no ... untarring works... i'm not sure about how the restored ZCS system picks up these files .... do i reintall zimbra??
Reply With Quote
  #10 (permalink)  
Old 08-07-2009, 03:11 AM
Advanced Member
 
Posts: 186
Post

I guess, re-installation is required when u r moving to a new server, that re-installation with -s will only update some databases or RPMs.
then u can delete the installation new one, and can restore the zimbra.

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