Results 1 to 5 of 5

Thread: Backup Problems on OSX

Hybrid View

  1. #1
    Join Date
    May 2007
    Posts
    5
    Rep Power
    8

    Default Backup Problems on OSX

    Hi there,

    I've recently inherited the administration duties of a small Zimbra Open Source server running on a G5 w/10.4.10. The system seems to run great, however what I am having no luck with is backing it up.

    I'm not terribly familiar with Unix so the instructions at:

    Backing up and restoring Zimbra (Open Source Version) - ZimbraWiki

    ..don't get me very far. I've tried to do a zmcontrol stop, and then run the cp command but get many errors such as:

    cp: /opt/zimbra/postfix/spool/private/uucp: Operation not supported on socket

    Plus, the cp process is still going, after over an hour, even though it's a simple installation with two mailboxes totaling 150mb worth of mail. On that G5, I can copy a 5gb file to another folder on the same drive and it'll zip right through.. so I'm confident that it's not a drive performance or memory issue.

    OSX yells at me if I try to just use the Finder to copy the /opt/zimbra folder ("this folder has special permissions..."), and I'm guessing that the bulk of the actual mailbox storage (/opt/zimbra/store) is located in folders that only the "zimbra" user has access to. I'm logged into the OSX machine as an administrator. I don't want to Get Info and take control of those "zimbra user only shares" because I don't know if that'll hose the installation.

    We use Retrospect 6.1 to pull data off our Mac clients and then back it up to tape. I assume that if I can't do a manual copy as the Administrator of the machine, Retrospect won't be able to copy the /opt/zimbra folder either.

    Any thoughts?

  2. #2
    Join Date
    Mar 2006
    Location
    Massachusetts
    Posts
    965
    Rep Power
    10

    Default

    I'm not an OSX expert by any stretch, but I'll give you a few tips:

    1. Don't worry about the errors that say "Operation not supported on socket". Sockets are special Unix/Linux files and the cp command doesn't handle them. It is OK that they are not included in the backup, as they should be automatically recreated when Zimbra starts up.

    2. Make sure you are not putting the backup file in the /opt/zimbra directory.

    3. Try using the '-v' (verbose) option with your cp command. This should show you what file is being worked on, and may give you some idea of why it is not finishing.

    4. You may want to also look into the tar and rsync commands (I think they are both available under OSX). They can also be very effective for creating backups from the command line.

    HTH

  3. #3
    Join Date
    Dec 2006
    Location
    Minneapolis MN
    Posts
    777
    Rep Power
    9

    Default

    I'm running a Zimbra 4.5.6 FOSS server on OS X 10.0.10, and this is the script I use to backup the data on the local machine to /zimbra-backup/.. This script stops zimbra, copies the data to another folder on the same machine using rsync (quicker than cp or tar, since it only copies changed data), and then once this script is done you can let your backup software do what it needs to this folder since it's all in a consistent state.

    This is an "it works for me" script.

    Code:
    #!/bin/tcsh
    
    set LOGFILE=/zimbra-backup/backup.log
    
    echo "`date` - Stopping Zimbra" >> $LOGFILE
    su - zimbra -c '/opt/zimbra/bin/zmcontrol stop'
    
    echo "`date` - rsync'ing /opt/zimbra to /zimbra-backup/zimbra" >> $LOGFILE
    cd /opt
    rsync -a -H --delete zimbra /zimbra-backup
    
    echo "`date` - rync done, starting Zimbra in the background" >> $LOGFILE
    su - zimbra -c '/opt/zimbra/bin/zmcontrol start' &
    
    echo "`date` - local rsync copy done" >> $LOGFILE
    
    echo "`date` - done" >> $LOGFILE
    echo "-----------------------------------------------------" >> $LOGFILE

  4. #4
    Join Date
    May 2007
    Posts
    5
    Rep Power
    8

    Default

    Thanks for the script. Unfortunately, it errors out with hundreds of permission denied errors.

    rsync: send_files failed to open "/opt/zimbra/amavisd-new-2.4.3/db/cache-expiry.db": Permission denied (13)

    Plus, when I run the script, it immediately asks me for a password (apparently because of the su zimbra part).

    But I do like where the script is going. It sounds like it downs the server, creates a copy of the zimbra folder, and then I just point Retrospect to backup the zimbra-backup folder. I'll continue to tinker, but I think my current challenge will be to:

    Fix this script's permission problem.
    Get it to run without asking for a password.
    Get it to run automatically every night at 10 PM, so when the Server Backup starts at 11PM it'll be done and ready.

    Again I apologize for my lack of unix knowledge, the OSX GUI has certainly spoiled me..

  5. #5
    Join Date
    Dec 2006
    Location
    Minneapolis MN
    Posts
    777
    Rep Power
    9

    Default

    Before running the script, get yourself into superuser ("sudo -i", using your account password)

    Then make sure /zimbra-backup exists as a directory (mkdir /zimbra-backup)

    Try running the script and see what goes.. since you're root, the "su"s shouldn't prompt for passwords.

Similar Threads

  1. Problems with a backup and restore
    By jmeek in forum Migration
    Replies: 11
    Last Post: 05-13-2009, 05:36 AM
  2. Backup Drive Filling up!
    By Ericx in forum Administrators
    Replies: 1
    Last Post: 10-17-2008, 12:37 AM
  3. Backup best practice
    By Eyfi in forum Administrators
    Replies: 2
    Last Post: 06-29-2007, 07:52 AM
  4. Off-site backup
    By jbareMACS in forum Administrators
    Replies: 3
    Last Post: 05-20-2007, 10:32 AM
  5. NE Backup best practises
    By Klug in forum Administrators
    Replies: 3
    Last Post: 05-29-2006, 08:32 AM

Posting Permissions

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