Tar dump without cache

We use restic dump | tar -xf - to restore files.
When the cache is missing, restic adds the cache creation message created new cache in ... at the beginning of the tar archive, breaking the expected format:

tar: This does not look like a tar archive
tar: Skipping to next header
tar: Exiting with failure status due to previous errors

As a workaround, I use the --json option to disable the message, but I think it’d be better not to break the tar format, avoiding extra output if the format is tar.
I didn’t test zip format.

More details in this github issue for NethServer.

That is a bug, please open an issue on github. You can also avoid that problem by passing --quiet to restic.

Issue filed: Tar dump without cache · Issue #3334 · restic/restic · GitHub

2 Likes