[Solved] Backup setup - fails due to permissions?

NethServer release 7.6.1810 (final)
Kernel release 3.10.0-957.21.3.el7.x86_64

Forgive me if this is obvious but I’m pleased that I have been able to get NethServer to ‘see’ my USB hard drive which is connected to my Mac running VirtualBox.

I thought I could use it for my data backups. Using the Cockpit Dashboard I set up an rsync backup and set it running. One of the first lines in the log says:

rsync: chgrp "/mnt/backup-backup-data/server/2019-07-18-112012/usr/share/nextcloud" failed: Operation not permitted (1)

And so it goes on, pretty much everything is not permitted. The log ends:

sent 1.04G bytes  received 172.86K bytes  10.91M bytes/sec
total size is 1.15G  speedup is 1.11
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1178) [sender=3.1.2]
rsync_tmbackup: [ERROR] Rsync reported an error. Run this command for more details: grep -E 'rsync:|rsync error:' '/root/.rsync_tmbackup/2019-07-18-112012.log'
ln: failed to create symbolic link ‘/mnt/backup-backup-data/server/latest’: Operation not permitted
Backup failed
Action 'backup-data-rsync backup-data': FAIL
Backup status: FAIL

I ran the command (correctly as far as I know…) given above but “no such file or directory”.

I have a problem with permissions somewhere, my hard drive perhaps?

Thanks for your advice.

Did you try to copy some files manually to the mount folder?

No, haven’t done that! I may have to go and remind myself how to do that first!

login at a terminal change to a directory with a file you want (for example messages.log in /var/log/) to copy and excecute the following command.

cp messages.log /mnt/backup-backup-data/server/messages.log

Before please have a look if backup-backup-data exists.

Short answer, yes, /mnt/backup-backup-data exists and I can copy a file into /server.

Also, FWIW, the USB hard drive isn’t available when trying to set up a backup in Cockpit. It seems to be available in the old Dashboard. Backup is disabled there, I want to use rsync and not sure if that’s an option…

The cockpit interface is a bit picky with disks not formatted using the cockpit Format button.

What filesystem do you use on the usb disk?
Recommended is ext3 and ext 4, fat is supported but not reccomended. NTFS is not supported.

I formatted the USB Drive while it was still mounted on my Mac. I assumed any macOS format would be wrong so the choice was MSDOS FAT or exFAT. I went for MSDOS. If you don’t like that you can tell me what to do :wink:

There’s a good explanation how to prepare a usb-disk in the docs here:


or use the button in cockpit (sorry, never did it myself)

To find what filesystem now is used, mount the drive and type mount in CLI.
You will find something like /dev/sdxx on /mnt type ??? (rw,relatime,data=ordered) where the ??? stand for the filesystemtype.

1 Like

I did that and after a bit of fiddling re-formatted the drive. Now my backup works!

rsync_tmbackup: Backup completed without errors.
Action 'backup-data-rsync data-backup': SUCCESS
Post backup scripts status: SUCCESS
Backup status: SUCCESS
Backup ended at 2019-07-18 15:51:30

So the drive was the wrong format! Thanks to everyone who helped.

1 Like

So this will complicate a lot the USB backups on thirdy drives for “one shot backups” before doing stuff.