Results 1 to 8 of 8

Thread: Backup and Restore for Zimbra Open Source

  1. #1
    emcampos is offline Senior Member
    Join Date
    Jan 2009
    Location
    manila
    Posts
    59
    Rep Power
    6

    Default Backup and Restore for Zimbra Open Source

    I am running Zimbra on Ubuntu.
    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.

  2. #2
    uxbod's Avatar
    uxbod is offline Moderator
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,016
    Rep Power
    24

    Default

    No, you will need to copy the whole lot! Do you not have some external storage you could connect ?

  3. #3
    snake_eyes's Avatar
    snake_eyes is offline Advanced Member
    Join Date
    Nov 2008
    Posts
    237
    Rep Power
    6

    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,

  4. #4
    jackietomson is offline Junior Member
    Join Date
    Feb 2011
    Posts
    5
    Rep Power
    4

    Thumbs up

    you're d best. I've been trying so many methods for a while. Your steps where just perfect without errors.

  5. #5
    snake_eyes's Avatar
    snake_eyes is offline Advanced Member
    Join Date
    Nov 2008
    Posts
    237
    Rep Power
    6

    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.

  6. #6
    spectra is offline Special Member
    Join Date
    Oct 2009
    Posts
    147
    Rep Power
    5

    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 ?

  7. #7
    snake_eyes's Avatar
    snake_eyes is offline Advanced Member
    Join Date
    Nov 2008
    Posts
    237
    Rep Power
    6

    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.

  8. #8
    spectra is offline Special Member
    Join Date
    Oct 2009
    Posts
    147
    Rep Power
    5

    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)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 210
    Last Post: 01-17-2012, 01:19 AM
  2. mailbox backup & restore on open source version
    By Artturi in forum Administrators
    Replies: 3
    Last Post: 07-30-2010, 04:26 PM
  3. Open Source Edition Backup
    By mvalenzuela.cl in forum Administrators
    Replies: 1
    Last Post: 10-27-2008, 09:29 AM
  4. Hot backup question on open source?
    By cfigurelli in forum Administrators
    Replies: 7
    Last Post: 10-09-2008, 01:43 AM
  5. zimbra backup and restore - open source edition
    By kmuralidharan in forum Administrators
    Replies: 5
    Last Post: 08-23-2007, 08:37 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
  •