schickling / dockerfiles

Collection of lightweight and ready-to-use docker images
https://hub.docker.com/u/schickling/
MIT License
847 stars 366 forks source link

mysql-backup-s3: compare md5sum before uploading #129

Closed rickygarg closed 2 years ago

rickygarg commented 4 years ago

Not an issue, but a feature request.

Before uploading to S3, it is possible to check the md5sum of the last backup using HEAD operation on s3api. If the md5sum doesn't matches the md5sum received, upload new backup with md5sum as a part of the metadata.

Alternately, the same thing could be done locally too, if the last one or two backups aren't deleted from local filesystem immediately on upload.

This would save an incredible amount of storage on S3!

rickygarg commented 2 years ago

Ended up implementing this on another repo. Sharing for reference:

https://github.com/getfundwave/s3-mysql-backup-cron/blob/main/backup.sh

iloveitaly commented 2 years ago

@rickygarg oh, nice! Happy to merge this change into this repo if you'd like. Just submit a new PR!