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 01-14-2010, 06:19 AM
Member
 
Posts: 10
Default export all mailboxes

I am familiar with the zmmailbox method of exporting an individuals mailbox including all folders such as calendar, etc. What I would like to do, is, from the command line, make a backup of ALL the usres mailboxes at once. Is this possible? Thank you.
Reply With Quote
  #2 (permalink)  
Old 01-14-2010, 08:52 AM
Member
 
Posts: 10
Default

I found this script on the forums awhile ago, and modified it a bit to mount a Windows share to dump the TGZ backup files to ... I've only used it a few times, and it is slow, but it works:

Make a bash script containing the following:

Code:
#!/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=backups,password=somePassWord //192.168.1.6/backups /backup/SomeWindowsMachine
mv /backup/accounts/*.tgz /backup/SomeWindowsMachine
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.