Today’s Question: How do backup programs like GoodSync and Backblaze avoid copying/mirroring corrupted files so that the backups aren’t just copies of corrupted primary files?
Tim’s Quick Answer: In many cases, they don’t. While backup software may use checksums to validate files, they can’t always detect corruption within the file. Therefore, a backup may include the corruption from the original, unless you have a backup from far enough back that it precedes the corruption of the original file.
More Detail: File corruption can be a very tricky issue to deal with. In general, corruption occurs when the information contained in a file is not recorded accurately when the file is moved or copied. While software uses checksums in an effort to prevent these issues, corruption can still occur such as when a storage device has a physical fault.
If a file becomes corrupted, backup software will most likely duplicate that corruption, so that both the original file and the backup copy are corrupted. This creates a problem when you’re trying to salvage an image that has become corrupted. The only real solution is to revert to an older backup copy of the image from before the corruption occurred. In many cases, of course, you may not have an old enough backup copy to recover from.
Many backup software solutions include the ability to retain various versions of files. This can help overcome corrupted images in some situations. For example, Backblaze (https://timgrey.me/onlinebackup) by default maintains versions of files going back thirty days. GoodSync (http://timgrey.me/greybackup) also includes an option to maintain versions of files as they are updated.
Of course, a corrupted image won’t always be identified as a different version of an image, so it can be difficult to completely protect against corruption of files. Even though a backup is not a perfect solution, I do recommend backing up regularly. It is also important to maintain an awareness of any odd storage issues or errors, to ensure you catch any issues that might lead to corruption as quickly as possible. You can then, for example, replace a failing hard drive before a significant loss of photos or other data.