meta data for this page
This is an old revision of the document!
apt-get install automysqlbackup autopostgresqlbackup
ninja backup
Add to /etc/backup.d/20.mysql
nodata = performance_schema.cond_instances
automysqlbackup
Default debian configuration should be enough. Pleae test if script has access to mysqldatabase by issuing command:
mysql --defaults-file=/etc/mysql/debian.cnf --execute="SHOW DATABASES"
You can customize configuration:
- /etc/default/automysqlbackup
BACKUPDIR="/var/lib/automysqlbackup" DBNAMES="all" DBEXCLUDE="information_schema performance_schema"
Issues
ERROR: mysqldump: Got error: 1142: SELECT,LOCK TABL command denied to user 'debian-sys-maint'@'localhost' for table 'cond_instances' when using LOCK TABLES SOLUTION: Add DBNAMES and DBEXCLUDE configuration values like in example above.
Default configuration for Debian is using debian-sys-maint user to get access to database. This user cannot get access to information_schema database.
autopostgresqlbackup
# Password # create a file $HOME/.pgpass containing a line like this # hostname:*:*:dbuser:dbpass # replace hostname with the value of DBHOST and postgres with. # the value of USERNAME
Default $HOME for user postgres is /var/lib/postgresql
Pleae test if script has access by issuing command:
mysqldump --defaults-file=/etc/mysql/debian.cnf --all-databases --no-data
You can customize configuration:
- /etc/default/autopostgresqlbackup
BACKUPDIR="/var/lib/autopostgresqlbackup"