[NextCloudPi] nc-backup, chown: changing group of... Operation not permitted

ncp
#1

I have a Raspi with NCP (192.168.0.10) and I try to make backup copies in a USBHDD in another raspi in the same lan (192.168.0.11)

I have a USBHDD with BTRFS format (I have previously formatted BTRFS with nc-format) in 192.168.0.11
md /ncp-backup
mount the unit in 192.168.0.11
sudo mount -t btrfs /dev/sda1 /ncp-backup
sudo chmod -R 777 /ncp-backup

mount the unit in 192.168.0.10
md /mnt/ncp-backup
**sudo mount 192.168.0.11:/ncp-backup /mnt/ncp-backup **

Error:
[ nc-backup ]
check free space…
Maintenance mode enabled
backup database…
backup files…
chown: changing group of ‘/mnt/ncp-backup/nextcloud-bkp_20190508_1557311978.tar.gz’: Operation not permitted
Abort…
Maintenance mode disabled
Maintenance mode already disabled

[/details]
Gathering information…
NextCloudPi version v1.12.0
NextCloudPi image NextCloudPi_06-27-18
distribution Raspbian GNU/Linux 9 \n \l
automount yes
USB devices sda
datadir /media/USBdrive/ncdata
data in SD no
data filesystem btrfs
data disk usage 302G/932G
rootfs usage 3,4G/15G
swapfile /var/swap
dbdir /media/USBdrive/ncdatabase
Nextcloud check ok
Nextcloud version 15.0.6.1
HTTPD service up
PHP service up
MariaDB service up
Redis service up
Postfix service up
internet check ok
port check 80 open
port check 443 open
IP 192.168.0.10
gateway 192.168.0.1
interface eth0
certificates **
NAT loopback yes
uptime 1day

#2

As your data and backup are btrfs you should use NCP’s nc-snapshot-auto
to create snapshots on RPi1 and then use nc-snapshot-sync
to backup the snapshots to RPi2

md is a dos command, it’s Linux equivalent is mkdir

This can not work like that. It needs protocol from NFS or Samba and user credentials. As described here Or search here for more ways of doing it. No need to if you use NCP’s snapshot tools tho :wink:

#3

I was using the [nc-backup], because the [NCP’s snapshot] does not work for me.

It tells me that the unit mounted on 192.168.0.10 (NCP) is not a BTRFS system.
/mnt/ncp-backup is not in a BTRFS filesystem

I’ll go back to check the “mount” of units; again :frowning: THX.

md — I was wrong to write mkdir

2019/05/09
I’ve tried again:
I have a USBHDD with BTRFS format (I have previously formatted BTRFS with nc-format) in 192.168.0.11
mkdir / ncp-backup
I modified the / etc / fstab adding:
/ dev / sda1 /ncp-backup btrfs defaults, autodefrag, compress = lzo 0 0
sudo chown -R 777 / ncp-backup

In the NCP:
mkdir / mnt / ncp-backup
mount -rw 192.168.0.11:/ncp-backup / mnt / ncp-backup
sudo chown -R 777 / ncp-backup

The result is the same:
[nc-backup]:
chown: changing group of '/mnt/ncp-backup/nextcloud-bkp_20190509_1557393495.tar.gz': Operation not permitted Abort ...
:frowning:

I make touch from 192.168.0.10
/ mnt / ncp-backup
touch NCP

I make touch from 192.168.0.11
/ ncp-backup
touch Rapsi
and the files are created and seen both den x.11 and x.10

#4

I tried but it returns…

[NCPWEB]
– [ nc-snapshot-sync ]

Active
Snapshot directory: /media/USBdrive/ncp-snapshots – path exists
Destination: root@192.168.0.11/ncp-backup/
Compression “check”
Sync days “2”

Result:
[ nc-snapshot-sync ]
Permission denied (publickey,password).
SSH non-interactive not properly configured