Hi,
I subscribed to Rsync.net 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 usw-s004.rsync.net.
Which commands should I enter to initalize a repo wih SSH?
Thank you for your help
nobody for some hints?
$ ssh NNNNN@ch-s012.rsync.net mkdir foo
$ restic -r sftp:NNNNN@ch-s012.rsync.net:foo init
enter password for new repository:
enter password again:
created restic repository 1ebd983cce at sftp:NNNNN@ch-s012.rsync.net:foo
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 https://restic.readthedocs.io/en/latest/030_preparing_a_new_repo.html#sftp
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 sftp:NNNNN@ch-s012.rsync.net:foo 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
.
#!/bin/sh
export RESTIC_REPOSITORY=sftp:NNNNN@ch-s012.rsync.net:foo
exec restic "$@"
Thank you
Thank you for the information,much appreciated