first of all, thank you very much for the great schnapps tool. As BTRFS volumes are new to me this tool really makes handling those more simple. (Which should not stop me from trying to understand how btrfs works under the hood).
I’m trying to backup my Turris MOX and the attached SSD (mounted in /srv) to an external server by using ssh. I’ve read in schnapps help and the schnapps documentation that an upload option exists which exports the snapshot to a remote site.
Nevertheless I somehow fail to use the upload option. Here is my setup:
On the remote-server a user called backup exists, and the ssh-public-key of root on the turris mox is added to its authorized-keys file. A login with ssh backup@remoteserver works as expected. The userhome of backup is somewhere deep in /mnt/raid/backup and writeable for the backup-user. I also added an entry for the remoteserver in ~/.ssh/config which defines the user that has to be used.
When I try to do upload a snapshot, schnapps complains about an incorrect syntax:
root@turris:~# schnapps upload 86 ssh://remoteserver/ /mnt/raid/backup/
read: Connection reset by peer
Export takes target directory as argument!
thank you for your reply. Export will simply generate a snapshot as tar file in the specified local directory. I tried that and it works flawlessly as it seems.
The problem I’m experiencing here, is that upload does not seem to work as documented.
Stupid me. I mistyped the number of the snapshot. Sorry for the mess.
BTW: If sshfs is unable to mount the remote directory, for instance because of insufficient file permissions, schnapps will create the folder /mnt/.remote-snapshotson the local storage, for instance mmcblk1p1, and will even report a successful backup. In my opinion, schnapps should die when sshfs fails.
For the record, this is what worked for me:
Store username and Host-IP for the remote host in .ssh/config of the turris router
Make sure the user has write permissions to the backup-directory