Restic Windows : cannot restore drive root to drive root

Hi,

I’m struggling to restore a Windows backup of a D: drive to a brand new D: drive;
It always creates a D folder in D:, which I do not want.
I tried to use --include ‘/D/*’ and a lot of other patterns, but it didn’t provide the expected results, a D folder is always created in the D: drive… how couId I restore properly the content back at in it’s original space ?

Cheers

You can use --target flag

$ restic restore --help
  -t, --target string        directory to extract data to

Or just restore to D folder and move it up after.

Hi,

I would relly like to avoid a move operation, I’m restoring a few TBs of data.

restic --verbose=1 -o s3.list-objects-v1=true -o s3.connections=10 -r $Env:RESTIC_REPOSITORY restore a21648ac --target /

Restores a D folder to to C: drive

restic --verbose=1 -o s3.list-objects-v1=true -o s3.connections=10 -r $Env:RESTIC_REPOSITORY restore a21648ac --target D:\

image
This restores a D folder in D:

restic --verbose=1 -o s3.list-objects-v1=true -o s3.connections=10 -r $Env:RESTIC_REPOSITORY restore a21648ac --target D:\ –include /D/*

Does the same thing (completely ignoring the --include parameter ?)

Any idea what I might be missing ?

I think you do not have really other option - and move within the same filesystem will be quick regardless how big data is.

Unless you do this on Linux or macOS where you can mount snapshot and then simply copy data.