Disaster Recovery issue

NethServer Version: NethServer release 7.6.1810 (final)
Module: Backup

Hi Everyone,

I have an issue with disaster recovery.

Context:
My HDD is dying so got a new HDD, installed on the Server.
I am backing up to an 8 TB USB, configured in the GUI.
Installed Latesest Nethserver (my old server was on the same version) from ISO and configured it using the backup-config.tar.xz at first launch wizard.
Once this was done, I saw all users back, virtual hosts etc… restored, so was moving on to recover the data.
I had perviously (here) issues with it in the GUI, so moved to CL and thats where I have my problem.

Issue:
SSH into the server and get the following error when typing in: “restore-data”

[root@hnm ~]# restore-data
No name given at /sbin/e-smith/restore-data line 38.

Went through the docs and forums again and typed in: “restore-data -b backup-data

Restore started at 2019-02-10 20:57:02
Can’t open directory /etc/e-smith/events/pre-restore-data

Ran backup-data-list -b backup-data -> shows a ton of files
Ran backup-data-list -b backup-data > /tmp/backupfiles.txt -> this created a 15 MB file showing the details

This is my config:

[root@hnm ~]# config show backup-data
backup-data=configuration
IncludeLogs=enabled
[root@core ~]# db backups show
backup-data=duplicity
BackupTime=0 7 * * *
CleanupOlderThan=28D
FullDay=0
NFSHost=
NFSShare=
Notify=always
NotifyFrom=backup@domain.com
NotifyTo=notify@domain.com
SMBHost=
SMBLogin=
SMBPassword=
SMBShare=
Type=full
USBLabel=backup
VFSType=usb
VolSize=250
WebDAVLogin=
WebDAVPassword=
WebDAVUrl=
status=enabled
[root@hnm ~]#

Can anyone help me how to progress with disaster recovery?

Your USB support is mounted correctly? If you go in /mnt/backup-backup-data/servername directory you can see duplicity files?

After restore-config you haven’t rebooted, correct?

Hi Frederico,
Thanks for the quick response.
I think i did reboot, cause i was running software updates after the restore-config.
In the meantime i reinstalled the system again and am on doing the restore-config just now.
Shall i skip reboot after software updates?

Have you restored from Wizard? You can also restore after wizard with restore-config uploading file in /var/lib/nethserver/backup

Yes, don’t reboot after restore-config: you have to restore data first.

Yes, i have restored using the first launch Wizard.
This is where i am now:


So, once it is finished with the restor-config, just SSH to the server and run “restore-data -b backup-data”?

First install missing packages from Software Center (probably wizard has reinstalled them automatically) and then
restore-data -b backup-data

Check also these things before launch command:

  • correct backup configuration with command db backups show
  • usb backup disk mounted correctly (check if you can see duplicity files in /mnt/backup-backup-data/servername - path has been similar to this -). If not I think you have to mount the disk with blockdev --rereadpt /dev/sdc where you have to replace “sdc” with your disk.

Give me some feedbacks.
Thanks.

Am on 26% now, with installing the missing packges.
I will follow your steps, but just curious.
Should the retosre-data not mount the usb?
And i think if the usb was not mounted, then it wouldn’t have been able to run backup-data-list -b backup-data succesfully?

Probably yes.

Backup data list If I not remember wrong is in a server cache and not reading directly from USB

The “db backups show” displays the correct backup settings:

backup-data=duplicity
BackupTime=0 7 * * *
CleanupOlderThan=28D
FullDay=0
NFSHost=
NFSShare=
Notify=always
NotifyFrom=backup@domain.com
NotifyTo=notify@domain.com
SMBHost=
SMBLogin=
SMBPassword=
SMBShare=
Type=full
USBLabel=backup
VFSType=usb
VolSize=250
WebDAVLogin=
WebDAVPassword=
WebDAVUrl=
status=enabled

There is nothing mounted unser /mnt/.
Running lsblks shows the 8TB USB as sdb:
2

Go on /mnt/backup-backup-data with cd command.

-bash: cd: /mnt/backup-backup-data: No such file or directory

I can cd to /mnt/ and then run ls, which displays nothing in that folder.

ls -l /mnt what is displaying?

total 0

Try this command replacing sdc with sdb (sdb I think is your USB disk, correct?). And then check mnt folder.
Then you can restore data.

Nope, doesn’t want to.
3
I plugged in the HDD to another linux machine, where i can see all the duplicity files properly

Cecking /etc/e-smith/events/, there is no folder called pre-restore-data:

Does this explains the error?:
Can’t open directory /etc/e-smith/events/pre-restore-data

Yes. I wanted to get you to check that.
Try create directory (mkdir) pre-restore-data with these permissions (755):
drwxr-xr-x. 2 root root 6 Jan 31 05:02 pre-restore-data

1 Like

looks promising:
5
Can i assume this is not standard behaviour? :smiley:

Yes, but I’ve installed two new servers with 7.6 iso and haven’t got this problem… strange, but I think the problem is relative of your own server and it’s not a “general bug”.
The only thing that I can think is that restore-data from wizard create a conflicts. I will check it on a VM tomorrow and get you a feedback.
When I restored a config I always bypass restore from wizard and I put backup-config.tar.xz in /var/lib/nethserver/backup and launch command restore-config and then restore-data.

News about your data restore?

1 Like

It is still running the synchronization to local cache.
I will let it run through the night.
Stange is, i reinstalled the Server twice, and had the exact same issue both times.
Though i never tried it your way, like bypassing the wizard.
I see in the morning if it ran through successfully.
Thanks for the help :slight_smile:

1 Like