rafaeljusto / toglacier

Periodic send data to the cloud
MIT License
4 stars 2 forks source link

Calculate hashes from all backup files #12

Closed rafaeljusto closed 7 years ago

rafaeljusto commented 7 years ago

We need to calculate the hash of each file in the backup tarball and store it for future comparison.

rafaeljusto commented 7 years ago

The idea is to stop sending all backup data (AXFR), and start sending only what was modified (IXFR). We can do that by creating a control file on every backup. This control file would contain the list of all files synchronized files. For example:

/data/important-files1/file1 unmodified <backup-id> <date>
/data/important-files1/file2 modified
/data/important-files1/file3 unmodified <backup-id> <date>
/data/important-files1/file4 unmodified <backup-id> <date>
/data/important-files1/file5 removed
/data/important-files2/file1 created

With that we can easy trace back and retrieve all files of an archive.