Hi.
Thanks for a great pack of software. I really enjoy learning how to use NextClouDPI
That being said, I cant wrap my head around how to ssh rsync to another server and then get my backup uploaded.
Is there a howto for this somewhere I might have missed?
And while rsync is a unix tool which is only utilized by the NCP developer, there is plenty more documentation for rsync, ssh and so on on the Internet.
The other way round. You need the public key on the backup device and the private key on your NCP, if you want to “auto-connect” to another server via SSH. There are several guides out there, which explain the key pair generation and where to put the files afterwards.
This guide here looks pretty good on the first glance:
Afterwards “auto login” is setup and you should be able to login with simple
ssh <user>@<backup server IP>
and your rsync can be configured and should work afterwards as well.
amilopowers@nextcloudpi:/home$ rsync -e 'ssh -p 22' -av /home/amilopowers/ root@192.168.1.51:/NextcloudPi
sending incremental file list
created directory /NextcloudPi
.
.
.
.
sent 12,909 bytes received 283 bytes 8,794.67 bytes/sec
total size is 11,937 speedup is 0.90
amilopowers@nextcloudpi:/home$
When I then try to start rsync from the weg panel i get this:
[ nc-rsync ]
Maintenance mode enabled
Nextcloud is in maintenance mode - no apps have been loaded
ssh_exchange_identification: Connection closed by remote host
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: unexplained error (code 255) at io.c(235) [sender=3.1.2]
Maintenance mode disabled
I bet your Nextcloud user is different from user that you did test before (amilopowers) and he could not access you key. You have to specify it and it should be accessible for NC user. Added to rsync something like this (you do not need -p 22 because 22 is standard ssh port):