fradelg/docker-mysql-cron-backup

Allow for no compression

ClementNerma opened this issue · 4 comments

Hi!

I'm currently using this project to backup a very important database, and this has proved to be extremely useful when I had to restore data after resetting my computer. So thanks a lot for making this tool!

Now I have a little question about a feature that would help me: would it be possible to specify a setting to disable compression entirely? I always backup the entire directory to have an history of all backups ever made, which means I have to use the raw SQL files and compress them together to save space, which is not possible if they are already compressed.

What I do currently is that I periodically uncompress all the SQL files to re-compress them as a single archive. But it would be a lot more handy if I could just specify set the GZIP_LEVEL variable to 0 so it would only export the .sql file itself.

Would it be doable? Thanks in advance for your answer :)

Can you try to pull the tag save-plain-sql and set the USE_PLAIN_SQL environment variable?

#71

I haven't had time to test it so be careful and do it in a non-production environment, please

It works fine, but for a reason I don't know it only exports the very first table of the database. I have no specific option set but the output SQL file only contains one table. If I go back to the latest tag it works fine again.

Force a pull and check again with the same tag. The MYSQLDUMP_OPTS variable was after the name of the database and it was interpreted as the table to dump. It seems weird that nobody notice it before (I guess nobody is setting this variable)

Seems to work perfectly! Thanks a lot! :)