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

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

1 Like

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:

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

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