nick-nuti / Backup-Program

2 stars 0 forks source link

Digest Writer upgrades #23

Open mster opened 2 years ago

mster commented 2 years ago

Requires #19 #21

Introduction:

We need to upgrade our current implantation of the digest writer to support creating successive digests in an efficient manner.

Requirements:

1) SHA256 hash of a binary file. 2) SHA256 hash of hashes. This will be for directories, as this do not inherently contain useful information besides what files they contain. 3) Adding the aforementioned hashes to the digest nodes as a property.

Flow

(1) The new digest writer should compare against a previous digest of the same backup in one is passed. (2) If not, the digest writer will assume that this is a 'fresh' backup and will build the digest for the entire working tree.

1) Step through the filesystem for the backup. For every node to be added to the digest, compare the hash value of the node against the hash of the most previous digest.

mster commented 2 years ago

Assure flow will work with our recursive writing. Will we need to still traverse the entire tree? This does not mean we will write the entire tree, but is there a smarter way to do this? 🤔