Restic commands for

I subscribed to to get some backup storage but I struggle a bit to find the appropriate command with SSH to init a repo.
I checked the doc but I couldn’t see ( understand?) how to initalize a repo with a SSH key.
Let’s say my username with rsync is 22222 and the server
Which commands should I enter to initalize a repo wih SSH?
Thank you for your help

nobody for some hints?:slightly_smiling_face:

$ ssh mkdir foo
$ restic -r init
enter password for new repository: 
enter password again: 
created restic repository 1ebd983cce at

Please note that knowledge of your password is required to access
the repository. Losing your password means that your data is
irrecoverably lost.

See also

Thank you Andol. Much appreciated.
For some obscurs reasons,I was looking initially in the doc for other protocols than sftp.

I have another question:

How can I run the command,for e.g, “restic snapshots” with that sftp path?

I did many attempts but it doesn’t work.

Thank you

all commands need to have repo argument included

restic -r snapshots

Note that restic will also read the RESTIC_REPOSITORY environment variable, so you can create a wrapper script that sets up the environment and invokes restic. If you save this as /usr/local/bin/restic-foo for example, and chmod it to be executable, then you can run restic-foo snapshots.

exec restic "$@"

Thank you :slightly_smiling_face:

Thank you for the information,much appreciated :slightly_smiling_face: