Restore from Backup

Running our Appliance (ZCA), ZCS on VMware, or any other virtual machine software? Post your thoughts here.
skadaddle
Posts: 17
Joined: Wed Apr 04, 2018 3:11 pm

Restore from Backup

Post by skadaddle »

Hello, I am new to CentOS and Zimbra and I hope you can help... We had an old Zimbra server running on CentOS 6.6 The server died. I had a FULL backup of the server. I built a Centos 6.6 Virtual machine on a Windows Hyper-v server.
I then restored the files/folders to a large partition on the virtual machine. Rebooted the VM. I can see the file/folder structure on the large partition. But, I can't get to the WEB UI via the IP address https://x.x.x.x:7071
I suspect that since the files/folders were restored to the partition and not to the root OS that there are things that are not running. apache web server, zimbra control services etc...

The root OS partition is only 50GB and the backed up zimbra files/folders are 614GB. That is why I had to restore to the large Partition (1.2TB)
what do I need to do to get zimbra running again?

Thanks for your guidance and Patience while I work through this...

-Michael
Martinwiertz
Advanced member
Advanced member
Posts: 85
Joined: Sat Sep 13, 2014 3:55 am
Location: The Netherlands
ZCS/ZD Version: V10 FOSS Intalio on Ubuntu20.04

Re: Restore from Backup

Post by Martinwiertz »

Not an expert but enthousiast private user/admin of Zimbra 888

Are the services started?
Terminal
Su Zimbra
zmcontrol status

What version of Zimbra?
Zmcontrol -v
skadaddle
Posts: 17
Joined: Wed Apr 04, 2018 3:11 pm

Re: Restore from Backup

Post by skadaddle »

Hello Marinwiertz, Thank you for responding so quickly. No none of the services are started. Like I mentioned in the post. The files and folders that were restored from the backup are not on the root directory because the root directory was not big enough to hold all the files and folders from the backup. maybe that is the answer.... I need to somehow create a virtual machine and when installing the new Centos OS to create the primary drive to be big enough to hold all the files and folders from the backup. That way when I restore them they will all be in the drive that is the boot drive... or is it possible to change the boot partition to the partition that is holding all the files and folders.....???
User avatar
JDunphy
Outstanding Member
Outstanding Member
Posts: 889
Joined: Fri Sep 12, 2014 11:18 pm
Location: Victoria, BC
ZCS/ZD Version: 9.0.0_P39 NETWORK Edition

Re: Restore from Backup

Post by JDunphy »

skadaddle wrote:Like I mentioned in the post. The files and folders that were restored from the backup are not on the root directory because the root directory was not big enough to hold all the files and folders from the backup. maybe that is the answer.... I need to somehow create a virtual machine and when installing the new Centos OS to create the primary drive to be big enough to hold all the files and folders from the backup. That way when I restore them they will all be in the drive that is the boot drive... or is it possible to change the boot partition to the partition that is holding all the files and folders.....???
Is your question, that you don't have /opt/zimbra and its somewhere else now? Very confusing how you are wording this. You can also resize a filesystem, use another virtual disk for zimbra and then mount it /opt/zimbra but that is probably a more advanced technique if you are not familiar with linux or unix concepts. Try one of these one liners to see if it gets you farther. Pick symlink first.
Assuming /opt/zimbra doesn't exist.

Code: Select all

ln -s /where/you/put/zimbra /opt/zimbra
You could also do a bind mount.

Code: Select all

mount -o bind /where/you/put/zimbra /opt/zimbra
Zimbra expects to be installed in /opt/zimbra ... Provided this is a full OS backup, then you should be fine. If this isn't a full backup of the centos 6.6 then you need to explain this because creating a symlink isn't going to help much here and would be the wrong solution until you install just the software first. Hint: ./install.sh -s --skip-activation-check . If the ip address has changed for the machine, it would be a good time to share that since zimbra isn't going to allow you to send outgoing email until you configure the new ip address and a few config files may have that old ip address hardcoded. (ie. amavisd.conf, opendkim-localnets.conf, etc)
I don't see why you should have much trouble getting this running if you have a full backup of the machine.
skadaddle
Posts: 17
Joined: Wed Apr 04, 2018 3:11 pm

Re: Restore from Backup

Post by skadaddle »

Thanks for your feedback. let's see if I can make this clear. not sure if this is possible since I am not very familiar with Linux…

I created new Virtual machine (VM) to restore the old Zimbra mail server on it. This new VM has a root partition with the new CentOS 6.6 operating system on it. That partition is 50GB

The second partition 1.2TB on this new VM , has all the files/folders from the restored Backup. I can see the a directory on the 2nd partition called /opt/zimbra. But, when the VM boots up. it boots from the 1st partition.

Can we make the second partition the bootable partition? Or at least give an option menu as to which partition to boot from?

Yes, the IP address for the VM is the same as the old Zimbra server that died.

Does that make sense?

attached is a screenshot from the VM.

Thanks for your help.
Attachments
screenshot of df -h from the new VM
screenshot of df -h from the new VM
Capture.JPG (26.04 KiB) Viewed 26446 times
User avatar
JDunphy
Outstanding Member
Outstanding Member
Posts: 889
Joined: Fri Sep 12, 2014 11:18 pm
Location: Victoria, BC
ZCS/ZD Version: 9.0.0_P39 NETWORK Edition

Re: Restore from Backup

Post by JDunphy »

I am still confused.

On that second partition, do you have only /opt/zimbra on it or is that the entire backup of the old physical server that was running zimbra which includes the previous centos operating system, zimbra, etc. In that case, your primary or current boot partition is what... a vanilla centos 6.6 install that you performed and not related in anyway to your full backup of your zimbra server? If that is the case, you will need to navigate your virtualization software to boot from the secondary partition as you mention.

While I can't speak to that since I don't know your virtualization software, what you do next is based on how you built that second partition if it contains an image of the OS. If you did it with a block level copy then you will have everything you need in the boot records to simply point and boot via your virtualization software. If you did this at the file level then you need to research grub, set the boot flag for that secondary partition before you have any success I would think.

Another way is to take your current centos 6.6 install that boots... install the zimbra software only, then mount the second partition with just the zimbra files as /opt/zimbra or use a symlink or use a bind mount so that those old /opt/zimbra files are in place. All depends on what that backup really means. We do physical zimbra machine transfers at the file level all the time so it's not complicated but there are certain steps to perform. It's only 2-3 steps but this is how we practice disaster recovery of losing DC's and servers.

I kind of think you did the following.

1) created a new centos VM (may or may not match old version of centos)
2) copied the old zimbra server at the file system level to a partition which includes the old OS files in addition to zimbra files and data
3) mounted that zimbra partition on your new centos VM which you have booted
4) tried to login to zimbra :-)

With either method, you should expect to have this backup and running with minimal issues given you have a full backup of the zimbra files and data.

HTH,

JIm
skadaddle
Posts: 17
Joined: Wed Apr 04, 2018 3:11 pm

Re: Restore from Backup

Post by skadaddle »

Hello Jim, Thank you for working with me on this. your analysis is spot on. I did a file level backup of the entire old zimbra server. I placed the entire backup on the 2nd partition of the vanilla virtual machine running Centos 6.6. I would appreciate the steps to make that 2nd partition bootable.

Like I mentioned before. I don't know much about Centos and would really appreciate the instructions to get this 2nd partition bootable. I don't need to send or receive emails from the zimbra server. I just need to be able to open individual mailboxes to retrieve emails... let me know what information you need to formulate a plan. screenshot of the file structure is below...
Attachments
Screenshot.jpg
Screenshot.jpg (121.71 KiB) Viewed 26416 times
User avatar
JDunphy
Outstanding Member
Outstanding Member
Posts: 889
Joined: Fri Sep 12, 2014 11:18 pm
Location: Victoria, BC
ZCS/ZD Version: 9.0.0_P39 NETWORK Edition

Re: Restore from Backup

Post by JDunphy »

This is going to challenge you. :-)

Can you paste the result of this:

Code: Select all

fdisk -l
cat /proc/partitions 
General Steps:
1) toggle boot flag in your backup partition
2) install the bootloader ... see this for reference for your os: https://wiki.centos.org/HowTos/GrubInstallation. You have the live-cd case.
3) update your vm to boot from this partition.

Generally you would perform a physical machine to vm migration so there is a chance this isn't going to boot if you are missing kernel drivers for your vm. Also if you made any mistakes in recreating this OS image in your backup partition, then this will not boot and you will need to use the other method I mentioned where you would use the current disk which has / and /boot partition and install the zimbra software then link that zimbra backup into /opt/zimbra via symlink or bind mount. Only way to know is to try and boot it. You may find better support on the centos forums for steps required to fix a broken centos install.
skadaddle
Posts: 17
Joined: Wed Apr 04, 2018 3:11 pm

Re: Restore from Backup

Post by skadaddle »

Hello Jim, here is the screenshot of the cat /proc/partitions command. I'll read through the article you mentioned. as far as the steps you mentioned. I have no idea how to do that. maybe the article will help... I'll get back to you.
Attachments
Capture_Proc_Partitions.JPG
Capture_Proc_Partitions.JPG (103.55 KiB) Viewed 26229 times
skadaddle
Posts: 17
Joined: Wed Apr 04, 2018 3:11 pm

Re: Restore from Backup

Post by skadaddle »

Jim, here is the grub.conf file... can we modify this to allow me to choose which partition to boot from?

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/mapper/vg_zimbra-lv_root
# initrd /initrd-[generic-]version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS 6 (2.6.32-504.el6.x86_64)
root (hd0,0)
kernel /vmlinuz-2.6.32-504.el6.x86_64 ro root=/dev/mapper/vg_zimbra-lv_root rd_NO_LUKS rd_LVM_LV=vg_zimbra/lv_root LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto rd_LVM_LV=vg_zimbra/lv_swap KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
initrd /initramfs-2.6.32-504.el6.x86_64.img
Post Reply