New ClockworkMod Backup Format

TL;DR:
ClockworkMod Recovery now deduplicates files between builds. This results in way smaller backups.
Don't delete /sdcard/clockworkmod/blobs

Overview
I've gotten a few questions about how this works, so I figured I'd make a post on it.

Basically, here's what happens:

The files being backed up are hashed (sha256, not that it matters). Then it checks for a file with the name of the hash in
/sdcard/clockworkmod/blobs

So, if the hash of the file was c5273884b90d490134e7737b29a65405cea0f7bb786ca82c6337ceb24de6f5ed, it looks for /sdcard/clockworkmod/blobs/c5273884b90d490134e7737b29a65405cea0f7bb786ca82c6337ceb24de6f5ed

If the hash file is found, it continues on to the next file. Otherwise, it copies the file to the blobs directory with the file name being the hash.

ROMs and user data, for the most part, do not change too much between builds and backups. So, your APKs, system files, etc, are generally only stored once. This saves a ton of space. Especially between incremental backups.


Some of you may be thinking "well, how do I delete a backup?".
First, never delete the blobs directory. This would actually delete all your backups by rendering them unusable.
Simply delete the usual backup directory, and the next time you run a backup, all the unused hash files will be automatically delete (a process known as garbage collection). The recovery will show "Freeing space..." while this is happening.
Shared publiclyView activity