3 inputBox "mysql action wizard" "specify a system user:"
4 do_mysql_final "user = $REPLY"
8 inputBox "mysql action wizard" "specify a mysql user:"
10 inputBox "mysql action wizard" "specify the mysql user's password:"
12 do_mysql_final "dbusername = $user\ndbpassword = $password"
17 do_mysql_final "configfile = /etc/mysql/debian.cnf"
21 inputBox "mysql action wizard" "what system user does mysql backup use?"
22 do_mysql_final "user = $REPLY"
26 if [ -z "$_DISABLE_HOTCOPY" ]; then
27 checkBox "mysql action wizard" "check options" \
28 "sqldump" "create a backup using mysqldump (more compat)." off \
29 "hotcopy" "create a backup using mysqlhotcopy (faster)." on \
30 "compress" "compress the sql output files" on
32 sqldump="sqldump = off"
33 hotcopy="hotcopy = off"
35 checkBox "mysql action wizard" "check options" \
36 "compress" "compress the sql output files" on
38 sqldump="sqldump = on"
39 hotcopy="hotcopy = off"
42 [ $status = 1 ] && return;
44 compress="compress = off"
45 for opt in $result; do
47 '"sqldump"') sqldump="sqldump = on";;
48 '"hotcopy"') hotcopy="hotcopy = on";;
49 '"compress"') compress="compress = on";;
52 get_next_filename $configdirectory/20.mysql
53 echo -e $@ > $next_filename
54 cat >> $next_filename <<EOF
59 # backupdir = /var/backups/mysql
62 chmod 000 $next_filename
68 menuBoxHelpFile "mysql action wizard" "choose a mysql authentication method:" \
69 user "change to a linux user first." \
70 password "manually specify mysql user and password." \
71 debian "use default mysql user debian-sys-maint."
73 if [ $status = 2 ]; then
75 helptmp="/tmp/backupninja.help.$$"
77 To connect to mysql, backupninja must authenticate.
78 There are three possible authentication methods:
81 With this method, you specify a system user. Backupninja will
82 then become this user before running mysqldump or mysqlhotcopy.
83 The result is that ~/.my.cnf is used for authentication.
86 With this method, you manually specify a mysql user and
87 password in the backup action configuration.
90 With this method, we use the debian-sys-maint user which is
91 already defined in /etc/mysql/debian.cnf. If you are running
92 debian, this is recommended, because no further configuration
93 is needed. The drawback is that this is incompatible with
94 mysqlhotcopy: you must use mysqldump.
96 dialog --textbox $helptmp 0 0
100 [ $status = 1 ] && return;
103 "user") do_mysql_user;return;;
104 "password") do_mysql_password;return;;
105 "debian") do_mysql_debian;return;;