How to setup nc-snapshot-sync? (does anyone how to do it right?)

Goal:
The goal is to setup a automated btrfs snapshot-sync in the local network from the nextcloudPi to a second raspberry pi with a external drive formatted to btrfs.

Steps:

  1. setting up the raspberry pi with the raspbian image and enabling ssh
    (succsessfully)

  2. customize settings in the nextcloud Web-panel:
    (here is where I get stuck)

There are following preperations needed (says the info text above the options):

Sync BTRFS snapshots to USBdrive or remote machine

1.Use format user@ip:/path/to/snapshots for remote sync

2.‘user’ needs permissions for the ‘btrfs’ command at ‘ip’

3.‘user’ needs SSH autologin from the NCP ‘root’ user at ‘ip’

Im only a linux beginner… How can I do this changes on my backup-raspberry pi so it will work?

I already tried to do everything:

1.:pi@192.***.***.**:/media/backupdrive/remotebackupfolder

2.: User pi already have permissions for the btrfs command

3.: ssh autologin with root for backupPi is setup as followed:

Edit the file /lib/systemd/system/getty@.service and change the line

ExecStart=-/sbin/agetty --noclear %I $TERM

to

ExecStart=-/sbin/getty/ --noclear -a root %I $TERM

getting following error in the web panel:
[ nc-snapshot-sync ]
Host key verification failed.
SSH non-interactive not properly configured

(I simply used an nextcloudpi image for the backupPi because you can enable easily auto-mount and format the usb-drive to btrfs)

How can I add a Host key verification?

Hi @crustulumtheone,

at first, I also struggled setting up ssh autologin. I am a linux beginner, too. Our goals seems similar. I want to rsync my datadir to a remote raspi and beeing able to restore it afterwards (which I still struggle on).

For me, these two pages helped me set the ssh problem up properly:

Set up ssh autologin
https://www.shellhacks.com/ssh-login-without-password/

ssh-add error message
https://stackoverflow.com/questions/17846529/could-not-open-a-connection-to-your-authentication-agent
For me, the command eval $(ssh-agent) helped.

Cheers

My tip is to use btrbk. It’s a btrfs backup tool that is used to send snapshots over ssh to other computers. It can also automatically keep x amount of local and remote snapshots with retention policies. It has a good irc channel, #btrfs on freenode.