restic-browser icon indicating copy to clipboard operation
restic-browser copied to clipboard

[Windows] UNC Path Issue

Open EnricoSx opened this issue 1 year ago • 2 comments

2024-06-19 21_25_35-Restic Browser

Description:

Restic Browser 0.3.1.0 does not load UNC paths, but restic ls can see the UNC paths.

solution from restic.exe

restic restore d1c1c66d:/\\192.168.1.152\Dinamico/ --target g:\s3\restore

Environment:

Operating System: Windows 11 Restic Browser Version: 0.3.1.0 Repository Location: Local disk Backup Tool: restic.exe

Thank you for your hard work and dedication!

update

Solution Found

2024-06-19 22_00_58-Restic Browser /\\ip\share/ restore button dont' work 2024-06-19 22_03_28-Restic Browser

Dump zip button work

EnricoSx avatar Jun 19 '24 19:06 EnricoSx

Hi @emuell I ran into this issue today, prepending the UNC path with a forward slash will work for browsing and dump as zip worked fine too (for sub directories) but restore did not (I never use restore anyway).

My particular use case is to backup a NAS that can't run Restic and the network only has Windows machines on it, mapping the UNC path during backup would solve the issue but since restic itself works with UNC I figure it would be nice if restic browser did too.

Note that In normal paths like c:\folder, "c" is treated like a folder so in a UNC path is seems like the entirety of "\host\share" might need to be treated as the top level folder.

Here is the output I get for ls of a snapshot where two UNC backup paths were used during backup:

snapshot 34fcc07d of [\\localhost\c$\TestBackup1 \\localhost\d$\TestBackup3] at 2024-10-16 14:08:16.9973093 -0400 EDT by ***\***@*** filtered by []:
/\\localhost\c$
/\\localhost\c$/TestBackup1
/\\localhost\c$/TestBackup1/File0.txt
/\\localhost\c$/TestBackup1/Folder1
/\\localhost\c$/TestBackup1/Folder1/File1.txt
/\\localhost\c$/TestBackup1/Folder1/Temp
/\\localhost\c$/TestBackup1/Folder1/Temp/FileTemp1.txt
/\\localhost\c$/TestBackup1/Folder2
/\\localhost\c$/TestBackup1/Folder2/File2.txt
/\\localhost\c$/TestBackup1/Folder2/temp
/\\localhost\c$/TestBackup1/Folder2/temp/FileTemp2.txt
/\\localhost\c$/TestBackup1/Program0.exe
/\\localhost\c$/TestBackup1/Temp
/\\localhost\c$/TestBackup1/Temp/FileTemp0.txt
/\\localhost\d$
/\\localhost\d$/TestBackup3
/\\localhost\d$/TestBackup3/File0.txt
/\\localhost\d$/TestBackup3/Folder1
/\\localhost\d$/TestBackup3/Folder1/File1.txt
/\\localhost\d$/TestBackup3/Folder1/Temp
/\\localhost\d$/TestBackup3/Folder1/Temp/FileTemp1.txt
/\\localhost\d$/TestBackup3/Folder2
/\\localhost\d$/TestBackup3/Folder2/File2.txt
/\\localhost\d$/TestBackup3/Folder2/temp
/\\localhost\d$/TestBackup3/Folder2/temp/FileTemp2.txt
/\\localhost\d$/TestBackup3/Program0.exe
/\\localhost\d$/TestBackup3/Temp
/\\localhost\d$/TestBackup3/Temp/FileTemp0.txt

Let me know if I can do anything to help with this issue.

jmclaren7 avatar Oct 16 '24 18:10 jmclaren7

UNC path support is a bit odd in restic.

What we're doing under the hood to get the contents of path '/' (the root path) is:

restic ls /

And this simply does not include UNC paths in the snapshot like "/\localhost\d$/".

restic ls /\\localhost as a filter also won't work.

To get this listed you have to use restic ls /\\localhost\d$/ as filter.

And if there's mixed content in the snapshot, UNC paths and regular paths, restic ls / will only list the regular paths.

This looks like a bug in restic to me.

emuell avatar Oct 26 '24 19:10 emuell