How do I archive MySQL databases?

I have a MySQL database that I want to archive. What's the best way to do this?

Note. I don't want to just make a backup. I want to do a one-time export of data for long term storage so that I can retrieve it later. In particular, I don't want to be tied to MySQL, a database, or preferably any given software (I would really like it to be trivial to release a program that can read it, something like a few dozen lines of C or perl) ...

My current plan is to dump stuff into a spreadsheet using a CSV engine and then burn to DVD. This is good because CSV can be loaded with many different programs. The only reason is that the bulk of the data is in Blob columns, as in binary, so I need to decode as it is encoded.

+1


source to share


3 answers


Exporting to CSV, encoding the binary data using Base64 encoding, and then compressing it with gzip sounds like a good way. I would advise you to think carefully about your choice of DVDs. Recordable media deteriorate rapidly over time.



+2


source


You can dump the entire DB into a .sql file and use VCS to archive each version. If you need an older version, you can export it from the repository and restore from it.



+2


source


mysql> ALTER TABLE arch2 ENGINE='ARCHIVE';

      

enter image description here

0


source







All Articles