This is the syntax for the restore command: restic restore [flags] snapshotID
You should probably put the flags for the restore command before the snapshot. As it is right now, you don’t have a snapshot at the very end of the command line.
You might also need to move the global flags (e.g. --cache-dir) to before the restore command, but I don’t know if that’s a requirement. It would be more proper though, so it’s restic [global flags] <command> [command flags] [command data/options].
Thanks for the response. I tried moving the global flags to before the command but still get the error.
Specifying “latest” should eliminate the specification of the snapshot ID, as I read the documentation. There is even an example on http://restic.readthedocs.io/en/latest/050_restore.html restic -r /tmp/backup restore latest --target /tmp/restore-art --path "/home/art" --host luigi
I also tried moving “latest” to the end of the line, where snapshot ID should be, but same error.
I don’t think this is a bug. Can you please paste the output of restic snapshots (not restic list snapshots)?
What are you trying to achieve with the the parameter --path /home/art? This filters which snapshots restic will consider when using latest as the snapshot ID, and it must match exactly:
--path path only consider snapshots which include this (absolute) path for snapshot ID "latest"
Do you have a snapshot which includes /home/art exactly?
Try running restic snapshots --path /home/art, does that print any snapshots?
Interesting. There’s nothing else to remove, except the --cache-dir option Which I suppose you already tried, thinking it could be some hiccup with the cache.
I will need to put together a test case to try that, as the current backup is 2.1GB, and removing the Cache Directory would probably mean a large download from B2 (object storage).
Sorry for the inconvenience, and much thanks for your patience in figuring this out.
It’s very possible the @fd0 has a better idea, mine was just a long shot. So if you want you can always wait and see what he says before you start testing without the cache option.
You could also try with the latest release or even master, instead of 0.8.0. The latest release is 0.8.1 and is available on GitHub at https://github.com/restic/restic/releases, and the latest master you can get from https://beta.restic.net or by cloning the repository and running go run build.go in it to build the restic binary.
As you can see, my test cases ran into the same problems. I think I better wait for fd0 before attempting the newer versions of restic, as I am doing this on a Production environment, and would want to try new versions on a Test environment.
Got it: Your first dash character (-) for --target is not an ASCII dash (called “hyphen-minus” in Unicode) but a “en-dash”, a punctuation character. You can check with echo and xxd that the character is three byte wide in utf-8 (copy&pasted from your message):
This somehow makes restic assume you haven’t specified a snapshot ID at all.
Incidentally I’ve seen the strange dash when I first read your post, but then disregarded it as if some input auto completion replaced it when typing the message.
That makes perfect sense. Though I thought I’d fixed that with a text editor where I’d done a replace all.
I’m coming off a Word document where I have a complete System Management reference for myself. I am very sorry about this! I’ll report back as soon as possible.