Jordan Nov 30 3:25PM 2017 CLI
I was testing duplicacy as a backup tool and decided to back up a VMWare virtual machine. The first time I did this it worked fine and I could restore revision one of the back-up without any issues. After using the vm and making some changes I backed up the files again. When I tested the recovery of this revision I got back most of the vm without issues except there were two files that had been "corrupted". On further inspection of the issue it appears that duplicacy modified the original files on a earlier crash. After this crash I ran a backup that probably backed up the files already containing the error. The file that was modified contained data from duplicacy on the first lines. This is that data:
The data in the file that is supposed to be on those lines and above seems to be removed and the data below those lines is correct.
Is it normal for duplicacy to corrupt/modify originals files if it crashes while performing a backup?
gchen Nov 30 7:55PM 2017
It is almost impossible for Duplicacy to modify original files during backup, as it always opens files to be backed up in the read-only mode.
What may be possible is that maybe there is a bug in the chunk management that caused Duplicacy to reuse an old chunk buffer without clearing its content first. However, if this happens, the corrupted file would start with the corrupted data followed by the original file, rather than the corrupted data replacing the beginning portion of the original file.
The corrupted data here is actually the content of the snapshot file at revision 1. This file is saved to the cache directory as
.duplicacy/cache/default/snapshot/repository_id/1. Can you check this file to see if it has the correct content?
Also, can you run
duplicacy cat -r 1 and check the file list. Are the two corrupted files at the top of the list?
And what kind of crash was it and was there any error message?