meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
linux:backup:databases [2015/06/15 08:41]
niziak
linux:backup:databases [2015/07/13 07:55] (current)
niziak
Line 1: Line 1:
 +===== Databases ======
  
 <code bash> <code bash>
-apt-get install automysqlbackup autopostgresqlbackup+apt-get install automysqlbackup autopostgresqlbackup ​backupninja
 </​code>​ </​code>​
  
-====== automysqlbackup ​======+===== backupninja ​===== 
 +Add to /​etc/​backup.d/​20.mysql 
 +<code ini> 
 +nodata ​performance_schema.cond_instances 
 +</​code>​
  
 +add --skip-events parameter to mysqldump call in file /​usr/​share/​backupninja/​mysql
 +<code bash>
 +...
 +DUMP="​$DUMP_BASE $ignore $db --skip-events"​
 +...
 +</​code>​
 +
 +Add to /etc/my.cnf
 +<code ini>
 +[mysqldump]
 +...
 +ignore-table=mysql.event
 +ignore-table=performance_schema.cond_instances
 +ignore-table=performance_schema.events_waits_current
 +ignore-table=performance_schema.events_waits_history
 +ignore-table=performance_schema.events_waits_history_long
 +ignore-table=performance_schema.events_waits_summary_by_instance
 +ignore-table=performance_schema.events_waits_summary_by_thread_by_event_name
 +ignore-table=performance_schema.events_waits_summary_global_by_event_name
 +ignore-table=performance_schema.file_instances
 +ignore-table=performance_schema.file_summary_by_event_name
 +ignore-table=performance_schema.file_summary_by_instance
 +ignore-table=performance_schema.mutex_instances
 +ignore-table=performance_schema.performance_timers
 +ignore-table=performance_schema.rwlock_instances
 +ignore-table=performance_schema.setup_consumers
 +ignore-table=performance_schema.setup_instruments
 +ignore-table=performance_schema.setup_timers
 +ignore-table=performance_schema.threads
 +
 +</​code>​
 +===== automysqlbackup =====
 Default debian configuration should be enough. ​ Default debian configuration should be enough. ​
 Pleae test if script has access to mysqldatabase by issuing command: Pleae test if script has access to mysqldatabase by issuing command:
Line 14: Line 51:
 BACKUPDIR="/​var/​lib/​automysqlbackup"​ BACKUPDIR="/​var/​lib/​automysqlbackup"​
 DBNAMES="​all"​ DBNAMES="​all"​
-DBEXCLUDE="​information_schema performance_schema"​+DBEXCLUDE="​information_schema performance_schema ​events"
 </​code>​ </​code>​
  
-ERRORmysqldump: Got error: 1142: SELECT,LOCK TABL command denied to user '​debian-sys-maint'​@'​localhost'​ for table '​cond_instances'​ when using LOCK TABLES +==== Issues ==== 
-SOLUTIONAdd DBNAMES and DBEXCLUDE configuration values like in example above.+ 
 +|ERRORmysqldump: Got error: 1142: SELECT,LOCK TABL command denied to user '​debian-sys-maint'​@'​localhost'​ for table '​cond_instances'​ when using LOCK TABLES| 
 +|SOLUTIONAdd DBNAMES and DBEXCLUDE configuration values like in example above.
 + 
 +|ERROR| Warning: Skipping the data of table mysql.event. Specify the --events option explicitly.| 
 +|SOLUTION| See above |
  
  
-===== Issues ===== 
 Default configuration for Debian is using //​debian-sys-maint//​ user to get access to database. Default configuration for Debian is using //​debian-sys-maint//​ user to get access to database.
 This user cannot get access to //​information_schema//​ database. This user cannot get access to //​information_schema//​ database.
  
  
-====== autopostgresqlbackup ​======+===== autopostgresqlbackup =====
  
 # Password # Password