Restic dump does NOT print file out

My os is FreeBSD 11.3-RELEASE with restic-0.9.5_1 and I cannot restic dump my file. command is as following:

$ restic dump 900a28f2 /usr/home/cpfong/tmp/trash/foo.txt -r rclone:koofr:mars_restic_inc_bk/ -p ~/tmp/trash/pwd.real

– reply
repository 7ab0a0ae opened successfully, password is correct
cannot dump file: “/” should be a dir, but s a “file”

However, I can ls this file
$ restic ls 900a28f2 -r rclone:koofr:mars_restic_inc_bk/ -p ~/tmp/trash/pwd.real | grep ‘/usr/home/cpfong/tmp/trash/foo.txt’
/usr/home/cpfong/tmp/trash/foo.txt

never mind, I find older version (0.9.4) which is working ok and you can download 0.9.4 freebsd version here
https://github.com/restic/restic/releases/download/v0.9.4/restic_0.9.4_freebsd_amd64.bz2

Hi @cpfong and welcome to the restic community :slight_smile:

I initially had posted a reply but retracted it as I misread your initial query.
I’m glad you were able to solve your problem, but going back to an older version means that there is a potential that the version you were trying is having an issue.

A couple things I want to check:

  1. Can you try to reproduce it with the latest binary from here: GitHub latest release
  2. If that still doesn’t work, please try the latest beta build from here https://beta.restic.net/

Also I would like to see a full 1:1 output of the command you are running.
Ideally you should use the forum text formatting functions which make this output more readable.

When you run your command, can you please prepend it like so $ ruby -e 'puts ARGV.inspect' restic backup ~ and include all lines here?

This will give us a better understanding of what’s going wrong.

Hi All!

I came across this thread after I encountered this problem myself. I’m running on linux, amd64.

Here’s some more detail, each command preceded by the ruby snippet suggested earlier:

["./restic_0.9.6_linux_amd64", "ls", "8a145e3e", "/home/msharp/foo"]
repository b4cf71e8 opened successfully, password is correct
snapshot 8a145e3e of [/] filtered by [/home/msharp/foo] at 2020-05-05 20:32:23.771454007 +1000 AEST):
/home/msharp/foo

["./restic_0.9.6_linux_amd64", "dump", "8a145e3e", "/home/msharp/foo"]
repository b4cf71e8 opened successfully, password is correct
cannot dump file: "/" should be a dir, but is a "file"

I don’t know if it’s relevant, but this is using an S3-backed repo, and the details are all in the environment.

Interestingly enough, I can actually dump / as if it were a file. It has the same contents as the only normal file in /, called @System.solv.

Accessing the file via restore works as expected:

["./restic_0.9.6_linux_amd64", "restore", "8a145e3e", "--include", "/home/msharp/foo", "--target", "restored/"]
repository b4cf71e8 opened successfully, password is correct
restoring <Snapshot 8a145e3e of [/] at 2020-05-05 20:32:23.771454007 +1000 AEST by root@enif.entropyonwheels.com> to restored/

Behaviour is identical using the latest beta release, 0.9.6-98-g616f9499.