Results 1 to 1 of 1

Thread: Mailbox backup Community Edition

Hybrid View

  1. #1
    Join Date
    Dec 2009
    Location
    Worthing. UK
    Posts
    97
    Rep Power
    5

    Default Mailbox backup Community Edition

    Hi All

    I have been following a post ref setting up mailbox back up on the community edition (my version 7.02) http://www.zimbra.com/forums/adminis...y-version.html

    The issue is when I run the script which creates a new file with the mail accounts. The email accounts with long names get cut short so the backup of them fail as the full name is not in the new script. This is the file that gets the user accounts

    #!/bin/bash
    # baccount.sh -- Script to export select Zimbra accounts

    USERNAME=$1
    TODAY=`date`
    LOGFILE="/backup/log/backuplog.txt"

    echo $TODAY >> $LOGFILE
    echo $USERNAME >> $LOGFILE
    /opt/zimbra/bin/zmmailbox -z -m $USERNAME gms >> $LOGFILE
    /opt/zimbra/bin/zmmailbox -z -m $USERNAME getRestURL "//?fmt=tgz" > /backup/accounts/$USERNAME.tgz
    echo --------------------- >> $LOGFILE

    And this is the second script involved

    #!/bin/bash
    # get a list of all the accounts and create a script to
    # execute the baccount.sh script with the email address
    # of the user as a command line variable

    #use zmaccts and extract only the email address from the result
    #then concatenate the "/backup/./baccount.sh <emailaddress>" string for each account and write it to the file

    /opt/zimbra/bin/./zmaccts | grep "@" | awk '{print "/backup/./baccount.sh " $1}' > /backup/accountbackup.sh

    # change permissions on the newly created script
    chmod 755 /backup/accountbackup.sh

    # Execute the newly created script - this creates a tgz file for each account
    /backup/./accountbackup.sh

    # this mounts an SMB drive of a neighboring win machine and copies the backups over - could be anything
    # mount -t smbfs -o username=username,password=password //windowsMachineName/windowsShare /data
    # cp /backup/accounts/*.tgz /data

    Can anyone suggest how I can get the full name of those few accounts that this script cuts short

    Many thanks

    Glenn
    Last edited by glennbtn; 12-18-2012 at 07:34 AM.

Similar Threads

  1. Hot Backup Community Edition w/ DRBD
    By dmart in forum Administrators
    Replies: 4
    Last Post: 01-11-2010, 02:10 PM
  2. Replies: 1
    Last Post: 10-19-2009, 10:32 PM
  3. Backup Script for Zimbra Community Edition
    By uscell in forum Administrators
    Replies: 0
    Last Post: 10-07-2008, 11:39 AM
  4. Zimbra community edition backup
    By jreinhart in forum Installation
    Replies: 0
    Last Post: 09-19-2008, 01:52 PM
  5. Bacula: Online Backup in Community Edition?
    By emmaylots in forum Administrators
    Replies: 2
    Last Post: 07-28-2008, 07:33 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
  •