Cockpit - backup and restore data not working correctly

Hello, it’s me too having problems with restore-data module in Cockpit.

For backup is used an USB-Disk formatted as EXT4 within new Cockpit.

When creating a new scheduled task for backup, this USB-Disk could be selected as backup target and rsync as engine.

When starting backup task all seems working well and last for a while, so assuming that data is written.

After finishing without errors, wanted to test the backup by restoring selected files.

The backup shows up with name and date and after choosing desired filenames the directory tree pops up, and files can be selected by klicking.

So far so good.

When starting restore (or overwrite) the message shows correct list of restored files (overwritten) in the right directories, but in fact the files are not restored.

Whether in connected samba share in windows explorer nor directly in nethserver ibay folder (when using putty and looking inside /var/lib/nethserver/ibay/) you can find these should have been restored files.

Tried with USB-Disk formatted ext4 and xfs and with engines rsync and duplicity.

With Duplicity is the problem, that cannot select files with Spaces in filename, so the filenames in backup tree are cut at the Space, unpossible to see full name.

Anyone has same problems, or it’s me doing something wrong ?

I found out, that you can’t browse to the attached USB-Disk before not manually mounted, but when mounted it cannot be selected as backup target, so I think it’s the right behaviour for backup disk.

Am I missing some rules for correct formatting, mounting or labeling the backup disk or the backup task itself ?

Thankfully waiting for some help or hints to the right way, because a server without functionally backup would be a great risk, and just a few days ago convinced me to install Nethserver in our office.

Thanks again

The problem with spaces is a bug:

Oh, what a coincidence that I found the same problem just today.

So with new package would work ?

Will test it tommorow after work.

Some hope for rsync also ?

It seems so. It’s on nethserver-testing repository until the fix is confirmed as verified.

Cannot test it right now. Lets see if other users have the same problem.

It should, but only with backups executed after the fix has been installed.

Are you saying that the same bug affects also rsync backup?

Not excactly, when using rsync all files (even with spaces in name) are shown correctly, but when trying to restore the message window tells me that files have been restored, but in real can’t find these files in disk folder where it should have been restored.

When trying other method with duplicity I faced the problem with spaces in filenames, so that can’t even select desired files, and could not proceed further to test the restore procedure.

Yesterday was getting too late, but today I will try to test duplicity first with simple files (without spaces) and afterwards with new package and files with spaces.

Unfortunally in office world using Windows Workstations most of the files and directories have spaces in name, so we need a functionally solution for that.

Honestly I would prefer rsync because files in backup are just copied and simple accessible, whereas duplicity uses splitted tar.zip.

BTW found that default volumesize for duplicity in Nethserver Cockpit is set to 2, while the help explains a default value of 200 MB. IMHO greater value makes more sense when dealing with a lot of files.

This should be inspected.

@edoardo_spadoni could you please add it to your todo list?

Finally home from work

Have enabled test-repository and updated to “nethserver-backup-data-1.6.4-1.2” and “nethserver-restore-data-2.0.1-1.1” but still not works correctly.

With duplicity now showing “files with spaces”, but when klicking on a folder then all included files are marked but only one of them is restored.

Only when marking files klicking one by one, then all marked files are restored, except files with special characters like “ä ö ü” will be ignored, and unfortunally here in Germany they are used often.

Another problem is that all the files and directories restored from duplicity have changed the owner to root and group without write permissions.

So for a samba share these restored files aren’t usable anymore without manually changing permissions backwards to the originals, so that connected users can work with these files.

That means a lot of administrative work after restoring files, and not all files could be restored at all.

So for me with german office the duplicity method is not suitable, even if working as should, the limitations are too many.

My favourite “rsync” with new update still not working, while message shows succesfully restored (owerwritten), the files are not written to disk, cannot be found in the expected directory.

So, anyone can confirm this buggy behaviour or give me some hints, what am I doing wrong ?

In the meantime as workaround I will make backups from a windows workstation, reading data from shared folders on nethserver and writing to an external USB-Disk.

This way only the most important data from shared folders is backupd, but not nethserver itself.

For now it’s enough, the working day was long and night will be even shorter.

Good Night

This looks scary and really alpha. Let’s hope the backup itself is working a expected :grimacing:

I’ll test on my side ASAP.

Matthieu G. (en mode mobile)

Sorry for having captured old thread, but at this moment i didn’t know that would lead so far.

Therefore thanks for having split into new thread.

It’s really not my intention to scare the whole community, by saying that backup-restore-data in nethserver not working correctly.

Maybe it’s just for me, that I’m doing something wrong, and just have tested with local USB-Disk.

My hope is that for other users or other targets work without problems.

Let’s wait if someone can confirm.

Good news for restic.

Restore from restic works with all types of files (spaces,ä,ö,ü,etc.).

Only problem remains that restored directories are changed to owner root and original group, but without no permissions for the group.

Files in these folders are restored correctly with original owner and group permissions, but not accessible for samba users because parent folder is not browsable without permissions.

Workaround is to recreate the directories, where to restore the files in, manually in windows explorer from connected samba user before restoring, or after restoring reset permissions on shared folder in server manager or cockpit.

This solution works for me, but still want to clarify problems with rsync.

I can’t reproduce this problem.
Could you please share your exact configuration?

Tested on virtual machine before experimentation on working server.

VM with 4 GB Ram, 60 GB VDisk for Nethserver, 10 GB VDisk for Backup.

Nethserver 7.7.1908 all updated incl. nethserver-backup-data 1.6.5 and nethserver-restore-data 2.0.2

domain: test.vm

servername: nserver.test.vm

user: mario@test.vm

group: buero@test.vm

logged in old server manager with root@nserver.test.vm

created shared folder: test

owner group: buero@test.vm

write permissions for owner group

guest access no

browsable yes

no other ACL’s

checked with WinSCP or putty to /var/lib/nethserver/ibay/test shows: owner root, group buero@test.vm, permissions rwxrws—

connected as netdrive in Windows Explorer letter T: (\nserver\test) without problems

created some folders Test 1, Test 2, Test 3 from Windows Explorer

checked with WinSCP to /var/lib/nethserver/ibay/test/Test 1 shows: owner mario@test.vm, group buero@test.vm, permissions rwxrws— (same for Test 2 and Test 3)

created new some files (Textdocument 1.txt, Textdocument 2.txt) and copied some files (…xls, …doc, …pdf) in these folders from Windows Explorer

checked with WinSCP all files in /var/lib/nethserver/ibay/test/Test 1/ shows: owner mario@test.vm, group buero@test.vm, permissions rw-rw---- (same for Test 2 and Test 3)

from Cockpit partitioned virtual Disk 10 GB as GPT, formatted ext4, named backupdisk, mounted default (so result in not be mounted, otherwise will not be selectable as backup targed)

create data backup schedule

local disk check: “backupdisk: ext4 | 10G”

engine: restic

name: testrestic

Run Now working fine without errors

local disk seems automatically temporarily mounted to /mnt/backup-testrestic

view last log shows Backup Status Success

Repeated same steps for testing with rsync (name testrsync) and duplicity (name testduplicity)

After that in Windows Explorer renamed folder Test 1 (to Test 1 old), deleted folder Test 2, and deleted files in folder Test 3 (remaining folder Test 3)

in Cockpit opening applications-Restore Data-settings

choose backup “testrestic | USB-restic”

choose mode files or directories

searching for “test”

file tree shows folders Test 1, Test 2, Test 3 and files within there

selecting folders Test 1, Test 2, Test 3 by clicking automatically marking all files within there too

selecting overwrite and starting restore

in Windows Explorer showing up restored folders Test 1, Test 2 and remaining folder Test 3

Possible access only to folder Test 3 and files within there

Attempt to access folder Test1 and Test 2 not permitted

checked with WinSCP to /var/lib/nethserver/ibay/test/Test 1/ shows: owner root, group buero@test.vm, permissions rwx–s— (same for Test 2), so no read/write permissions for the group

remaining folder Test 3 still with original owner mario@test.vm, group buero@test.vm, permissions rwxrws— and therefore accessible

all files in these folders restored with correct owner mario@test.vm, group buero@test.vm, permissions rw-rw----

So problem only with restored folders, not with files and not with remaining folders

Same procedure with rsync not restoring completely nothing

With duplicity not restoring files/folders with “ä,ö,ü,etc.”, so not practicable in Germany

Funny is duplicity restoring folders with owner root, group buero@test.vm, permissions rwxr-sr-x, which means read for group (progress to restic but still no write) and also read for guest (formerly forbidden)

Sorry for very long description, but hope someone can repeat the steps and confirm or contradict.

@filippo_carletti what else configuration do you need, an how to upload ?

I’m still newbie in this forum