File: mysql.pl

package info (click to toggle)
backuppc 4.4.0-11
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,752 kB
  • sloc: perl: 37,523; sh: 607; javascript: 176; makefile: 38; ansic: 6
file content (17 lines) | stat: -rw-r--r-- 577 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#
# Mysql backup over ssh
#
# You should generate an SSH key pair to allow the local backuppc user
# to connect as root on the target host.
# Please refer to the BackupPC's manual for details
#
# Replace $dbuser and $dbpasswd with appropriate values to dump your database
# You should also create the /var/backup-mysql/ directory.
#

$Conf{XferMethod} = 'tar';

$Conf{BackupFilesOnly} = [ '/var/backup-mysql/' ]; 

$Conf{DumpPreUserCmd}     = '$sshPath -l root $host mysqldump \
-u $dbuser -p$dbpasswd --all-databases --add-locks > /var/backup-mysql/backup-all-databases.sql'