backuppc restore

Discussion in 'HOWTO-Related Questions' started by raptor2552, Jun 28, 2007.

  1. raptor2552

    raptor2552 New Member

    There two more questions I have which may be because of some configuration, or perhaps a user, problem. Since this is new to me I'm setting backuppc to use tar on the host computer to experiment with, get the lay of the land.

    I cannot restore any files and the log reports:

    Code:
    2007-06-28 09:03:42 Restore failed (BackupPC_tarCreate failed)
    2007-06-28 11:03:52 Running: /usr/share/backuppc/bin/BackupPC_tarCreate -h localhost -n 3 -s / -t -r /home/mike/Media -p /home/mike/Media/ /home/mike/Media/Photo
    Why is backuppc using BackupPC_tarCreate and not BackupPC_tarExtract? Am I totally off base on this or what?

    Here is my localhost.pl file:
    Code:
    #
    # Local server backup of /etc as user backuppc
    #
    $Conf{XferMethod} = 'tar';
    
    $Conf{TarShareName} = '/';
    $Conf{BackupFilesOnly} = ['/home/mike', '/var/www'];
    $Conf{BackupFilesExclude} = ['/home/mike/.VirtualBox','/home/mike/dvdrip-data', '/var/www/smfbbs'];
    
    $Conf{TarClientCmd} = '/usr/bin/env LC_ALL=C $tarPath -c -v -f - -C $shareName'
                            . ' --totals';
    
    $Conf{TarClientRestoreCmd} = ' /usr/bin/env LC_ALL=C $tarPath -x -p --numeric-owner --same-owner'
    		   . ' -v -f - -C $shareName+';
    
    # remove extra shell escapes ($fileList+ etc.) that are
    # needed for remote backups but may break local ones
    $Conf{TarFullArgs} = '$fileList';
    $Conf{TarIncrArgs} = '--newer=$incrDate $fileList';
    The config.pl script has not been modified.

    Secondly I noticed that backuppc did not backup many of my files because "Access was denied". I had put backuppc in the sudoers files as instructed by the install script:
    Code:
     backuppc ALL = NOPASSWD: /bin/tar
    How do get this to work?
     
  2. falko

    falko Super Moderator

    Which distribution do you use? What's the output of
    Code:
    df -h
    on the server?
     
  3. raptor2552

    raptor2552 New Member

    Here you go:
    Code:
    mike in ~:$ df -h
    Filesystem            Size  Used Avail Use% Mounted on
    /dev/sdb1             142G   16G  119G  12% /
    varrun               1014M  304K 1014M   1% /var/run
    varlock              1014M     0 1014M   0% /var/lock
    procbususb           1014M  136K 1014M   1% /proc/bus/usb
    udev                 1014M  136K 1014M   1% /dev
    devshm               1014M     0 1014M   0% /dev/shm
    /dev/sda2             110G   19G   92G  18% /media/DataVolume
    /dev/sda1              40G  9.9G   30G  26% /media/WindowsVolume
    tmpfs                1014M   34M  981M   4% /lib/modules/2.6.20-16-386/volatile
    tmpfs                1014M   33M  981M   4% /lib/modules/2.6.20-16-generic/volatile
    tmpfs                1014M   34M  981M   4% /lib/modules/2.6.20-16-lowlatency/volatile
     
  4. falko

    falko Super Moderator

    Doesn't seem to be a space problem.
    Which distribution do you use?
     
  5. raptor2552

    raptor2552 New Member

    I'm not sure what you mean by distribution so here is everything that seems relevant.
    OS
    Code:
    Ubuntu 7.04 (Feisty Fawn), Linux 2.6.20-16-386 i686 GNU/Linux
    Tar
    Code:
    tar (GNU tar) 1.16
    Copyright (C) 2006 Free Software Foundation, Inc.
    BackupPC
    Code:
    version 2.1.2pl1
    Perl
    Code:
    This is perl, v5.8.8 built for i486-linux-gnu-thread-multi
    Apache2
    Code:
    Server version: Apache/2.2.3
    Server built:   Jan 15 2007 18:14:50
     
  6. falko

    falko Super Moderator

    Ok, you're using Ubuntu Feisty Fawn.

    Please try this:
    Code:
    ln -sf /bin/bash /bin/sh
    Can you restore your files then?
     
  7. raptor2552

    raptor2552 New Member

    I'm sad to say no, that did not do it. On the brighter side I did find an error in the localhost.pl file regarding the restore. Something as simple as an extra space I guess:
    Code:
    $Conf{TarClientRestoreCmd} =[COLOR="Red"] ' /usr/[/COLOR]bin/env LC_ALL=C $tarPath -x -p --numeric-owner --same-owner'
    		   . ' -v -f - -C $shareName+';
    BTW this error was also found in my original config.pl file line # 915
    Code:
    $Conf{TarClientRestoreCmd} = '$sshPath -q -x -l root $host'
    		   .[COLOR="Red"] ' /usr/[/COLOR]bin/env LC_ALL=C $tarPath -x -p --numeric-owner --same-owner'
    		   . ' -v -f - -C $shareName+';
    So when I cut and pasted it, introduced the bad code. My guess is the shell interpreted the line as (space/usr/bin/env) instead of /usr/bin/env. This apparent error also shows up in other parts of the original config.pl file.

    I do thank you for your help, I appreciate it.
     

Share This Page