Restore from Backup

Running our Appliance (ZCA), ZCS on VMware, or any other virtual machine software? Post your thoughts here.
User avatar
JDunphy
Outstanding Member
Outstanding Member
Posts: 883
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 »

In your previous environment, you had this in your fstab:

#/dev/vdb /opt ext4 defaults,noatime 12
UUID=6d930f71-6993-4442-926a-be1a23b20f4f /opt ext4 defaults,noatime 1 2
UUID=9b046257-af4e-45c5-b1db-8461f8bc6980 /opt/ZBack/backup ext4 defaults,noatime 1 2

In your new environment /home/opt has been populated from the contents of those 2 disk mounts and is now part of the same disk partition. Is that correct?

If that is the case, you can comment out both those UUID lines in /home/etc/fstab and you no longer have other partition to mount at /opt and /opt/ZBack
skadaddle
Posts: 17
Joined: Wed Apr 04, 2018 3:11 pm

Re: Restore from Backup

Post by skadaddle »

Here are the two grub conf files...

login as: root
root@192.168.200.xx's password:
Last login: Fri Apr 6 09:42:41 2018
[root@Zimbra ~]# cat /boot/grub/grub.conf
# 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
[root@Zimbra ~]#



login as: root
root@192.168.200.xx's password:
Last login: Fri Apr 6 09:45:28 2018 from
[root@Zimbra ~]# cat /home/boot/grub/grub.conf
# 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_mail-lv_root
# initrd /initrd-[generic-]version.img
#boot=/dev/vda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
#hiddenmenu
title CentOS (2.6.32-504.12.2.el6.centos.plus.x86_64)
root (hd0,0)
kernel /vmlinuz-2.6.32-504.12.2.el6.centos.plus.x86_64 ro root=/dev/mapper/vg_mail2-lv_root rd_NO_LUKS LANG=en_US.UTF-8 rd_LVM_LV=vg_mail2/lv_root rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=128M KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM
initrd /initramfs-2.6.32-504.12.2.el6.centos.plus.x86_64.img
title CentOS (3.19.0-1.el6.elrepo.x86_64)
root (hd0,0)
kernel /vmlinuz-3.19.0-1.el6.elrepo.x86_64 ro root=/dev/mapper/vg_mail2-lv_root rd_NO_LUKS LANG=en_US.UTF-8 rd_LVM_LV=vg_mail2/lv_root rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=128M KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM
initrd /initramfs-3.19.0-1.el6.elrepo.x86_64.img
title CentOS (2.6.32-504.8.1.el6.centos.plus.x86_64)
root (hd0,0)
kernel /vmlinuz-2.6.32-504.8.1.el6.centos.plus.x86_64 ro root=/dev/mapper/vg_mail2-lv_root rd_NO_LUKS LANG=en_US.UTF-8 rd_LVM_LV=vg_mail2/lv_root rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=128M KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM
initrd /initramfs-2.6.32-504.8.1.el6.centos.plus.x86_64.img
title CentOS (2.6.32-431.29.2.el6.centos.plus.x86_64)
root (hd0,0)
kernel /vmlinuz-2.6.32-431.29.2.el6.centos.plus.x86_64 ro root=/dev/mapper/vg_mail2-lv_root rd_NO_LUKS LANG=en_US.UTF-8 rd_LVM_LV=vg_mail2/lv_root rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=128M KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM
initrd /initramfs-2.6.32-431.29.2.el6.centos.plus.x86_64.img
title CentOS (2.6.32-431.23.3.el6.centos.plus.x86_64)
root (hd0,0)
kernel /vmlinuz-2.6.32-431.23.3.el6.centos.plus.x86_64 ro root=/dev/mapper/vg_mail2-lv_root rd_NO_LUKS LANG=en_US.UTF-8 rd_LVM_LV=vg_mail2/lv_root rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=128M KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM
initrd /initramfs-2.6.32-431.23.3.el6.centos.plus.x86_64.img
title CentOS (2.6.32-431.5.1.el6.centos.plus.x86_64)
root (hd0,0)
kernel /vmlinuz-2.6.32-431.5.1.el6.centos.plus.x86_64 ro root=/dev/mapper/vg_mail2-lv_root rd_NO_LUKS LANG=en_US.UTF-8 rd_LVM_LV=vg_mail2/lv_root rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=128M KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM
initrd /initramfs-2.6.32-431.5.1.el6.centos.plus.x86_64.img
title CentOS (3.13.1-1.el6.elrepo.x86_64)
root (hd0,0)
kernel /vmlinuz-3.13.1-1.el6.elrepo.x86_64 ro root=/dev/mapper/vg_mail2-lv_root rd_NO_LUKS LANG=en_US.UTF-8 rd_LVM_LV=vg_mail2/lv_root rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=128M KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM
initrd /initramfs-3.13.1-1.el6.elrepo.x86_64.img
title CentOS (3.12.5-1.el6.elrepo.x86_64)
root (hd0,0)
kernel /vmlinuz-3.12.5-1.el6.elrepo.x86_64 ro root=/dev/mapper/vg_mail2-lv_root rd_NO_LUKS LANG=en_US.UTF-8 rd_LVM_LV=vg_mail2/lv_root rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=128M KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM
initrd /initramfs-3.12.5-1.el6.elrepo.x86_64.img
title CentOS (3.10.10-1.el6.elrepo.x86_64)
root (hd0,0)
kernel /vmlinuz-3.10.10-1.el6.elrepo.x86_64 ro root=/dev/mapper/vg_mail2-lv_root rd_NO_LUKS LANG=en_US.UTF-8 rd_LVM_LV=vg_mail2/lv_root rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=128M KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM
initrd /initramfs-3.10.10-1.el6.elrepo.x86_64.img
[root@Zimbra ~]#
skadaddle
Posts: 17
Joined: Wed Apr 04, 2018 3:11 pm

Re: Restore from Backup

Post by skadaddle »

OK, I opened the /home/etc/fstab and edited the file. I placed the # infront of each of those UUID lines...

#
# /etc/fstab
# Created by anaconda on Wed Jan 4 00:23:15 2012
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/vg_mail2-lv_root / ext4 defaults,noatime 1 1
/dev/vda1 /boot ext4 defaults 1 2
#/dev/vdb /opt ext4 defaults,noatime 1 2
# UUID=6d930f71-6993-4442-926a-be1a23b20f4f /opt ext4 defaults,noatime 1 2
# UUID=9b046257-af4e-45c5-b1db-8461f8bc6980 /opt/ZBack/backup ext4 defaults,noatime 1 2

/dev/mapper/vg_mail2-lv_swap swap swap defaults 0 0
#
#####
# This Zimbra backup drive is mounted at the end of the
# init startup process. Ref. /etc/rc.d/rc.local
#
# /dev/sda /opt/ZBack/backup ext4 _netdev 0 0
####
#
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
tmpfs /opt/zimbra/data/amavisd/tmp tmpfs defaults,noexec,nodev,nosuid,size=1024m,mode=750,uid=zimbra,gid=zimbra 0 0

#####
## FTP Server Data Mappings
/opt/ftp/virtual_users/ACO\040Course /opt/ftp/virtual_users/csmith/ACO\040Course none rw,bind 0 0
/opt/ftp/virtual_users/ACO\040Course /opt/ftp/virtual_users/cseaton/ACO\040Course none rw,bind 0 0
/opt/ftp/virtual_users/ACO\040Course /opt/ftp/virtual_users/srichter/ACO\040Course none rw,bind 0 0
/opt/ftp/virtual_users/ACO\040Course /opt/ftp/virtual_users/anon_home/ACO\040Course none r,bind 0 0
/opt/ftp/virtual_users/ACO\040Course /opt/ftp/virtual_users/kbanasky/ACO\040Course none r,bind 0 0
User avatar
JDunphy
Outstanding Member
Outstanding Member
Posts: 883
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 thinking add this to /boot/grub/grub.conf below the other entry

Code: Select all

root (hd0,1)
kernel /vmlinuz-2.6.32-504.12.2.el6.centos.plus.x86_64 ro root=/dev/mapper/vg_mail2-lv_root rd_NO_LUKS LANG=en_US.UTF-8 rd_LVM_LV=vg_mail2/lv_root rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=128M KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM
initrd /initramfs-2.6.32-504.12.2.el6.centos.plus.x86_64.img
title Zimbra CentOS (3.19.0-1.el6.elrepo.x86_64)
Make the changes to /home/etc/fstab that I mentioned ... Ooops just saw this. Comment this line out also. /dev/vda1 /boot ext4 defaults 1 2 ... you now have this /home/boot which is included in your disk but was previously a partition.
reboot and choose this second kernel


WAIT..... just realized that grub.conf appears to be out of order... need to figure out last kernel you guys used.
User avatar
JDunphy
Outstanding Member
Outstanding Member
Posts: 883
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 »

You are defaulting to the entry I chose but did you pick another kernel each time?
User avatar
JDunphy
Outstanding Member
Outstanding Member
Posts: 883
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 »

Should be this entry to add if you didn't choose.

Code: Select all

title Zimbra CentOS (2.6.32-504.12.2.el6.centos.plus.x86_64)
root (hd0,1)
kernel /vmlinuz-2.6.32-504.12.2.el6.centos.plus.x86_64 ro root=/dev/mapper/vg_mail2-lv_root rd_NO_LUKS LANG=en_US.UTF-8 rd_LVM_LV=vg_mail2/lv_root rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=128M KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM
initrd /initramfs-2.6.32-504.12.2.el6.centos.plus.x86_64.img
User avatar
JDunphy
Outstanding Member
Outstanding Member
Posts: 883
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 »

Guess you could add 2 entries /boot/grub/grub.conf if you don't know why you had a newer kernel that wasn't the default.

Code: Select all

title Zimbra-2 CentOS (3.19.0-1.el6.elrepo.x86_64)
root (hd0,1)
kernel /vmlinuz-3.19.0-1.el6.elrepo.x86_64 ro root=/dev/mapper/vg_mail2-lv_root rd_NO_LUKS LANG=en_US.UTF-8 rd_LVM_LV=vg_mail2/lv_root rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=128M KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM
initrd /initramfs-3.19.0-1.el6.elrepo.x86_64.img
This would give you a few options to try on reboot. I am thinking 20% it boots - What do you think of our chances? :-) If it fails pick the first choice (what we have now) and we go back to the drawing board depending on the messages for the fail.
skadaddle
Posts: 17
Joined: Wed Apr 04, 2018 3:11 pm

Re: Restore from Backup

Post by skadaddle »

I got a bit lost with your surge of posts... sorry...

so you want me to modify the /boot/grub/grub.confi and add these lines to it?

if yes, where do I put them? at the top?
skadaddle
Posts: 17
Joined: Wed Apr 04, 2018 3:11 pm

Re: Restore from Backup

Post by skadaddle »

I opened this file /boot/grub/grub.confi

and modified it to look like this... is that what you want?

# 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

title Zimbra-2 CentOS (3.19.0-1.el6.elrepo.x86_64)
root (hd0,1)
kernel /vmlinuz-3.19.0-1.el6.elrepo.x86_64 ro root=/dev/mapper/vg_mail2-lv_root rd_NO_LUKS LANG=en_US.UTF-8 rd_LVM_LV=vg_mail2/lv_root rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=128M KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM
initrd /initramfs-3.19.0-1.el6.elrepo.x86_64.img
User avatar
JDunphy
Outstanding Member
Outstanding Member
Posts: 883
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 »

Put them below your current kernel entry... Each group is a kernel to boot from. We leave what you have so you can get back to this current configuration should it fail. The other 2 entries represent choices of kernels to pick on boot up.
Does that make sense? You can show me what you have by doing this after you are done if you are not sure:

Code: Select all

cat /boot/grub/grub.conf
Post Reply