Franck
January 24, 2023, 8:17am
1
Hi,
When I backup this
Restic -r D:\SnapTest --password-file=“Password.txt” backup c:\folder1 \\sharepc\folder2
When I restore
Restic -r D:\SnapTest --password-file=“Password.txt” restore 1836c7ee --target D:\RecupTest
I have this message invalid child node name
the folder1 (local) is restored but not the share folder folder2
What can I do ?
Thanks in advance
do you have shared folders in your backup?
e.g. \server\foo\bar.txt
opened 11:30PM - 24 Jun 20 UTC
type: bug
category: restore
category: backup
platform: windows
Output of `restic version`
--------------------------
restic 0.9.6 compiled wi… th go1.13.4 on windows/amd64
How did you run restic exactly?
-------------------------------
### Open elevated Powershell ###
>
`> C:\restic_0.9.6_w\restic.exe version`
restic 0.9.6 compiled with go1.13.4 on windows/amd64
>
>
`> $PSVersionTable`
```
Name Value
---- -----
PSVersion 5.1.14393.3471
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.14393.3471
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
```
>
>
>
`> $env:RESTIC_PASSWORD = 'restic'`
>
>
`> C:\restic_0.9.6_w\restic.exe -r K:\ResticBackup\test init`
created restic repository 562ab4bb33 at K:\ResticBackup\test
Please note that knowledge of your password is required to access
the repository. Losing your password means that your data is
irrecoverably lost.
>
>
`> ls "\\10.16.10.220\Test Folder"`
```
Directory: \\10.16.10.220\Test Folder
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 25.06.2020 00:49 Folder 1
d----- 25.06.2020 00:49 Folder 2
```
`> ls "\\10.16.10.220\TestFolderNoSpace"`
```
Directory: \\10.16.10.220\TestFolderNoSpace
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 25.06.2020 00:49 Folder 2
d----- 25.06.2020 00:49 Folder 1
```
>
`> ls "K:\TestFolderNoSpace"`
```
Directory: K:\TestFolderNoSpace
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 25.06.2020 00:49 Folder 2
d----- 25.06.2020 00:49 Folder 1
```
`> ls "K:\Test Folder"`
```
Directory: K:\Test Folder
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 25.06.2020 00:49 Folder 1
d----- 25.06.2020 00:49 Folder 2
```
>
>
`> C:\restic_0.9.6_w\restic.exe -r K:\ResticBackup\test backup "\\10.16.10.220\Test Folder"`
repository 562ab4bb opened successfully, password is correct
Fatal: unable to save snapshot: Lstat: CreateFile \\?\UNC\10.16.10.220\Test Folder\10.16.10.220: The system cannot find the file specified.
>
`> C:\restic_0.9.6_w\restic.exe -r K:\ResticBackup\test backup "\\10.16.10.220\Test Folder\"`
repository 562ab4bb opened successfully, password is correct
error: CreateFile \\?\UNC\10.16.10.220\Test Folder": The network name cannot be found.
Fatal: unable to save snapshot: Lstat: CreateFile \\?\UNC\10.16.10.220\Test Folder\10.16.10.220: The system cannot find the file specified.
>
`> C:\restic_0.9.6_w\restic.exe -r K:\ResticBackup\test backup "\\10.16.10.220\Test Folder\*"`
repository 562ab4bb opened successfully, password is correct
error: CreateFile \\?\UNC\10.16.10.220\Test Folder\*: The filename, directory name, or volume label syntax is incorrect.
Files: 0 new, 0 changed, 0 unmodified
Dirs: 1 new, 0 changed, 0 unmodified
Added to the repo: 328 B
processed 0 files, 0 B in 0:00
snapshot 0427e9f3 saved
>
>
>
>
`> C:\restic_0.9.6_w\restic.exe -r K:\ResticBackup\test backup "\\10.16.10.220\TestFolderNoSpace"`
repository 562ab4bb opened successfully, password is correct
Fatal: unable to save snapshot: Lstat: CreateFile \\?\UNC\10.16.10.220\Test Folder\10.16.10.220: The system cannot find the file specified.
>
`> C:\restic_0.9.6_w\restic.exe -r K:\ResticBackup\test backup "\\10.16.10.220\TestFolderNoSpace\"`
repository 562ab4bb opened successfully, password is correct
Files: 2 new, 0 changed, 0 unmodified
Dirs: 0 new, 0 changed, 0 unmodified
Added to the repo: 321 B
processed 2 files, 0 B in 0:00
snapshot 445b58ab saved
>
>
>
>
>
>
`> C:\restic_0.9.6_w\restic.exe -r K:\ResticBackup\test backup "K:\TestFolderNoSpace"`
repository 562ab4bb opened successfully, password is correct
Files: 0 new, 0 changed, 2 unmodified
Dirs: 0 new, 0 changed, 1 unmodified
Added to the repo: 0 B
processed 2 files, 0 B in 0:00
snapshot 01349c2b saved
>
>
`> C:\restic_0.9.6_w\restic.exe -r K:\ResticBackup\test backup "K:\Test Folder"`
repository 562ab4bb opened successfully, password is correct
Files: 2 new, 0 changed, 0 unmodified
Dirs: 1 new, 0 changed, 0 unmodified
Added to the repo: 563 B
processed 2 files, 0 B in 0:00
snapshot 56f82ecf saved
>
>
>
`> C:\restic_0.9.6_w\restic.exe -r K:\ResticBackup\test snapshots`
repository 562ab4bb opened successfully, password is correct
```
ID Time Host Tags Paths
----------------------------------------------------------------------------------------
0427e9f3 2020-06-25 01:01:22 Core \\10.16.10.220\Test Folder\*
445b58ab 2020-06-25 01:01:39 Core \\10.16.10.220\TestFolderNoSpace\
01349c2b 2020-06-25 01:02:04 Core K:\TestFolderNoSpace
56f82ecf 2020-06-25 01:02:16 Core K:\Test Folder
----------------------------------------------------------------------------------------
4 snapshots
```
>
>
`> C:\restic_0.9.6_w\restic.exe -r K:\ResticBackup\test restore 0427e9f3 --target "K:\restore"`
repository 562ab4bb opened successfully, password is correct
restoring <Snapshot 0427e9f3 of [\\10.16.10.220\Test Folder\*] at 2020-06-25 01:01:22.7598049 +0200 CEST by CORE\core@Core> to K:\restore
ignoring error for \: invalid child node name \\10.16.10.220\Test Folder
ignoring error for \: invalid child node name \\10.16.10.220\Test Folder
There were 2 errors
>
>
`> C:\restic_0.9.6_w\restic.exe -r K:\ResticBackup\test restore 445b58ab --target "K:\restore"`
repository 562ab4bb opened successfully, password is correct
restoring <Snapshot 445b58ab of [\\10.16.10.220\TestFolderNoSpace\] at 2020-06-25 01:01:39.8898124 +0200 CEST by CORE\core@Core> to K:\restore
ignoring error for \: invalid child node name \\10.16.10.220\TestFolderNoSpace
ignoring error for \: invalid child node name \\10.16.10.220\TestFolderNoSpace
There were 2 errors
>
>
>
`> C:\restic_0.9.6_w\restic.exe -r K:\ResticBackup\test restore 01349c2b --target "K:\restore"`
repository 562ab4bb opened successfully, password is correct
restoring <Snapshot 01349c2b of [K:\TestFolderNoSpace] at 2020-06-25 01:02:04.243429 +0200 CEST by CORE\core@Core> to K:\restore
>
>
`> C:\restic_0.9.6_w\restic.exe -r K:\ResticBackup\test restore 56f82ecf --target "K:\restore"`
repository 562ab4bb opened successfully, password is correct
restoring <Snapshot 56f82ecf of [K:\Test Folder] at 2020-06-25 01:02:16.0841665 +0200 CEST by CORE\core@Core> to K:\restore
>
>
>
What backend/server/service did you use to store the repository?
----------------------------------------------------------------
Windows Path on Local Disk
Expected behavior
-----------------
Restic cannot work with UNC Paths.
Actual behavior
---------------
1. There are minor problems at the backup Process when trying to backup a UNC Path with Spaces like:
`> C:\restic_0.9.6_w\restic.exe -r K:\ResticBackup\test backup "\\10.16.10.220\Test Folder"`
You'll have to use an additional backslash + wildcard like this:
`> C:\restic_0.9.6_w\restic.exe -r K:\ResticBackup\test backup "\\10.16.10.220\Test Folder\*"`
You don't need that with the Local Path equivalent: [...]"K:\Test Folder"
2. There is a major problem when you try to restore UNC Paths. It simply does not work and exit with:
```
ignoring error for \: invalid child node name \\10.16.10.220\TestFolderNoSpace
ignoring error for \: invalid child node name \\10.16.10.220\TestFolderNoSpace
```
Steps to reproduce the behavior
-------------------------------
Do the exact same commands described above on a windows system with an elevated powershell.
Do you have any idea what may have caused this?
-----------------------------------------------
Restic cannot handle UNC Paths within powershell (also tested the restore with elevated cmd.exe)
Do you have an idea how to solve the issue?
-------------------------------------------
No
Did restic help you today? Did it make you happy in any way?
------------------------------------------------------------
You're doing an awesome job by developing this tool.
And yes it did a very good job so far.
Franck
January 25, 2023, 7:16am
3
Yes I have some and it’s the reason ofr my post…
As I read there’s no solution for the moment even if apparently this problem is not recent (several years!)
I’ve totally missed the part \\sharepc\folder2
Unfortunately I do backup of some shares too… :-/
→ I’ve added a comment to the issue…
One workaround is to use a linux machine to restore or mount
Franck
January 25, 2023, 5:13pm
5
I am particularly surprised that this bug, because we can still call it a BUG, has not been corrected for all these years!
rawtaz
January 25, 2023, 5:25pm
6
Has there been a PR that fixes the problem?
Franck
January 25, 2023, 6:32pm
7
A PR ? What’s this ?
As I search for… since the version 0.9.6 the problem exists.
rawtaz
January 25, 2023, 6:46pm
8
PR is abbreviation for “Pull Request”, in this context it would be a contribution of source code to the restic source code repository at GitHub - restic/restic: Fast, secure, efficient backup program . I simply asked if anyone had contributed code that fixes the problem. If that hasn’t happened, the problem naturally still persists.
I am not sure if it’s a common issue, if it was there would probably be far more reports of it, but regardless the core developers of restic are not Windows users, so it would be good if someone who actually is looks into it and contributes a fix if needed.
2 Likes