restic: restic cannot handle Windows paths

I’ve done some tests. It seems restic has problems with Windows path notation. I’ve done my tests in a native Windows terminal.

I’ve used restic version:

e:\tmp>restic version
restic 0.1.0 (v0.1.0-84-g00e05ae)
compiled at 2015-10-28 22:45:42 with go1.5.1

Restic can initialize a backup inside the current folder.

e:\home\jf>cd /tmp

e:\tmp>restic -r restic_t1 init
enter password for new backend:
enter password again:
created restic backend e52084cde0 at restic_t1

Please note that knowledge of your password is required to access
the repository. Losing your password means that your data is
irrecoverably lost.

e:\tmp>restic -r restic_t1 snapshots
enter password for repository:
ID        Date                 Source      Directory
----------------------------------------------------------------------

e:\tmp>restic -r restic_t1 check
enter password for repository:
Create exclusive lock for repository
Load indexes
Check all packs
Check snapshots, trees and blobs

Restic cannot initialize a backup with a absolute Windows path.

e:\tmp>restic -r e:\tmp\restic_t2 init
creating backend at e:\tmp\restic_t2 failed: unable to parse url e:\tmp\restic_t2

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 17 (9 by maintainers)

Most upvoted comments

Hi, thanks for bringing it up again.

Why i don’t have these errors with other backup applications?

Because these programs probably have special handling code for long paths on Windows. I don’t have a Windows development environment, and the Go stdlib does not yet support long paths, see https://github.com/golang/go/issues/3358

So, if someone wants to step up implementing this for restic, I’m glad to assist.