Comments - Historical data, nightly snapshots

8 years, 5 months ago BJ Quinn

Thanks! I could probably do a flush tables for export before taking the snapshot and then the snapshot ought to be clean, I would think. So now I have a snapshot full of (hopefully clean) tables that I need to add to MariaDB -- how do I actually do the import? Can I create the empty table structures based only off the .cfg files and then discard the tablespace and then link in the ibd files from the snapshot? And the snapshots would be read only, can I point to an innodb table that's read only as long as I don't intend to make any changes to it?

8 years, 5 months ago Sergei Golubchik

We've got the import process from MySQL and haven't fixed it yet. It's a bit cumbersome. It involves creating a table with exactly the same structure, and then two ALTER TABLE statements. See for details.

8 years, 5 months ago BJ Quinn

Cool thx. So, can I create a table of the exact same structure with the help of the .cfg file? I can imagine a scenario where I have a bunch of existing snapshots that I'd like to make available to read (let's say I was careful about doing the FLUSH TABLES FOR EXPORT before taking each snapshot), but of course table structure can change over time. Is there a way to work up a CREATE statement based on the .cfg file?


Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.