I created this script because I often need to make backups of different databases, for various reasons and under different conditions. Manually assembling the mysqldump commands was a bit tedious. mysqldump does its job perfectly, but only the basics, by design. Many things I had to do executing more than one mysqldump command. Now I just need to run mariabak once.
Cool mariabak features:
- With just one command you can backup several databases in different files (mysqldump only dump the backup data, doesn't create files, this is the user's job).
- User can choose tables that he does NOT want to backup (e.g: logs, cache), but preserving the tables' structure (mysqldump has the option of not backup one or more tables, but it does not preserve its structure).
- For each backup a directory with the date and time is created. The directory name format can be configured.
- It backups all the user grants, system variables, system databases and events to separate files (Because it backups the system databases too, the user should be the 'root' or any user with the following permissions on database server: select, show view, lock tables, process, reload, replication client on .).
- For quick query, you have an option for just list the databases.
- Tailored to Linux and Windows.
FAQ:
- "Why the project is just one file?"
I want to make it very portable. The chosen language is interpreted.
- "Why the project is procedural? Why not OOP?"
I want to avoid to have classes in just one file because this would be a mess. I just keep all functions and code well commented.
- "Docker?"
Not yet, but soon.