Package: backupninja
Version: 0.9.3-5
Severity: important

Hi,

I have had recurring problems deploying backupninja in vservers. Not
using the vservers = foo approach, mind you, but directly installing
backupninja in the vserver and configuring it.

An example is the duplicity handler. It calls duplicity using this
fragment:

        output=`nice -n $nicelevel \
                  su -c \
                    "duplicity $execstr --exclude '**' / $execstr_serverpart 
2>&1"`

In other words:

nice su -c "ls"

This doesn't work on a vserver, even though su works:

[EMAIL PROTECTED]:~# nice su -c ls
su: Permission denied
[EMAIL PROTECTED]:~# su -c ls
[EMAIL PROTECTED]:~#

That is because the vserver isn't a "realtime" vserver (it can't raise
its processes priorities). An strace shows the problem fairly clearly:

...
setpriority(PRIO_PROCESS, 0, 0)         = -1 EACCES (Permission denied)
getpid()                                = 11777
rt_sigaction(SIGPIPE, {0x2aaaf6e824f0, [], 0x4000000}, {SIG_DFL}, 8) = 0
sendto(3, "<83>Jan 10 18:14:02 su[11777]: p"..., 67, 0, NULL, 0) = 67
rt_sigaction(SIGPIPE, {SIG_DFL}, NULL, 8) = 0
write(2, "su: Permission denied\n", 22su: Permission denied
...

I really wonder why this `su -c' call is there, because it doesn't
serve any purpose in my eyes.

I would advocate removing all such calls. I had to do it here to make
it work. Here's my current patch on dup:

@@ -119,14 +130,14 @@
 for i in $exclude; do
        str="${i//__star__/*}"
        i=`readlink -f ${i#}`
-       execstr="${execstr}--exclude '$str' "
+       execstr="${execstr}--exclude $str "
 done

 # includes
 for i in $include; do
        str="${i//__star__/*}"
        i=`readlink -f ${i#}`
-       execstr="${execstr}--include '$str' "
+       execstr="${execstr}--include $str "
 done

 # vsincludes
@@ -135,7 +146,7 @@
        for vi in $vsinclude; do
            i=`readlink -f $VROOTDIR/$vserver$vi`
            str="${i//__star__/*}"
-           execstr="${execstr}--include '$VROOTDIR/$vserver$str' "
+           execstr="${execstr}--include $VROOTDIR/$vserver$str "
        done
     done
 fi
@@ -156,8 +167,7 @@
 if [ ! $test ]; then
         export PASSPHRASE=$password
        output=`nice -n $nicelevel \
-                  su -c \
-                    "duplicity $execstr --exclude '**' / $execstr_serverpart 
2>&1"`
+                     duplicity $execstr --exclude '**' / $execstr_serverpart 
2>&1`
        code=$?
        if [ $code -eq 0 ]; then
                debug $output


-- System Information:
Debian Release: 4.0
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-3-686
Locale: LANG=fr_CA.UTF-8, LC_CTYPE=fr_CA.UTF-8 (charmap=UTF-8)


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to