I am restoring files that were backed up from a BTRFS partition to an NTFS partition stored using a rest-server. I have a large number (thousands) of poorly named files with characters like question marks, pipes, colons and other characters NTFS is not a fan of. It is producing errors like:
ignoring error for {file path}: open {file path}: invalid argument
ignoring error for {file path}: lchown {file Path}: no such file or directory
• The output of restic version
.
$ ./restic version
restic 0.17.3 compiled with go1.23.3 on linux/amd64
• The complete commands that you ran (leading up to the problem or to reproduce the problem).
$ ./resticprofile {profile}.restore latest
Which I expect to be producing:
restic -r "rest:http://{server_username}:{server_password}@{host}/" --password-file "{file_path}" restore latest --target "/"
• Any environment variables relevant to those commands (including their values, of course).
None
• The complete output of those commands (except any repeated output when obvious it’s not needed for debugging).
2024/12/17 22:17:28 using configuration file: profiles.yaml
2024/12/17 22:17:28 profile '{profile}': starting 'restore'
repository {identifier} opened (version 2, compression level auto)
[0:00] 100.00% 33 / 33 index files loaded
restoring snapshot {identifier} of [{directory}] at 2024-12-17 19:25:06.890322146 -0500 EST by {user}@{host} to /
ignoring error for {file path}: open {file path}: invalid argument
...
ignoring error for {file path}: lchown {file Path}: no such file or directory
...
[28:48] 100.00% 4356 files/dirs 10.041 GiB, total 31329 files/dirs 10.041 GiB, skipped 471919 files/dirs 393.557 GiB
Summary: Restored 31329 files/dirs (10.041 GiB) in 29:09, skipped 471919 files/dirs 393.557 GiB
Fatal: There were 12069 errors
2024/12/17 22:46:47 restore on profile '{profile}': exit status 1
The skipped 471,919 are from a previous restore and those files are recovered successfully. 12,069 files have characters NTFS isn’t a fan of, like “:”, “|”, etcetera. I do not have the option of changing my file system.
Is it possible to have restic auto replace characters with something like an underscore? Otherwise, does anyone have any other ideas on how to restore these files to a NTFS file system?