comitting change to pgsql handler that I forgot to change, allows
the postgresql user to be set in backupninja.conf, instead of hardcoded
git-svn-id: http://code.autistici.org/svn/backupninja/trunk@420
758a04ac-41e6-0310-8a23-
8373a73cc35d
garcondumonde@riseup.net
Martin Krafft madduck@debian.org -- admingroup patch
Anarcat
+rhatto
Thanks to Martin Krafft for the patch (Closes: #370396).
. When determining which backup actions to make, find now follows
symlinks for $configdirectory
+ . Changed order of -s to mail for compatibility
handler changes
Added tar handler:
. create tarballs
. Fixed inversed vsname emptiness check
. Fixed su quote usage to be more posixy
. 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:
. Fixed inversed vsname emptiness check
. Fixed su quote usage to be more posixy
. Fixed shell expansion, thanks Thomas Kotzian (Closes: #363297)
. 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)
+ . $PGSQLUSER is used instead of hardcoding user 'postgres' (although this is the default)
svn:
. Fixed inversed vsname emptiness check
rdiff:
# 1. setting the user, so that /home/user/.my.cnf is used.
# 2. specifying the user and password in the handler config,
# 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)
#
umask $oldmask
if [ $usevserver = yes ]
then
- defaultsfile="--defaults-file=$vhome/.my.cnf"
+ defaultsfile="--defaults-extra-file=$vhome/.my.cnf"
else
- defaultsfile="--defaults-file=$mycnf"
+ defaultsfile="--defaults-extra-file=$mycnf"
fi
fi
# if a user is not set, use $configfile, otherwise use $mycnf
if [ "$user" == "" ]; then
user=root;
- defaultsfile="--defaults-file=$configfile"
+ defaultsfile="--defaults-extra-file=$configfile"
else
userset=true;
if [ $usevserver = yes ]
debug "User home set to: $userhome"
[ -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"
fi
# give backup dir the good uid and permissions
# (in respect to the vserver, if $usevserver = yes)
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
pguid=`getent passwd postgres | awk -F: '{print $3}'`
fi