Problems establishing btrfs-snapshot sync: wrong permissions?

Hi there,
after two years of using Nexcloutpi and btrfs-snapshot sync nearly without trouble I can’t get btrfs-sync to work this time. Installation of Nextcloudpi has been renewed, so I had to configure sync on nextcloud server again (running on a Zbox now). The configuration on backup-server hasn’t changed so far.

This is not the first time I have done the steps getting to work, but now I get following issues:

  1. Starting ncp-snapshot-sync on ncp-web-panel shows:
[ nc-snapshot-sync ] (Thu Mar 16 20:02:15 CET 2023)
Host key verification failed.
SSH non-interactive not properly configured

That’s weired because I’ve created a new rsa key and ssh auto login is working when I connect to my backup server via ssh. No password is needed.

  1. Starting ncp-snapshot-sync manually with
btrfs-sync --verbose /path/to/ncp-snapshots/daily_2023-03-15_193402 btrfs-user@backupserver.net:/path/to/backup/ncp-snapshots

shows

SSH access error to btrfs-user@backupserver.net. Do you have passwordless login setup, and adequate permissions for /path/to/backup/ncp-snapshots?

Btrfs-user has root-permissions for /bin/btrfs-sync cause of

btrfs-user ALL=(root:nobody) NOPASSWD:NOEXEC: /bin/btrfs

in

/etc/sudoers.d/90_btrfs-sync

Permissions on nextcloud-server as well as backup-server for /path/to/ncp-snapshots/daily_2023-03-15_193402 are

drwxr-x— 1 www-data www-data

for parent folder /path/to/ncp-snapshots

drwxr-xr-- 1 btrfs-user sudo

At this point my wisdom is at its end :frowning:
Can someone help me?

Thanks in advance,
phisch

My system:
Nextcloud version: 25.0.3
NextcloudPi Versoin: 1.51.0
Operating system and version: Debian 10.2.1-6
Apache or nginx version: ??
PHP version: 8.1.15

Hey @nachoparker , thank you for this great script. Can you maybe help me?

(It seems there are not too many people who use it, or I am impatient…)

Hey phisch,

a few things changed over the last years.
So one of them is, that nachoparker isn’t the maintainer of nextcloudpi any more.

Another is that ssh is blocked by default. You have to activate it. How to enable SSH using ncp-config or ncp-web

Are you sure you are on Debian 10?

Hi REAPERSbattlecry,

thank you for your answer. Damn, forgot to turn on notifications - that’s why I read your reply just now. Actually I couldn’t find a solution for my problem, so I’m grateful for any help.

SSH definitely is activated. I use it for remote access to ncpi.

uname -a

shows “SMP Debian 5.10.179-3”

cat /etc/debian_version

now shows “11.7”.

that nachoparker isn’t the maintainer of nextcloudpi any more

Does that mean btrfs-sync is no longer supported?

No, it should work as before, and if it doesnt the new maintainer should be informed, by posting a bug report on github. But it is not clear here if code is in need of review, or a simple input error.