Pass the backup username and password to mysql when running SHOW DATABASES in
mysqlbackup.sh if `file_per_database` is true and `backupdatabases` is empty.
This script could be used to sync backups to a central server, or just
to create a file to let external scripts know that backups are
(sucessfully) done and can be picked up.
The postscript option (defaults to false) and can be either a string or
an array of strings. These strings will be directly put into the
mysqlbackup.sh and as such can either be shell commands, or externally
managed files.
* mysql::backup backuprotate parameter sets the number of backups to keep,
default is 30.
* Use bash in mysqlbackup.sh to get exit status of mysqldump when piped to
bzip2. Unfortunately there is no easy portable way to do that.
* Only delete old backups when current backup finished successfully.
* Try hard not to delete files that we didn't create (i.e. README or other
backups).
Added a parameter to mysql::backup to make bzip2 compression
optional. Compression is enabled by default, so current behavior
is not affected.
Rationale:
We are storing our MySQL backups on a system with deduplication.
Compression and dedup do not play well together, so it's advantagous
to be able to disable it.