From: Garith D. <ga...@sa...> - 2006-12-18 22:34:41
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> </head> <body bgcolor="#ffffff" text="#000000"> Thnx Torsten,<br> <br> This worked. I also had to add a sudo for the env command..<br> <br> Cheers,<br> <br> Torsten Sadowski wrote: <blockquote cite="mid...@tu..." type="cite"> <pre wrap="">OK, this sounds like access control. Your tar must have the right to read /etc. Try $Conf{TarClientCmd} = '/usr/bin/sudo ... and in etc/sudoers apache ALL=NOPASSWD: /usr/bin/tar Cheers, Torsten Am Montag, 18. Dezember 2006 14:24 schrieb Garith Dugmore: </pre> <blockquote type="cite"> <pre wrap=""> Okay but this is LC_ALL=C .. I did try it nevertheless and had the same issue; same error. If i do the same command as root I get the contents of the /etc directory and the contents of each file. This is pushed out to standard output. My feeling is the command works but not when running as apache.. Torsten Sadowski wrote: Could you try without "env" in the tar commands? I had the same problem and for me "env LANG=C" did not work but "LANG=C" did. Torsten Am Montag, 18. Dezember 2006 11:04 schrieb Garith Dugmore: Hello fellow backuppc users, I'm attempting to backup a directory on a linux box with using the following host config file: ---------------------------------- $Conf{XferMethod} = 'tar'; $Conf{TarClientPath} = '/bin/tar'; $Conf{TarShareName} = '/etc'; $Conf{TarClientCmd} = '$sshPath -q -x -n -l root $host' . ' env LC_ALL=C $tarPath -c -v -f - -C $shareName+' . ' --totals'; $Conf{TarFullArgs} = '$fileList+'; $Conf{TarIncrArgs} = '--newer=$incrDate+ $fileList+'; $Conf{TarClientRestoreCmd} = '$sshPath -q -x -l root $host' . ' env LC_ALL=C $tarPath -x -p --numeric-owner --same-owner' . ' -v -f - -C $shareName+'; ---------------------------------- The command it eventually uses is reported as : /usr/bin/ssh -q -x -n -l root wind env LC_ALL=C /bin/tar -c -v -f - -C /etc --totals . Which works from the cli when logged in as root (after copying ssh keys to client in question) but not from within backuppc; error: Running: /usr/bin/ssh -q -x -n -l root wind env LC_ALL=C /bin/tar -c -v -f - -C /etc --totals . full backup started for directory /etc Xfer PIDs are now 24504,24503 Tar exited with error 65280 () status tarExtract: Done: 0 errors, 0 filesExist, 0 sizeExist, 0 sizeExistComp, 0 filesTotal, 0 sizeTotal Got fatal error during xfer (No files dumped for share /etc) Backup aborted (No files dumped for share /etc) backuppc is running as user "apache" and has the following line in /etc/passwd: apache:x:48:48:Apache:/var/www:/sbin/nologin Any ideas on how to get this to work. For security reasons i'd prefer to keep apache running without shell access. Thnx in advance, ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash <a class="moz-txt-link-freetext" href="http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV">http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV</a> _______________________________________________ BackupPC-users mailing list <a class="moz-txt-link-abbreviated" href="mailto:Bac...@li...">Bac...@li...</a> <a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/backuppc-users">https://lists.sourceforge.net/lists/listinfo/backuppc-users</a> <a class="moz-txt-link-freetext" href="http://backuppc.sourceforge.net/">http://backuppc.sourceforge.net/</a> </pre> </blockquote> <pre wrap=""><!----> ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash <a class="moz-txt-link-freetext" href="http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV">http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV</a> _______________________________________________ BackupPC-users mailing list <a class="moz-txt-link-abbreviated" href="mailto:Bac...@li...">Bac...@li...</a> <a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/backuppc-users">https://lists.sourceforge.net/lists/listinfo/backuppc-users</a> <a class="moz-txt-link-freetext" href="http://backuppc.sourceforge.net/">http://backuppc.sourceforge.net/</a> </pre> </blockquote> <br> <pre class="moz-signature" cols="72">-- Garith Dugmore Systems Administrator South African Astronomical Observatory Phone: 021 460 9343 Website: <a class="moz-txt-link-freetext" href="http://www.saao.ac.za">http://www.saao.ac.za</a> </pre> </body> </html> |