Hy,
Beginner here si please bare with me for any stupid decisions....I try to create a simple backup/restore solution for CentOS 7 Samba server, for root (OS) partition (like Acronis Trueimage for Windows or Clonezilla). It runs everything on 2 drives in RAID1+separate HDD for backup,i keep samba shares on separated partition and i make backups on that with rsnapshot/rsync. So what i do is to create level 0 xfsdump to a file on separate HDD every 1 week like this:
xfsdump -l 0 -M CentOS -L "Backup level 0 of ROOT `date`" -f /backup/ROOT_DUMP /
I wold like to restore this dump image to new server or drives in case of emergency. I try to restore this to new drives (i experiment in KVM/QEMU and on test PC) however - OS does not boot. Error is that dracut-initramfs cann't find new "RAID HDD" (/dev/disk/by-UUID/*******). UUID for new RAID array is correct but this does not work. I do this:
Build new RAID1 (Fedora Live boot cd):
1. mdadm --create --verbose /dev/md0 --level=mirror --raid-devices=2 /dev/sda1 /dev/sdb1 --metadata=0.90
2. format md0 drive - XFS > mount md0 to /mnt
3. Xfsrestore -f ROOT_DUMP /mnt
4. mdadm -Es > replace UUID of RAID array in mdadm.conf and grub.cfg and fstab (dev/sda1 UUID in this case)
mdadm -Es > RAID UUID zamijenit u grub.cfg
5. Grub 2 restore (md0 is mounted on /mnt):
sudo mount --bind /dev /mnt/dev &&
sudo mount --bind /dev/pts /mnt/dev/pts &&
sudo mount --bind /proc /mnt/proc &&
sudo mount --bind /sys /mnt/sys &&
sudo chroot /mnt
grub2-install /dev/sda
grub2-install /dev/sdb
grub2-mkconfig -o /boot/grub2/grub.cfg
6. reboot to OS
And nothing...tried also to tinker with initramfs but same result:
dracut -f /boot/initramfs-2.6.32-358.el6.x86_64.img 2.6.32-358.el6.x86_64 (depending on installed kernel)
What am i doing wrong?
Restoring RAID1 from xfsdump
-
- Posts: 2019
- Joined: 2015/02/17 15:14:33
- Location: Bulgaria
- Contact:
Re: Restoring RAID1 from xfsdump
Have you compared your steps to the Red Hat's guide?
-
- Posts: 4
- Joined: 2017/09/20 07:40:43
Re: Restoring RAID1 from xfsdump
I compared my solution to this:hunter86_bg wrote:Have you compared your steps to the Red Hat's guide?
https://access.redhat.com/documentation ... store.html
I don't see difference...do you have in mind some other guide?
P.S. - tried this on Debian briefly - it works so i know it is probably something in CentOS i need to change for it to work. Selinux is disabled when XFSDUMP was made so that should not be the problem...
-
- Posts: 2019
- Joined: 2015/02/17 15:14:33
- Location: Bulgaria
- Contact:
Re: Restoring RAID1 from xfsdump
Could you try the following:
1.Create a dump
2.Load the Install DVD
3.Remove the files manually
4.Restore from the dump and boot from the restored machine
1.Create a dump
2.Load the Install DVD
3.Remove the files manually
Code: Select all
rm -rf /mnt/sysimage/*
-
- Posts: 4
- Joined: 2017/09/20 07:40:43
Re: Restoring RAID1 from xfsdump
I tried something similar - i deatached two raid drives and connected two new drives and tried to do xfsrestore from image (third drive) - same problem. I don't understand.hunter86_bg wrote:Could you try the following:
1.Create a dump
2.Load the Install DVD
3.Remove the files manually4.Restore from the dump and boot from the restored machineCode: Select all
rm -rf /mnt/sysimage/*
P.S.tried same thing with Fedora - works. Could this be a bug or is it maybe something about my hardware that makes problems?
-
- Posts: 2019
- Joined: 2015/02/17 15:14:33
- Location: Bulgaria
- Contact:
Re: Restoring RAID1 from xfsdump
It seems to be lacking a 'feature'.Just open a bug in bugzilla.