Skip to content

Restic backup of root of a drive letter on windows refuses to restore properly #2004

@addos

Description

@addos

Output of restic version

restic 0.9.2 compiled with go1.10.3 on windows/amd64

How did you run restic exactly?

restic -r D:\backups backup E:
restic -r D:\backups restore -t target_dir

What backend/server/service did you use to store the repository?

Expected behavior

It should be able to store/restore properly

Actual behavior

Restic apparently stores : in the paths, which make the repo unable to be restored?

When I run ls against my repo, it shows something like the following:
/E/E:./repo/.git/objects/info
/E/E:./repo/.git/objects/pack
/E/E:./repo/.git/refs
/E/E:./repo/.git/refs/heads
/E/E:./repo/.git/refs/heads/git-annex
/E/E:./repo/.git/refs/heads/synced
/E/E:./repo/.git/refs/heads/synced/git-annex
/E/E:./repo/.git/refs/heads/synced/master
/E/E:./repo/.git/refs/tags

When I try to restore, it shows something like the following:
ignoring error for C:\Users\brad\a\E\E:.\repo.git\objects\f6: mkdir C:\Users\brad\a\E\E:.: The filename, directory name, or volume label syntax is incorrect.
ignoring error for C:\Users\brad\a\E\E:.\repo.git\objects\f6\65cfca35e159a0a47237041d1d20edd0218ba3: mkdir C:\Users\brad\a\E\E:.: The filename, directory name, or volume label syntax is incorrect.
ignoring error for C:\Users\brad\a\E\E:.\repo.git\objects\info: mkdir C:\Users\brad\a\E\E:.: The filename, directory name, or volume label syntax is incorrect.
ignoring error for C:\Users\brad\a\E\E:.\repo.git\objects\pack: mkdir C:\Users\brad\a\E\E:.: The filename, directory name, or volume label syntax is incorrect.
ignoring error for C:\Users\brad\a\E\E:.\repo.git\refs: mkdir C:\Users\brad\a\E\E:.: The filename, directory name, or volume label syntax is incorrect.
ignoring error for C:\Users\brad\a\E\E:.\repo.git\refs\heads: mkdir C:\Users\brad\a\E\E:.: The filename, directory name, or volume label syntax is incorrect.
ignoring error for C:\Users\brad\a\E\E:.\repo.git\refs\heads\git-annex: mkdir C:\Users\brad\a\E\E:.: The filename, directory name, or volume label syntax is incorrect.
ignoring error for C:\Users\brad\a\E\E:.\repo.git\refs\heads\synced: mkdir C:\Users\brad\a\E\E:.: The filename, directory name, or volume label syntax is incorrect.
ignoring error for C:\Users\brad\a\E\E:.\repo.git\refs\heads\synced\git-annex: mkdir C:\Users\brad\a\E\E:.: The filename, directory name, or volume label syntax is incorrect.
ignoring error for C:\Users\brad\a\E\E:.\repo.git\refs\heads\synced\master: mkdir C:\Users\brad\a\E\E:.: The filename, directory name, or volume label syntax is incorrect.
ignoring error for C:\Users\brad\a\E\E:.\repo.git\refs\tags: mkdir C:\Users\brad\a\E\E:.: The filename, directory name, or volume label syntax is incorrect.
There were 371 errors

Steps to reproduce the behavior

Basically, backup the root of a drive letter on windows, and then try to restore it.

For example:
restic -r repo backup E:\

Do you have any idea what may have caused this?

I think restic is storing colons in the paths, which it can't properly restore on windows.

Do you have an idea how to solve the issue?

I think restic is storing colons in the paths, which it can't properly restore on windows.

Did restic help you or made you happy in any way?

All the darn time, I absolutely love this project.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions