Windows Restore to same backed up path

When restoring a snapshot to --target it always use absolut path. So if i set --target to C:\ it always creates a folder C… on C Partition (C:\C…). If i want to restore a folder to same folder i previously backed up from i can’t get this job done, without doing a additional move or copy job.
With Linux we have a root (/) but with Windows we don’t.

Is there a workaround for this? Am I using the parameters incorrect?

I am using the latest version 0.9.0 Win64 build.

Thank you

As of now there’s no way to change the restore path. This issue is tracked here.

To get around this problem, use relative path when you’re backing up. If you want to back up the folder C:\dir1\dir2\, run

cd C:\dir1
restic backup dir2 <other options>

Then your files are only saved under dir2 in restic, without C\dir1.

1 Like

Thank you.
i already tried this. But maybe i had a wrong syntax.
I will give it another try.

Note that restic always knows the absolute path, and restic snapshots will always show the absolute path. But the actual path saved for each file may already be the relative path. To check this, use restic ls instead.

1 Like