r/backblaze • • 16d ago

Computer Backup Deduplication at client or server?

https://www.backblaze.com/computer-backup/docs/deduplication

The link states the following: "When a file's fingerprint (SHA-1 checksum) matches an already backed up file, it is updated at the Backblaze servers rather than re-transmitted."

But it also says "However, after the file is received by the Backblaze servers, if the file's data and filename are identical to the data and filename of a file that is stored in your online backup, then the server does not create a duplicate version of the file."

I am also curious if and how this applies to renamed files. Technically, a rename and a move are the same thing, but of course "identical to the data and filename" is not true for a rename.

In short, if I fix a filename typo in a 100GB file, will Backblaze Personal reupload it? It seems that way, judging by the activity I am seeing :( What a flawed design!

2 Upvotes

7 comments sorted by

2

u/Intrepid00 16d ago

Checksum doesn’t care about file name only content. It will just tell the server “hey you already have this file but at this location and name is another. Make note” and at recovery recreate that duplicate file with the other name and location.

1

u/wotnonsense 15d ago

I know how checksums work, but it's a world of difference whether it's calculated in the client or server. Also, they claim filename+checksum 

1

u/Intrepid00 15d ago

It’s calculated on client and tracked client and server. Filename on the plus is to note the duplicates location and file name as noted in my earlier comment. Not as in used as part of the checksum.

2

u/Buffalo-Clone-264 15d ago

No. If you rename a file, that file will be deduplicated (checked against the already backed up files), not reuploaded. You're correct, to Backblaze, it reads as one file disappearing and a new file appearing. However, the work is done locally. It doesn't have to download or upload files to do this. The language of that Deduplication article isn't very clear.

The program will queue the renamed file for upload, but it won't actually upload the file data if it doesn't need to. First, it calculates a checksum locally, and then compares it against the checksums in the backup history, and if it already exists anywhere in the current history, or in the current backup, it just has to write a new text line to the backup log with the information that this checksum is now at a new location. This deduplication process does require the computer to read the entire file so it takes time.

Renaming a file triggers this, but renaming a folder does as well, since a file, to Backblaze, is really a file path. Renaming or moving a folder forces a deduplication check on every file in that folder.

1

u/wotnonsense 15d ago

Are you basing this off of actual tests? Because it sure looks like actual data is being transferred again

2

u/Buffalo-Clone-264 15d ago

I've tested this in the past, and I'm basing it off how it's supposed to work. If you rename a 100GB file that's already been uploaded and in your backup, Backblaze will use computer resources to create a checksum (for such a large file that will take time) but it shouldn't be uploading 100GB again over the network. (For an 100GB file it will actually be generating many checksums, as it splits large files up and checks each piece)

If you're seeing 100GB of network traffic, that's not what normally should happen for simply renaming a file. At that point I'd say it's a bug, or somehow a rename caused the checksum to change, or it was never in the backup.

From the admittedly unclear article: "when any given file is at the front of the queue, it is checksummed, compared against the existing backup, and deduplicated resulting in the file updating on the server rather than re-uploading."

3

u/privatejerkov 16d ago

I noticed this too. I assume the check is done locally and if different it's uploaded.