3 ms·
An easy way to have a space efficient, perpetual backup of a database: Run the dump file every N units of time. Compress the dump file using gzip with the --r
by rarrrrrr 18y ago
An easy way to have a space efficient, perpetual backup of a database:
Run the dump file every N units of time.
Compress the dump file using gzip with the --rsyncable option. This increases size by 1% but makes it efficiently diff/patchable.
Use diff to make a patch going back to the previous compressed dump of the file. Keep the patch, discard the previous dump if you like. You now can apply the patches in succession to go back however far you like.
Finally, and most importantly, use par2 to store parity along with your backup files to protect against silent bitrot.
Note: --rsyncable is in newer gzip versions. It's too new to be included in OS X Leopard.
- yeahit 18y agoWouldnt these two solutions be even nicer? * Backup the Binlog of the DB (At least its called Binlog in MySql) or * Make a diff of the uncompressed dump and zip that. This diff would even be human readable.