I can’t find how to escape special characters in the sftp path of the restic-cli, does anyone know?
I’m backing up from a Linux machine to a Windows machine running microsoft provided OpenSSH, with an external drive (letter M:) connected to that Windows machine.
SSH (including authorized_keys) works fine, but restic’s cli seems to choke on the colon after M.
restic -r sftp:backup-server:/M:/restic_server_pc
It does seem to be a valid path in FileZilla as well as sftp so I think I’m not breaking any conventions here…
sftp> cd /
sftp> cd M:
$RECYCLE.BIN System Volume Information restic_server_pc
Really appreciate any and all feedback!
(Note, I edited “semicolon” to “colon” in your post.
; is a semicolon.
: is a colon.)
The Windows SSH server should treat absolute paths of the form
/a/b as equivalent to
a:\b, so you should only need to adjust your path accordingly:
restic -r sftp:backup-server:/M/restic_server_pc
Oops. Thanks for fixing that and replying!
Unfortunately my windows seems to be a little stubborn.
Which restic version do you use? Which error message do you get when using the problematic path? I’ve just tested restic 0.10.0 using a path that contains a colon (macOS to Linux) and that works perfectly fine for me.
Thanks for your response Michael. I’m using 0.10.0 and your test made me doubt what I was doing…
And now I feel like such a donkey. I’ve spent hours on this and it turns out restic didn’t do anything because I forgot to put init behind the restic -r command
Time to get my backups in order
Sorry for wasting everyone’s time…