Added fix to mysql handler for option change to --extra-files, also

comitting change to pgsql handler that I forgot to change, allows
the postgresql user to be set in backupninja.conf, instead of hardcoded
This commit is contained in:
Micah Anderson 2006-08-03 17:38:00 +00:00
parent eaddb26849
commit 32e13d4c65
4 changed files with 10 additions and 6 deletions

View File

@ -18,3 +18,4 @@ Brad Fritz <brad@fritzfam.com> -- trac patch
garcondumonde@riseup.net garcondumonde@riseup.net
Martin Krafft madduck@debian.org -- admingroup patch Martin Krafft madduck@debian.org -- admingroup patch
Anarcat Anarcat
rhatto

View File

@ -10,6 +10,7 @@ version 0.9.4 -- unreleased
Thanks to Martin Krafft for the patch (Closes: #370396). Thanks to Martin Krafft for the patch (Closes: #370396).
. When determining which backup actions to make, find now follows . When determining which backup actions to make, find now follows
symlinks for $configdirectory symlinks for $configdirectory
. Changed order of -s to mail for compatibility
handler changes handler changes
Added tar handler: Added tar handler:
. create tarballs . create tarballs
@ -22,12 +23,14 @@ version 0.9.4 -- unreleased
. Fixed inversed vsname emptiness check . Fixed inversed vsname emptiness check
. Fixed su quote usage to be more posixy . Fixed su quote usage to be more posixy
. Compress for sqldumps now happens in-line to save some disk space (Closes: #370778) . Compress for sqldumps now happens in-line to save some disk space (Closes: #370778)
. Fixed --defaults-file now as --defaults-extra-file (thanks rhatto)
pgsql: pgsql:
. Fixed inversed vsname emptiness check . Fixed inversed vsname emptiness check
. Fixed su quote usage to be more posixy . Fixed su quote usage to be more posixy
. Fixed shell expansion, thanks Thomas Kotzian (Closes: #363297) . Fixed shell expansion, thanks Thomas Kotzian (Closes: #363297)
. postgres user UID is now the one from inside the vserver if necessary . postgres user UID is now the one from inside the vserver if necessary
. Compress now happens in-line to save some disk space (Closes: #370778) . Compress now happens in-line to save some disk space (Closes: #370778)
. $PGSQLUSER is used instead of hardcoding user 'postgres' (although this is the default)
svn: svn:
. Fixed inversed vsname emptiness check . Fixed inversed vsname emptiness check
rdiff: rdiff:

View File

@ -75,7 +75,7 @@ fi
# 1. setting the user, so that /home/user/.my.cnf is used. # 1. setting the user, so that /home/user/.my.cnf is used.
# 2. specifying the user and password in the handler config, # 2. specifying the user and password in the handler config,
# which generates a temporary .my.cnf in /root/.my.cnf # which generates a temporary .my.cnf in /root/.my.cnf
# 3. specify the config file with --defaults-file # 3. specify the config file with --defaults-extra-file
# (this option DOESN'T WORK WITH MYSQLHOTCOPY) # (this option DOESN'T WORK WITH MYSQLHOTCOPY)
# #
@ -130,16 +130,16 @@ EOF
umask $oldmask umask $oldmask
if [ $usevserver = yes ] if [ $usevserver = yes ]
then then
defaultsfile="--defaults-file=$vhome/.my.cnf" defaultsfile="--defaults-extra-file=$vhome/.my.cnf"
else else
defaultsfile="--defaults-file=$mycnf" defaultsfile="--defaults-extra-file=$mycnf"
fi fi
fi fi
# if a user is not set, use $configfile, otherwise use $mycnf # if a user is not set, use $configfile, otherwise use $mycnf
if [ "$user" == "" ]; then if [ "$user" == "" ]; then
user=root; user=root;
defaultsfile="--defaults-file=$configfile" defaultsfile="--defaults-extra-file=$configfile"
else else
userset=true; userset=true;
if [ $usevserver = yes ] if [ $usevserver = yes ]
@ -160,7 +160,7 @@ else
debug "User home set to: $userhome" debug "User home set to: $userhome"
[ -f $userhome/.my.cnf ] || fatal "Can't find config file in $userhome/.my.cnf" [ -f $userhome/.my.cnf ] || fatal "Can't find config file in $userhome/.my.cnf"
defaultsfile="--defaults-file=$userhome/.my.cnf" defaultsfile="--defaults-extra-file=$userhome/.my.cnf"
debug "using $defaultsfile" debug "using $defaultsfile"
fi fi

View File

@ -62,7 +62,7 @@ fi
# give backup dir the good uid and permissions # give backup dir the good uid and permissions
# (in respect to the vserver, if $usevserver = yes) # (in respect to the vserver, if $usevserver = yes)
if [ $usevserver = yes ]; then if [ $usevserver = yes ]; then
pguid=`$VSERVER $vsname exec getent passwd postgres | awk -F: '{print $3}'` pguid=`$VSERVER $vsname exec getent passwd $PGSQLUSER | awk -F: '{print $3}'`
else else
pguid=`getent passwd postgres | awk -F: '{print $3}'` pguid=`getent passwd postgres | awk -F: '{print $3}'`
fi fi