first off: Thanks for making restic. It seems like it is exactly what I need, it is lightweight, it is straightforward, it seems easy to handle.
I want to use restic to make regular backups of my nextcloud instance to a remote server I have ssh access to. I established ssh keys and I am able to login to the remote machine using key based authentication.
My setup is Ubuntu 18.04 and my restic version is 0.8.3 (it seems this is the latest for my distro).
Setting up the remote repository worked like a charm. I followed the “SFTP” section of the official docs:
restic -r sftp:email@example.com:/media/backup/nextcloud-backup-repo init
For the next step, I wanted to create the first snapshot, backing up a local directory to the remote machine. From the official docs, I concluded this should work:
restic -r sftp:firstname.lastname@example.org:/media/backup/nextcloud-backup-repo --verbose backup /media/nextcloud/data/
However this returns an error:
unknown command "/media/nextcloud/data/" for "restic"
I tried putting it in quotes put that doesn’t help either. What am I doing wrong?