Restic on Windows Linux Subsystem

I had some scripts running using the Windows binary on Windows 10 Pro. Since, mounting isn’t possible on Windows, I figured I would try my scripts on Windows Linux Subsystem (WLS).

backup script - bak_hdd

restic -r bak_repo backup --password-file passwd.txt --files-from files.linux
restic -r bak_repo forget --password-file passwd.txt --keep-daily 30 --prune




When I run my script in WLS, I get the following error:

me@server:~/restic-backup$ ./bak_hdd
: no such file or directory
unknown flag: --prune

Version of Restic (same on both Windows and WLS):

me@server:~/restic-backup$ restic version
restic 0.7.3
compiled with go1.9 on linux/amd64

Edit #1

The following command works though:

restic -r bak_repo /mnt/e/temp --password-file=passwd.txt

My scripts had been copied to my WLS working directory. When opening up the files, they would indicate that they were converted from DOS format.

I simply created new files with the commands using new files and nano, ran those and it seems to have fixed it.

Cool, thanks for the report (and welcome to the forum)!

What’s your experience with the performance on WLS compared to native Windows?

Funny you should ask that.

Last night, while my script was humming a long, Windows 10 restarted for an update (I really need to find a way to stop this from happening). I estimate it had been running for maybe 45 minutes of the estimated 2-ish hours (which I thought was great and had me feeling optimistic). This was an initial backup to an external hard drive of less than 300GB.

When it came back, my external drive showed space being used but no files could be found on the disk. So, I reformatted it. When I was attempting to access the external drive in WLS, it was giving me an error.

I also noticed that the C drive had considerably less space. After having used WinDirStat, I noticed that WLS was taking quite a bit of space and it referred to the mount point too:

WinDirStat screen capture

To fix this, it seems that I have to reset WLS:

Reset WLS

I’m not sure if this is a viable option anymore. I’m curious to see what would happen in such a scenario using the native Windows binary.

1 Like