Nethserver - How do you backup and RESTORE

@Andy_Wismer
@mrmarkuz

Started a try with clonezilla. Mode disk-to-remote-disk. Problem could (will) be booting. Any chance to fix this with the installer (rescue mode, repair mode) from NS iso? Anybody done this before?

@schulzstefan

Booting should be possible…
Problems are often if a Software RAID was involved on the source machine, if using a hardware RAID like in a HP Proliant, this should not pose any special issues…

In any cases, let’s assume I run into boot problems. Is there a repair option on the install iso? Can’t remember… too much the last days…

There is a recovery mode, and the system also has a recovery mode, if it only boots partly (eg problems mounting hardware / disks)…

Something like this: https://www.tecmint.com/recover-or-rescue-corrupted-grub-boot-loader-in-centos-7/

Proxmox is sooo cool, even for such stuff… :slight_smile:

You can also use SystemRescueCD (Anyway a good tool to have in one’s toolkit…) to rescue / repair such a NS…
Keep an Image on Proxmox under ISOs, but also a copy on CD or USB stick.

Good catch!

Would have been too nice…

dracut initqueue /dev/centos_saturn/root does not exist
…swap does not exist
…/dev/mapper/ … does not exist

Entering emergeny mode
dracut:/:

Any idea?

@schulzstefan

Hi

Try the “drastic” method above:

Install or start off with a “virgin” NethServer in a VM.
Both servers need to be able to “see” each other on the network, to transfer via rsync all folders / mail.
The first steps are fairly safe and easy, later on it’s best to do small steps, and save a backup or snapshot inbetween…

I found this old doc in my library, a migration from a friends hardware based Nethserver to a newer box, as the old box died when my friend was on vacation due to a power outage / storm.

Even though I had different hardware on both boxes, I was able to migrate 95% of the defective hard-disk…

I mounted the old disk (as the old hardware was dead) using a USB adapter in a workstation, and rsynched all the data to the newer server. I left out the hardware configuration.


rsync Migration ABHO-NethServer

rsync -avzu -e ssh --delete /mnt/old-b/etc/ root@192.168.209.20:/AAB/etc/
rsync -avzu -e ssh --delete /mnt/old-b/root/ root@192.168.209.20:/AAB/root/
rsync -avzu -e ssh --delete /mnt/old-b/usr/ root@192.168.209.20:/usr/
rsync -avzu -e ssh --delete /mnt/old-b/srv/ root@192.168.209.20:/srv/
rsync -avzu -e ssh --delete /mnt/old-b/sys/ root@192.168.209.20:/sys/
rsync -avzu -e ssh /mnt/old-b/var/ root@192.168.209.20:/var/
rsync -avzu -e ssh --delete /mnt/old-b/var/lib/pgsql/ root@192.168.209.20:/var/lib/pgsql/
rsync -avzu -e ssh --delete /mnt/old-b/var/lib/mysql/ root@192.168.209.20:/var/lib/mysql/
rsync -avzu -e ssh --delete /mnt/old-b/var/www/ root@192.168.209.20:/var/www/
rsync -avzu -e ssh --delete /mnt/old-b/usr/share/zabbix/ root@192.168.209.20:/usr/share/zabbix/

Note that /etc and /root of the old server do not overwrite the folders on the new server, they go into /AAB/ temporarily…

Hope this helps…

This helped:

  1. boot centos NS iso in rescue mode
  2. chroot in /mnt/sysimage
  3. Kernel Panic - after update
  4. Is working with the CentosKernel - NOT with the Nethserver latest kernel. Don’t know why? Will try a yum update…

With the Centos it seems to work.

edit:

Uninstalled the NS kernel, did a update, everything’s fine for the moment.

1 Like

Now, as for my setup the only way to backup and restore to different hardware or a vm seems to be clonezilla, here comes the next question: how to I restore/move the VM to another VM? The goal was to install proxmox on the HP proliant. What would be the proper way?

Hi

You use Proxmox backup / restore.

Proxmox on a single box will allow you to make a backup of your VM on local (If you have enough space - Backups are compressed!).

You can use external storage (like USB) to move your VM from one box to your “new” proxmox, or transfer / copy the files over with ssh/scp.

As I use shared storage, this becomes even simpler…
I can click on Migrate, wait 90 seconds, NO shutdown of VM needed!

A Proxmox Backup Server, my home one uses an old Fujitsu PC with 8 GB RAM, a 500 GB SSD for System, and 2 2TB Disks for Storage in ZFS-Mirror. Very fast, I have now a total of 200 Backups, and only about a third of the RAID used. Before I had only 10 Backups (Total for all VMs!).

The disk right now is about 1TB. Used space is apprx. 180 GB. How do I shrink to let’s say 350 GB?

XFS can’t easily be “schrunk”…
Best option is - once it’s running as a VM - another VM next to it and either via backup / Restore or copying over everything…

A lot of work initially, but well worth it in the time saved daily by backups…

To make this fast, I usually shut down the new (smaller) VM, mount it’s virtual HD in the source VM, and copy everything over…

@Andy_Wismer

Job was running this night on an USB storage. Am I wrong - restore to another proxmox hardware would be exactly the same size of the HD’s?

All attributes set remain intact if transfered to another Proxmox host.
This includes MAC Address, Dik size, and eg for Windows even the Hardware Serial nr, if set in Proxmox BIOS (Windows ROK License).

I thought so… I’ll give (again) the disaster backup/restore a chace. We’ll see.

Machine is HP Proliant ML350e Gen8 V2, 1 xeon E5-2430v2, Six core 2,5 GHz, 32 GB RAM.

There’ll be two VM’s on the server. One NS and one SME 9.2 with mailarchiva running. What do you suggest?

quad core and dual or both quad core.
NS 16 GB, SME 8 GB RAM…

@Andy_Wismer

Data-restore on the new VM failed.Issued from the cli out of the pv with restore-data -b xxx. Reason(s): Error No 17 file already exists. I installed before the whole restore-process the firebird-superserver. Error is related to files belonging to that package(s). What is recommended? Should I remove the firebird and start over? Is there a way to restore from the cli