Releases: maxhq/zabbix-backup
MySQL + PostgreSQL fixes and enhancements
This version speeds up MySQL dumps, fixes and enhances PostgreSQL dumps and allows to actively decide what to do with unknown tables.
Direct download
zabbix-mysql-dump (v0.9.3)
Changelog
Please see the version history in the README.
Support for Zabbix 4.4.4 and various fixes
This release adds support for Zabbix 4.4.4 and contains bug fixes and small enhancements.
Direct download
zabbix-mysql-dump (v0.9.2)
Changelog
Please see the version history in the README.
Thanks!
Correctly process hostname option -H
This release fixes a problem where the hostname option -H was not processed correctly anymore.
Direct download
zabbix-mysql-dump (v0.9.1)
Changelog
Please see README.md.
Thanks!
Zabbix 4.0 and PostgreSQL
The script now supports PostgreSQL and Zabbix 4.0 and reads zabbix_server.conf by default.
Direct download
zabbix-mysql-dump (v0.9.0)
Breaking changes
The script was renamed to zabbix-dump
.
Database connection params are now read from /etc/zabbix/zabbix_server.conf by default but still can be overridden using command line options.
To prevent reading the Zabbix config please use option -Z
(capital Z).
To specify a non-standard path to the config use -z
(small z).
Option -h
(and --help
) now show the help text.
To specify the database host please use -H
.
Executing the script without any options will start the backup.
New options
-t DATABASE_TYPE
Database type (mysql or psql).
Default: $DBTYPE
-P DBPORT
DBMS port.
Default for mysql: 3306
Default for psql: 5432
-z ZABBIX_CONFIG
Read database host and credentials from given Zabbix config file.
Default: $ZBX_CONFIG
-Z
Do not try to read the Zabbix server configuration.
-h
--help
Show help.
Changelog
Please see README.md.
Thanks!
Compression and fixes
The script can now optionally compress the output file using xz or leave it uncompressed.
Direct script download
zabbix-mysql-dump (v0.8.2)
New options
-x
Compress using xz instead of gz
PLEASE NOTE:
xz compression will take much longer and consume more CPU time
but the resulting backup will be about half the size of the same
sql file compressed using gz. Your mileage may vary.
-0
Do not compress the sql dump
Changelog
- New option -x (#7 by @neonardo1)
- New option -0
- Error
warning: here-document at line 206 delimited by end-of-file (wanted 'EOF')
due to an evil space was removed (#8 by @msjmeyer) Warning: Using a password on the command line interface can be insecure.
is now suppressed
Thanks!
- @msjmeyer
- @neonardo1
Zabbix 3.0.x support
The script now supports Zabbix version up to 3.0.3.
Direct script download: zabbix-mysql-dump (v0.8.1)
Changelog for version 0.8.1 (2016-07-11)
- Support for Zabbix versions up to 3.0.3 (by @ruslan-ohitin)
Thanks!
More stable, versatile and chic ;-)
Happy New Year!
The script and the help page have been refined and there are new options.
It should now be usable for both command line and scripting (invoked by other scripts).
Due to #!/usr/bin/env bash
it should also work on BSD etc.
Direct script download: zabbix-mysql-dump (v0.8.0)
New options
-c FILE
Use FILE for MySQL options (passed via --defaults-extra-file).
PLEASE NOTE:
mysqldump needs the database to be specified via command line.
So the first "database" options found in the config file is
used for mysqldump.
-r NUM
Rotate backups while keeping up to NUM generations.
Uses filename to match.
Default: keep all backups
-n
Skip reverse lookup of IP address for host.
-q
Quiet mode: no output except for errors (for batch/crontab use).
Changelog for version 0.8.0 (2016-01-22)
- New option -c to use MySQL config file for credentials etc. (idea by @dschneller)
- New option -r to rotate backup files (#3 by @dschneller)
- New option -q for quiet mode (#3 by @dschneller)
- New option -n for suppressing reverse IP lookup (#3 by @dschneller)
- Include Zabbix database version in dump filename
- Default output is now the current working directory instead of the script directory
- Script should now also run when invoked by other scripts (#4 by @dumol)
Thanks!
I want to say sorry for the long delay and thank you to all code and comment contributors:
Parse command lines arguments
Now the script parses command line arguments, so it can be used for different Zabbix installations more easily.
Support for Zabbix 1.3.1 up to 2.4
This is a complete rewrite of the code which selects the database tables, so now a lot of Zabbix versions will be supported.