Custom data backup

Hi @steve

Sure! I’ll post the steps here when I start (Sunday), and add on to it.
At the end, it will become a howto… :slight_smile:

As I do have quite a few new clients / setups to migrate, it’ll come handy for myself.

Afterthought: I’ll probably create a new Post with rsync in the title and post the link here…

My 2 cents
Andy

@Andy_Wismer
I also wonder below how to you choose the right VPS for your home server. The number of vcpu, the size of RAM would be important. I’m looking for a VPS instead of an Xeon e3-1240 cpu and 32GB of RAM but the RAM is probably too much because my current server uses up to 12GB.
Thank you.

@steve

I run my own hosting environment using Proxmox for my clients… :slight_smile:

:slight_smile:

For your use-case, I’d suggest an 4-8 core CPU - or 4-8 vCPUs, depending on the counting method / Interface. 16 GB RAM would be fine, as 12 GB is not a common value for hosters, and gives you a little reserve for any applications / databases, etc…

This size / dimension, covers almost all common uses for SME clients, even on Proxmox as a VM!
Should cover up to 25-50 users…

My 2 cents
Andy

@Andy_Wismer
I use the server with FreePBX, ZoneMinder and a Windows virtual host but these are not required if I install Nethserver on a VPS from a service provider. I think this will reduce the server load and require less RAM.

If all services are running, the CPU load averages 2 and does not reach 4 on backup. The maximum RAM used is 12 GB. If I stop the unwanted services and the Windows virtual host, the amount of RAM used is approx. It drops to 4-6 GB and the average CPU load drops to 1.

I use Nagios to monitor the server and if I shut these services and virtual host down it will be clear after a while how much resources the server is using this way. The vCPU and RAM requirements may then be determined.

1 Like

@mrmarkuz
I set the backup path on the new Nethserver so that the backup from the working Nethserver is available. Sorry, but restoring the data backup doesn’t work. Clicking Restore will tell me almost immediately that the Data restore was successful. However, no data will be restoreed.

What can I do wrong?

Did you check if the new Nethserver can reach the backup?
Where’s your backup? On a NAS? Which backup engine? duplicity, restic or rsync?

Are there errors in logfile about the not working restore?

@mrmarkuz
I made the backup with rsync on my OwnCloud server which is on a third server. I checked to access OwnCloud and it was a success. I can’t find anything in the messages or other logs.

You may try to restore from command line to maybe get some error output.

You could try to restore a config backup to set the backup path.

I tried to restore data backup from command line but it showed this messages:

[root@nethserver ~]# restore-data -b backuptoowncloud
Restore started at 2022-02-05 17:29:58
Event pre-restore-data: SUCCESS
/sbin/mount.davfs: Warning: can’t write entry into mtab, but will mount the file system anyway at /etc/e-smith/events/actions/mount-webdav line 76.
rsync: change_dir “/mnt/backup-backuptoowncloud/nethserver/latest” failed: No such file or directory (2)

Number of files: 0
Number of created files: 0
Number of deleted files: 0
Number of regular files transferred: 0
Total file size: 0 bytes
Total transferred file size: 0 bytes
Literal data: 0 bytes
Matched data: 0 bytes
File list size: 0
File list generation time: 0.305 seconds
File list transfer time: 0.000 seconds
Total bytes sent: 20
Total bytes received: 12

sent 20 bytes received 12 bytes 21.33 bytes/sec
total size is 0 speedup is 0.00
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1179) [sender=3.1.2]
Restore failed
Restore: FAIL

What it mean? Can’t connect or doesn’t find backup?

I tried latest config backup restore but it happened yesteday. I recovery Samba active directory and I can connect to Nethserver but I can’t start shorewall…

When restoring data backup, the same thing happens as before.

Do you have a possibility to use another backup engine like duplicity or restic?

There’s a warning about rsync to webdav in the docs:

When using rsync engine, make sure the storage backend supports symbolic and hard links. Please note that NethServer doesn’t support links on Samba shares due to security implications. Also symlinks are not supported on WebDAV.

I don’t understand the backup because I think it only backup data (files) and there can be no soft or hard link between them.

However, I changed the backup engine to duplicity and created a new data backup on the running server. I started the data recovery on the new server and it seems to be working to restore the data but it is not finished yet. When the data restore is complete I will check if everything has been restored.

@mrmarkuz thank you for your help and patience. You have helped a lot with your advice to solve the problem.

Unfortunately, config restore still doesn’t work. Can you even help with that?

Does it not work at all?
You may run restore-config on command line to check the process, see documentation.

1 Like

I’m sorry, the server is no longer available. Once, the connection to the server was lost. I tried to recover it but failed.

I can access the server with a temporary IP address, but the role of network interfaces has also disappeared. The nsdc cannot be recovered, the following command

/etc/e-smith/events/actions/nethserver-dc-sysvolreset

writes “No such file or directory”. It really isn’t. The restore-config is failed too.

I tried to restore the config backup but I still get an error. I think it needs to be reinstalled. What a Windows feeling …

It would be nice to know what to set during installation to make the backup restore work.

I think it could be a problem to migrate from a Nethserver ISO install to a NethServer on CentOS 7 (VPS).
Could you try to migrate to a NethServer VM installed from ISO?

Maybe the dummy interface makes problems?

Tomorrow I can try to install on another non-virtual server from the Nethserver ISO.

I was also thinking about the dummy interface but I definitely need a Green interface on the VPS and that would be the dummy. The physical network interface on the VPS is always the WAN (Red) interface. Therefore, this solution should be tested.

Thanks for the help, I’ll check in tomorrow to see what I got with the new ISO installation. In the meantime, I’m looking forward to what @andy_wismer will get with the installation.

Good night!

1 Like

Hi @steve

I just finished installing the new NethServer on a Proxmox at Hetzner…
I’ll be starting with the rsync migration now - and documenting the process…

My 2 cents
Andy

1 Like

@Andy_Wismer
Thank you Andy!

@steve

Still in progress on some subfolder inside /var/lib/nethserver/ibay/daten/Daten/…
Around 40 GB transfered since last night…

And sofar, all is looking very good!

:slight_smile:

Hello @mrmarkuz !

Unfortunately, I only have one PC that has one network card, so I can’t do a full installation with a separate WAN and LAN interface … I’ll only be able to get another network card next week at the earliest.

So I don’t know what to do next … Should I wait for @Andy_Wismer’s description or reinstall Nethserver under VMware Player?

I think it’s better to wait because installing the Nethserver VM just shows you if your backup works but doesn’t solve the issue of migrating to a VPS.
My intention was to check if the problem is the backup or the VPS with dummy interface (Neth on CentOS)