Windows backup combining volumes

I have been using restic 0.8.0 on Macs and Linux to an SFTP repository and have been very happy so far. I’ve just started rolling it out to a few windows servers, and have run into some unexpected behavior. The servers have two volumes, c: and d:. My backup command looks like this:

restic backup -o "sftp.command=c/restic-sftp.bat" --exclude-file=c:/restic-excludes.txt c:\ d:\

When I mount the repository and browse to the snapshot, I see all of the files and folders of volumes c: and d: combined at the root level of the snapshot. Obviously, this isn’t expected behavior.

Is there a way to work around this, and make restic create a top level c and d folder to contain the appropriate files?

Ah, interesting. You’ve run into a corner case of #549, and I’m afraid with the current archiving code that’s not possible. For the time being, run restic twice, once for c:\ and once for d:\.

I’m currently working on new archiver code.

Thanks for the workaround. I look forward to the new archiver code. :slight_smile:

Couldn’t a workaround be to create two symlinks (to C: and D:) in a folder, and then back up that folder?

No: Symlinks are archived as symlinks, restic does not follow symlinks.

What about hard links or junctions then?

https://msdn.microsoft.com/en-us/library/windows/desktop/aa365006(v=vs.85).aspx

I’m not sure what happens then, hm.

@swimboy Are you going to try it (hard links and junctions)?

Probably not. I’m content to run separate snapshots for the time being and wait for the new archiver code to be ready. My production machines have a LOT of data on them and are on slow links, so they’re not easy to experiment on, and I have way too much on my plate to set up a test environment at the moment.