Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Installation

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 03-08-2009, 10:51 AM
Senior Member
 
Posts: 59
Default Backup and Restore for Zimbra Open Source

I am running Zimbra on Ubuntu.
Quote:
zimbra@mail2:/var/backups/zimbra$ zmcontrol -v

Release 5.0.12_GA_2789.UBUNTU8 UBUNTU8
As per the document;

http://wiki.zimbra.com/index.php?title=Backing_up_and_restoring_Zimbra_%2 8Open_Source_Version%29
I have to copy the /opt folder. But this is too big.

Can i just simply copy the mailboxes and the account names and simply overwrite the files in th enewly created server?

I built the test server on a workstation. I am now setting up Zimbra on our blade server for the final test.

There are active users in the test server.

The whole /opt folder is too big.

Can i simply copy the mailboxes and account names into the new machine (blade server)?

Last edited by emcampos; 03-08-2009 at 10:58 AM..
Reply With Quote
  #2 (permalink)  
Old 03-09-2009, 12:33 AM
Moderator
 
Posts: 7,928
Default

No, you will need to copy the whole lot! Do you not have some external storage you could connect ?
__________________
Reply With Quote
  #3 (permalink)  
Old 03-09-2009, 10:36 AM
Advanced Member
 
Posts: 220
Default

Hello,

Referencing to my experience with backup and restore, and after an hard work to finish this, I collected the required information in short document, please follow those steps:

Code:
# Backing Up
$ As zimbra: zmcontrol stop
$ sudo ps aux | grep zimbra (make sure everything’s stopped)
$ sudo rsync -avr /opt/zimbra /mnt/migration (this may take a while)

# Create a "dummy" Install Then Remove It
$ sudo Run the installer with the -s option: ./install.sh -s
$ sudo Remove the dummy install: rm -rf /opt/zimbra

# Mount Your Backup HD, rsync, and Install
$ sudo rsync -avr /mnt/migration/zimbra /opt/
$ sudo chown -R zimbra:zimbra /opt/zimbra
$ sudo run zmfixperms located in /opt/zimbra/libexec or /opt/zimbra/libexec/zmfixperms -verbose
$ sudo rerun the installer without the -s option (It will detect ZCS already installed, and ask if you want to upgrade. Select Yes)

# If the mailbox mysql.server is not running Try initializing mysql by hand:
$ As zimbra: /opt/zimbra/libexec/zmmyinit

$ sudo mkdir -p /opt/backup/tmp
$ sudo rm -rf /opt/backup/tmp/zimbra
$ sudo /etc/init.d/zimbra stop
$ sudo ps aux | grep zimbra (make sure everything’s stopped)
$ sudo ps auxww | awk '{print $1" "$2}' | grep zimbra | kill -9 `awk '{print $2}'` (Only enable the following command if you need all Zimbra user owned processes to be killed before syncing)
$ sudo kill -9 `ps -u zimbra -o "pid="`
$ sudo rsync -avr /opt/zimbra/ /opt/backup/tmp/zimbra
$ sudo /etc/init.d/zimbra start
$ sudo tar -zcvf /opt/backup/ZimbraBackupFull_`date +%Y-%m-%d.%I-%M-%S-%p`.tar.gz -C /opt/backup/tmp zimbra
Waiting your feedback...

Cheers,
Reply With Quote
  #4 (permalink)  
Old 02-22-2011, 09:13 AM
New Member
 
Posts: 4
Thumbs up

you're d best. I've been trying so many methods for a while. Your steps where just perfect without errors.
Reply With Quote
  #5 (permalink)  
Old 02-22-2011, 10:04 AM
Advanced Member
 
Posts: 220
Default

Quote:
Originally Posted by jackietomson View Post
you're d best. I've been trying so many methods for a while. Your steps where just perfect without errors.
Thank you for your feedback, good to see you happy

Sincerely,
__________________
- In a world without walls and fences who needs windows and gates?
- I am Running Linux.. Finally, my PC is valid & Reliable Hereafter.
Reply With Quote
  #6 (permalink)  
Old 02-23-2011, 08:09 AM
Special Member
 
Posts: 125
Default

# Backing Up
$ As zimbra: zmcontrol stop
$ sudo ps aux | grep zimbra (make sure everything’s stopped)
$ sudo rsync -avr /opt/zimbra /mnt/migration (this may take a while)

the above actually does the backing up of the original server, right ?



# Create a "dummy" Install Then Remove It
$ sudo Run the installer with the -s option: ./install.sh -s
$ sudo Remove the dummy install: rm -rf /opt/zimbra

# Mount Your Backup HD, rsync, and Install
$ sudo rsync -avr /mnt/migration/zimbra /opt/
$ sudo chown -R zimbra:zimbra /opt/zimbra
$ sudo run zmfixperms located in /opt/zimbra/libexec or /opt/zimbra/libexec/zmfixperms -verbose
$ sudo rerun the installer without the -s option (It will detect ZCS already installed, and ask if you want to upgrade. Select Yes)


The above does the restore to the new server, correct ?


# If the mailbox mysql.server is not running Try initializing mysql by hand:
$ As zimbra: /opt/zimbra/libexec/zmmyinit

$ sudo mkdir -p /opt/backup/tmp
$ sudo rm -rf /opt/backup/tmp/zimbra
$ sudo /etc/init.d/zimbra stop
$ sudo ps aux | grep zimbra (make sure everything’s stopped)
$ sudo ps auxww | awk '{print $1" "$2}' | grep zimbra | kill -9 `awk '{print $2}'` (Only enable the following command if you need all Zimbra user owned processes to be killed before syncing)
$ sudo kill -9 `ps -u zimbra -o "pid="`
$ sudo rsync -avr /opt/zimbra/ /opt/backup/tmp/zimbra
$ sudo /etc/init.d/zimbra start
$ sudo tar -zcvf /opt/backup/ZimbraBackupFull_`date +%Y-%m-%d.%I-%M-%S-%p`.tar.gz -C /opt/backup/tmp zimbra

What's the purpose of doing the above, are we backing up again ? Why ?
Reply With Quote
  #7 (permalink)  
Old 02-23-2011, 08:22 AM
Advanced Member
 
Posts: 220
Default

The above procedure if you which to change the server, step by step to backup the server then move the zimbra to another server. Although there is another procedure for backup.
__________________
- In a world without walls and fences who needs windows and gates?
- I am Running Linux.. Finally, my PC is valid & Reliable Hereafter.
Reply With Quote
  #8 (permalink)  
Old 02-23-2011, 08:24 AM
Special Member
 
Posts: 125
Default

# If the mailbox mysql.server is not running Try initializing mysql by hand:
$ As zimbra: /opt/zimbra/libexec/zmmyinit

$ sudo mkdir -p /opt/backup/tmp
$ sudo rm -rf /opt/backup/tmp/zimbra
$ sudo /etc/init.d/zimbra stop
$ sudo ps aux | grep zimbra (make sure everything’s stopped)
$ sudo ps auxww | awk '{print $1" "$2}' | grep zimbra | kill -9 `awk '{print $2}'` (Only enable the following command if you need all Zimbra user owned processes to be killed before syncing)
$ sudo kill -9 `ps -u zimbra -o "pid="`
$ sudo rsync -avr /opt/zimbra/ /opt/backup/tmp/zimbra
$ sudo /etc/init.d/zimbra start
$ sudo tar -zcvf /opt/backup/ZimbraBackupFull_`date +%Y-%m-%d.%I-%M-%S-%p`.tar.gz -C /opt/backup/tmp zimbra

What's the purpose of doing the above, are we backing up again ? Why ?

You don't need this part, right ? You already backedup and restored with these instructions:
# Backing Up
$ As zimbra: zmcontrol stop
$ sudo ps aux | grep zimbra (make sure everything’s stopped)
$ sudo rsync -avr /opt/zimbra /mnt/migration (this may take a while)

the above actually does the backing up of the original server, right ?



# Create a "dummy" Install Then Remove It
$ sudo Run the installer with the -s option: ./install.sh -s
$ sudo Remove the dummy install: rm -rf /opt/zimbra

# Mount Your Backup HD, rsync, and Install
$ sudo rsync -avr /mnt/migration/zimbra /opt/
$ sudo chown -R zimbra:zimbra /opt/zimbra
$ sudo run zmfixperms located in /opt/zimbra/libexec or /opt/zimbra/libexec/zmfixperms -verbose
$ sudo rerun the installer without the -s option (It will detect ZCS already installed, and ask if you want to upgrade. Select Yes)
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.