My hardware setup is
- CPU x64
- RAID6 with 7 disks (yes, I will change to snapraid)
- SSD with operating system OMV4 connected to SATA port
- backup flash USB option (if SSD does not work, I plug in usb and restart)
- The BIOS boot order should be setup so that it boots firstly from the USB slot and secondly from the normal OMV disk. That way, if no USB is connected, the system will boot the normal operating system. But with USB connected it will boot the emergency option first. This comes in handy if booting from normal disk fails and you don't want to open the case or connect a headless server with a keyboard and monitor to choose boot options.
My software setup is
- OMV 4.1.17
- I made a backup with the backup-plugin from the Web-GUi.
- Backup setting: fsarchiver (no password)
- Backup destination: The easiest way to do the backup was to my RAID-array.
This might not be the best solution. Or, if you backup to the array, then you probably should copy it from there to some other destitination which you should be able to access even if your RAID array is not accessible. The same goes for Snapraid-array and other filesystems.
Now, what to do to restore this backup:
In my case my operating system was broken. So I could not boot from the installed SSD.
Please be carefull with the commands here. I put YOUSHOULDKNOW everywhere you should recognise that if you don't know what to do or write here you probably should not do it anyway.
1 - Plugin emergency OS (USB), reboot
2 - Start OMV Web-GUI
3 - I had to install SystemRescueCD to the OMV. Normally, this should already be part you your backup OMV. To install it go to OMV-Extras/Kernel.
4 - Tell OMV on this page to boot from SystemRescueCD once.
5 - Reboot.
6 - Login via SSH (Putty) to the command line of SystemRescueCD. Username: root, Password: openmediavault.
Now, you have to find the backup files. In my case they are on my RAID array and I have to mount it to access it. In your case you will have to adjust this but probably mounting a device will be necessary.
7 - Check your RAID array: mdadm -D /dev/YOUSHOULDKNOW
8 - My array was running fine.
9 - Make a mountpoint in /mnt: mkdir /mnt/YOUSHOULDKNOW
10 - Mount array to mountpoint: mount /dev/YOUSHOULDKNOW /mnt/YOUSHOULDKNOW
11 - Move to backup directory on array
12 - Check your backup: fsarchiver archinfo backup.fsa
(Find out source partition, in my case the backup did not include the swap-partition, so I was pretty sure to backup just TO the first partition of my system disk)
13 - Find out what device name the disk has you want to install the files from the backup on: blkid
14 - This I did not do, but is recommended: If you are restoring to a new disk, write the backup of grub and the partition table (.grubparts file) to the disk before the fsarchiver restfs step with:
dd if=/mnt/YOUSHOULDKNOW/backup.grubparts of=/dev/YOUSHOULDKNOW
15 - Extract the backup to that drive (and correct partition): fsarchiver restfs backup.fsa id=0,dest=/dev/YOUSHOULDKNOW
(id=0 means that just the first filesystem from the backup will be restored. I am assuming that you did just backup one filesystem with one backup.)
16 - reboot with: reboot
EDIT: I had a problem with "A start Job is running" on startup. I solved this by deleting an old filesystem via Web-GUI of a USB-harddisk that I disconnected, and by commenting a line in /etc/fstab that was referring to a wrong swap-partition. Boot time is now 11 seconds.
Thanks a lot to ryecoaaron for writing this plugin.
Further information regarding the files the plugin is saving:
backup-omv-18-Jan-2019_14-12-01.blkid :: This is the output of blkid put in a file for informational purposes.
backup-omv-18-Jan-2019_14-12-01.fdisk :: This is the output of fdisk -l put in a file for informational purposes.
backup-omv-18-Jan-2019_14-12-01.fsa :: This is the fsarchiver file.
backup-omv-18-Jan-2019_14-12-01.grub :: This is the first 446 bytes of the disk where grub is installed
backup-omv-18-Jan-2019_14-12-01.grubparts :: This is the first 512 bytes of the disk where grub is installed and the partition table.
backup-omv-18-Jan-2019_14-12-01.packages :: This is the output of dpkg -l | grep openmediavault put in a file for informational purposes.