Greetings Restic community, I need some guidance with the observation I made.
The problem is that I made a backup of an XML-like file and while making a dump of this same file, I can see the files are different. Every Line Feed (
\n hex 0A) now also has a Carriage Return (
\r hex 0D). This causes the file to not be handled in the way I expect it to be.
The file contains sensitive data, but if needed I can see if a smaller file also works. The following steps were taken.
- Backup the file:
restic backup --host "$(hostname)" --verbose --tag test-backup --stdin < backupfile.bck
- Restoring that same file:
restic dump --quiet --no-cache --tag test-backup latest "/stdin" > restored.bck
- Checking the diff between those files:
cmp --print-bytes backupfile.bck restored.bck
- Note the difference:
differ: byte 88, line 1 is 12 ^J 15 ^M
I can see in a hexdump that every
\n now also has a
\r. An XML file like below could be used to test this, if more is needed I can see if I can construct something better:
<?xml version="1.0" encoding="UTF-8"?> <properties> </properties>
Are there any problems related to this known? Would this be overcome by first compressing the file (ie tar)? Any help is appreciated.
**Restic version: ** 0.9.6
Note that forcing this conversion with
dos2unix --force -b restored.bck does seem to work.