Linux BackupPC issues

Discussion in 'Software' started by FaIIen, 4 Jul 2007.

  1. FaIIen

    FaIIen origami killer

    Joined:
    31 Dec 2001
    Posts:
    507
    Likes Received:
    0
    I got BackupPC 3.0 up and running. I'm currently testing it with a windows
    client using a samba share. I haven't touched anything in the default
    configuration with which I believe the server should take backups of all hosts
    every 1 hour excluding the blackout period which is the only thing I changed in
    order to test it. This is the last line of the logs, and every time that passes
    it reproduces the same message.

    "2007-07-04 10:00:00 Next wakeup is 2007-07-04 11:00:00"

    And just that, no backups are been taken by the system.

    Also if I manually take incremental backups after I make some changes in the
    files of the share, for instance, change the filename of a file, the incremental
    backup won't see that change and take backup of the file with its older
    filename. I have to take full backups in order to store updated files. Any
    solutions to that ? I've read somewhere that samba method won't be able to
    detect file changes and I'll have to install cygwin in every client in order to
    use rsync which does proper backup of updated files, is that true ?
     
  2. DougEdey

    DougEdey I pwn all your storage

    Joined:
    5 Jul 2005
    Posts:
    13,933
    Likes Received:
    33
    What config file are you using?
     
  3. Glider

    Glider /dev/null

    Joined:
    2 Aug 2005
    Posts:
    4,173
    Likes Received:
    21
    If you go to the webbased GUI, and select the host, you get a list of current backups. Are any listed there? You'll need a full one first before you can do incremental backups.

    Also, are the given credentials (username//password) correct for the host?
     
  4. FaIIen

    FaIIen origami killer

    Joined:
    31 Dec 2001
    Posts:
    507
    Likes Received:
    0
    As I said I'm using the default configuration (the one that came with the installation of backuppc3).
    I do have backups, I initially made a full backup and then some incrementals to test how things work but all those were made manually. If I had wrong password or username I wouldn't be able to make manual backups , so i guess no problem there. This is how my logs look for today

    2007-07-04 02:00:00 Next wakeup is 2007-07-04 03:00:00
    2007-07-04 03:00:00 Next wakeup is 2007-07-04 04:00:00
    2007-07-04 04:00:01 Next wakeup is 2007-07-04 05:00:00
    2007-07-04 05:00:00 Next wakeup is 2007-07-04 06:00:00
    2007-07-04 06:00:00 Next wakeup is 2007-07-04 07:00:00
    2007-07-04 07:00:00 Next wakeup is 2007-07-04 08:00:00
    2007-07-04 08:00:00 Next wakeup is 2007-07-04 09:00:00
    2007-07-04 09:00:00 Next wakeup is 2007-07-04 10:00:00
    2007-07-04 10:00:00 Next wakeup is 2007-07-04 11:00:00
    2007-07-04 11:00:00 Next wakeup is 2007-07-04 12:00:00
    2007-07-04 12:00:00 Next wakeup is 2007-07-04 13:00:00
    2007-07-04 13:00:01 Next wakeup is 2007-07-04 14:00:00

    Normally within those hours there should be backups, but nothing happens
     
  5. Glider

    Glider /dev/null

    Joined:
    2 Aug 2005
    Posts:
    4,173
    Likes Received:
    21
    Can you post the output/contents of
    Code:
    /etc/backuppc/<hostname>.pl?
     
  6. FaIIen

    FaIIen origami killer

    Joined:
    31 Dec 2001
    Posts:
    507
    Likes Received:
    0
    $Conf{SmbShareName} = 'test';
    $Conf{SmbShareUserName} = 'joe';
    $Conf{SmbSharePasswd} = 'doe';
    $Conf{XferMethod} = 'smb';

    that's all

    hmm ..maybe it's not complete, do i need to put scheduling options in here as well ?
     
  7. Glider

    Glider /dev/null

    Joined:
    2 Aug 2005
    Posts:
    4,173
    Likes Received:
    21
    I'd move the file to somewhere safe, and reconfigure the backup task (using the webbased GUI). I think the info you have in the config isn't sufficient.

    EDIT: I checked, and on my machines (using rsync) there is some info about the full and incremental backup keep

    $Conf{FullPeriod} = '6.97' and so on
     
  8. FaIIen

    FaIIen origami killer

    Joined:
    31 Dec 2001
    Posts:
    507
    Likes Received:
    0
    ok it's working now

    however
    when taking incremental backups the system isn't able to see the differences on files that changed for example a changed filename, and so it will backup up that file with the older version. If I do full backup then it can store the files properly. Is that because of samba ?
     
  9. FaIIen

    FaIIen origami killer

    Joined:
    31 Dec 2001
    Posts:
    507
    Likes Received:
    0
    OK i resolved the problem by using rsyncd. Now I got smth else .. this is from the server log files after taking a backup.
    BackupPC_link got error -4 when calling MakeFileLink /backupdir/randomfile

    This appears on some of the files during the backup process, any ideas what's going on ?
     
  10. Glider

    Glider /dev/null

    Joined:
    2 Aug 2005
    Posts:
    4,173
    Likes Received:
    21
    Probably open files... Those can't be accessed...
     
  11. FaIIen

    FaIIen origami killer

    Joined:
    31 Dec 2001
    Posts:
    507
    Likes Received:
    0
    are you using rsyncd ? can you please send me your config.pl file ?:/
     
  12. Glider

    Glider /dev/null

    Joined:
    2 Aug 2005
    Posts:
    4,173
    Likes Received:
    21
    It's through passwordless SSH (shared keys) using rsyncd, making 1 full / week and a incremental every day, keeps 2 full ones (from a host, give me a sec for the general config.pl).
    Code:
    #
    # Local server backup of /etc as user backuppc
    #
    $Conf{XferMethod} = 'rsync';
    $Conf{XferLogLevel} = '1';
    
    $Conf{RsyncClientPath} = '/usr/bin/rsync';
    $Conf{RsyncClientCmd} = '$sshPath -c blowfish -q -x -l root $host $rsyncPath $argList+';
    $Conf{RsyncClientRestoreCmd} = '$sshPath -c blowfish -q -x -l root $host $rsyncPath $argList+';
    $Conf{RsyncShareName} = [
      '/etc',
      '/home'
      '/root'
    ];
    
    $Conf{RsyncArgs} = [
      '--numeric-ids',
      '--perms',
      '--owner',
      '--group',
      '--devices',
      '--links',
      '--times',
      '--block-size=2048',
      '--recursive',
      '--specials'
    ];
    
    $Conf{RsyncRestoreArgs} = [
      '--numeric-ids',
      '--perms',
      '--owner',
      '--group',
      '--devices',
      '--links',
      '--times',
      '--block-size=2048',
      '--relative',
      '--ignore-times',
      '--recursive',
      '--specials'
    ];
    
    $Conf{CompressLevel} = '5';
    
    #  keer per week full
    $Conf{FullPeriod} = '6.97';
    
    # elke dag incremental
    $Conf{IncrPeriod} = '2.97';
    
    # bewaar 2 full backups
    $Conf{FullKeepCnt} = [
      '2'
    ];
    $Conf{FullKeepCntMin} = '1';
    
    # bewaar 12 (2 weken incrmental)
    $Conf{IncrKeepCnt} = '6';
     
  13. Glider

    Glider /dev/null

    Joined:
    2 Aug 2005
    Posts:
    4,173
    Likes Received:
    21
    Cut out the comments for you, it was over 74000 chars long, vb only allows 20000 :s

    Code:
    $ENV{'PATH'} = '/bin:/usr/bin';
    delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'};
    $Conf{ServerHost} = 'durga';
    chomp($Conf{ServerHost});
    
    $Conf{ServerPort} = '1024';
    
    $Conf{ServerMesgSecret} = 'ditiseensecretmsg';
    
    $Conf{MyPath} = '/bin';
    
    $Conf{UmaskMode} = '23';
    
    $Conf{WakeupSchedule} = [
      '22',
      '4'
    ];
    
    $Conf{MaxBackups} = '2';
    
    $Conf{MaxUserBackups} = '2';
    
    $Conf{MaxPendingCmds} = '10';
    
    $Conf{MaxBackupPCNightlyJobs} = '2';
    
    $Conf{BackupPCNightlyPeriod} = '1';
    
    $Conf{MaxOldLogFiles} = '5';
    
    $Conf{DfPath} = '/bin/df';
    
    $Conf{DfCmd} = '$dfPath $topDir';
    
    $Conf{SplitPath} = '/usr/bin/split';
    $Conf{ParPath} = undef;
    $Conf{CatPath} = '/bin/cat';
    $Conf{GzipPath} = '/bin/gzip';
    $Conf{Bzip2Path} = '/bin/bzip2';
    
    $Conf{DfMaxUsagePct} = '95';
    
    $Conf{TrashCleanSleepSec} = '300';
    
    $Conf{DHCPAddressRanges} = [];
    
    $Conf{BackupPCUser} = 'backuppc';
    
    $Conf{TopDir} = '/var/lib/backuppc';
    $Conf{ConfDir} = '/etc/backuppc';
    $Conf{LogDir} = '/var/log/backuppc';
    $Conf{InstallDir} = '/usr/share/backuppc';
    $Conf{CgiDir} = '/usr/share/backuppc/cgi-bin';
    
    $Conf{BackupPCUserVerify} = '1';
    
    $Conf{HardLinkMax} = '31999';
    
    $Conf{PerlModuleLoad} = undef;
    
    $Conf{ServerInitdPath} = undef;
    $Conf{ServerInitdStartCmd} = '';
    
    
    $Conf{FullPeriod} = '6.97';
    
    $Conf{IncrPeriod} = '0.97';
    
    $Conf{FullKeepCnt} = [
      '1'
    ];
    
    $Conf{FullKeepCntMin} = '1';
    $Conf{FullAgeMax} = '90';
    
    $Conf{IncrKeepCnt} = '6';
    
    $Conf{IncrKeepCntMin} = '1';
    $Conf{IncrAgeMax} = '30';
    
    $Conf{IncrLevels} = [
      '1'
    ];
    
    $Conf{BackupsDisable} = '0';
    
    $Conf{PartialAgeMax} = '3';
    
    $Conf{IncrFill} = '0';
    
    $Conf{RestoreInfoKeepCnt} = '10';
    
    $Conf{ArchiveInfoKeepCnt} = '10';
    
    $Conf{BackupFilesOnly} = {};
    
    $Conf{BackupFilesExclude} = {};
    
    $Conf{BlackoutBadPingLimit} = '3';
    $Conf{BlackoutGoodCnt} = '7';
    
    $Conf{BlackoutPeriods} = [
      {
        'hourEnd' => '19.5',
        'weekDays' => [
          '1',
          '2',
          '3',
          '4',
          '5'
        ],
        'hourBegin' => '7'
      }
    ];
    
    $Conf{BackupZeroFilesIsFatal} = '1';
    
    $Conf{XferMethod} = 'rsyncd';
    
    $Conf{XferLogLevel} = '1';
    
    $Conf{ClientCharset} = '';
    
    $Conf{SmbShareName} = [
      'C$'
    ];
    
    $Conf{SmbShareUserName} = '';
    
    $Conf{SmbSharePasswd} = '';
    
    $Conf{SmbClientPath} = '/usr/bin/smbclient';
    
    $Conf{SmbClientFullCmd} = '$smbClientPath \\\\$host\\$shareName $I_option -U $userName -E -N -d 1 -c tarmode\\ full -Tc$X_option - $fileList';
    
    $Conf{SmbClientIncrCmd} = '$smbClientPath \\\\$host\\$shareName $I_option -U $userName -E -N -d 1 -c tarmode\\ full -TcN$X_option $timeStampFile - $fileList';
    
    $Conf{SmbClientRestoreCmd} = '$smbClientPath \\\\$host\\$shareName $I_option -U $userName -E -N -d 1 -c tarmode\\ full -Tx -';
    
    $Conf{TarShareName} = [
      '/'
    ];
    
    $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+';
    
    $Conf{TarClientPath} = '/bin/tar';
    
    $Conf{RsyncClientPath} = '/usr/bin/rsync';
    
    $Conf{RsyncClientCmd} = '$sshPath -q -x -l root $host $rsyncPath $argList+';
    
    $Conf{RsyncClientRestoreCmd} = '$sshPath -q -x -l root $host $rsyncPath $argList+';
    
    $Conf{RsyncShareName} = [
      '/'
    ];
    
    $Conf{RsyncdClientPort} = '873';
    
    $Conf{RsyncdUserName} = '';
    
    $Conf{RsyncdPasswd} = '';
    
    $Conf{RsyncdAuthRequired} = '1';
    
    $Conf{RsyncCsumCacheVerifyProb} = '0.01';
    
    $Conf{RsyncArgs} = [
      '--numeric-ids',
      '--perms',
      '--owner',
      '--group',
      '-D',
      '--links',
      '--hard-links',
      '--times',
      '--block-size=2048',
      '--recursive'
    ];
    
    $Conf{RsyncRestoreArgs} = [
      '--numeric-ids',
      '--perms',
      '--owner',
      '--group',
      '-D',
      '--links',
      '--hard-links',
      '--times',
      '--block-size=2048',
      '--relative',
      '--ignore-times',
      '--recursive'
    ];
    
    $Conf{BackupPCdShareName} = '/';
    
    $Conf{BackupPCdPath} = '';
    
    $Conf{BackupPCdCmd} = '$bpcdPath $host $shareName $poolDir XXXX $poolCompress $topDir/pc/$client/new';
    
    $Conf{BackupPCdRestoreCmd} = '$bpcdPath TODO';
    
    
    $Conf{ArchiveDest} = '/tmp';
    
    $Conf{ArchiveComp} = 'gzip';
    
    $Conf{ArchivePar} = '0';
    
    $Conf{ArchiveSplit} = '0';
    
    $Conf{ArchiveClientCmd} = '$Installdir/bin/BackupPC_archiveHost $tarCreatePath $splitpath $parpath $host $backupnumber $compression $compext $splitsize $archiveloc $parfile *';
    
    $Conf{SshPath} = '/usr/bin/ssh';
    
    $Conf{NmbLookupPath} = '/usr/bin/nmblookup';
    
    $Conf{NmbLookupCmd} = '$nmbLookupPath -A $host';
    
    $Conf{NmbLookupFindHostCmd} = '$nmbLookupPath $host';
    
    $Conf{FixedIPNetBiosNameCheck} = '0';
    
    $Conf{PingPath} = '/bin/ping';
    
    $Conf{PingCmd} = '$pingPath -c 1 $host';
    
    $Conf{PingMaxMsec} = '20';
    
    $Conf{CompressLevel} = '5';
    
    $Conf{ClientTimeout} = '72000';
    
    $Conf{MaxOldPerPCLogFiles} = '12';
    
    $Conf{DumpPreUserCmd} = undef;
    $Conf{DumpPostUserCmd} = undef;
    $Conf{DumpPreShareCmd} = undef;
    $Conf{DumpPostShareCmd} = undef;
    $Conf{RestorePreUserCmd} = undef;
    $Conf{RestorePostUserCmd} = undef;
    $Conf{ArchivePreUserCmd} = undef;
    $Conf{ArchivePostUserCmd} = undef;
    
    $Conf{UserCmdCheckStatus} = '0';
    
    $Conf{ClientNameAlias} = undef;
    
    $Conf{SendmailPath} = '/usr/sbin/sendmail';
    
    $Conf{EMailNotifyMinDays} = '2.5';
    
    $Conf{EMailFromUserName} = 'backuppc';
    
    $Conf{EMailAdminUserName} = 'backuppc';
    
    $Conf{EMailUserDestDomain} = '';
    
    $Conf{EMailNoBackupEverSubj} = undef;
    $Conf{EMailNoBackupEverMesg} = undef;
    
    $Conf{EMailNotifyOldBackupDays} = '7';
    
    $Conf{EMailNoBackupRecentSubj} = undef;
    $Conf{EMailNoBackupRecentMesg} = undef;
    
    $Conf{EMailNotifyOldOutlookDays} = '5';
    
    $Conf{EMailOutlookBackupSubj} = undef;
    $Conf{EMailOutlookBackupMesg} = undef;
    
    $Conf{EMailHeaders} = 'MIME-Version: 1.0
    Content-Type: text/plain; charset="iso-8859-1"
    ';
    
    $Conf{CgiAdminUserGroup} = '*';
    $Conf{CgiAdminUsers} = '*';
    
    $Conf{CgiURL} = 'http://durga/backuppc/index.cgi';
    
    $Conf{Language} = 'en';
    
    $Conf{CgiUserHomePageCheck} = '';
    $Conf{CgiUserUrlCreate} = 'mailto:%s';
    
    $Conf{CgiDateFormatMMDD} = '1';
    
    $Conf{CgiNavBarAdminAllHosts} = '1';
    
    $Conf{CgiSearchBoxEnable} = '1';
    
    $Conf{CgiNavBarLinks} = [
      {
        'link' => '?action=view&type=docs',
        'lname' => 'Documentation',
        'name' => undef
      },
      {
        'link' => 'http://backuppc.sourceforge.net/faq',
        'lname' => undef,
        'name' => 'FAQ'
      },
      {
        'link' => 'http://backuppc.sourceforge.net',
        'lname' => undef,
        'name' => 'SourceForge'
      }
    ];
    
    $Conf{CgiStatusHilightColor} = {
    };
    
    $Conf{CgiHeaders} = '<meta http-equiv="pragma" content="no-cache">';
    
    $Conf{CgiImageDir} = '/usr/share/backuppc/image';
    
    $Conf{CgiExt2ContentType} = {};
    
    $Conf{CgiImageDirURL} = '/backuppc/image';
    
    $Conf{CgiCSSFile} = 'BackupPC_stnd.css';
    
    $Conf{CgiUserConfigEditEnable} = '1';
    
    $Conf{CgiUserConfigEdit} = {
      'EMailOutlookBackupSubj' => '1',
      'ClientCharset' => '1',
      'TarFullArgs' => '1',
      'RsyncdPasswd' => '1',
      'IncrKeepCnt' => '1',
      'PartialAgeMax' => '1',
      'FixedIPNetBiosNameCheck' => '1',
      'SmbShareUserName' => '1',
      'EMailFromUserName' => '1',
      'ArchivePreUserCmd' => '0',
      'PingCmd' => '0',
      'FullAgeMax' => '1',
      'PingMaxMsec' => '1',
      'CompressLevel' => '1',
      'DumpPreShareCmd' => '0',
      'BackupFilesOnly' => '1',
      'EMailNotifyOldBackupDays' => '1',
      'EMailAdminUserName' => '1',
      'RsyncCsumCacheVerifyProb' => '1',
      'BlackoutPeriods' => '1',
      'NmbLookupFindHostCmd' => '0',
      'MaxOldPerPCLogFiles' => '1',
      'TarClientCmd' => '0',
      'EMailNotifyOldOutlookDays' => '1',
      'SmbSharePasswd' => '1',
      'SmbClientIncrCmd' => '0',
      'FullKeepCntMin' => '1',
      'RsyncArgs' => '1',
      'ArchiveComp' => '1',
      'TarIncrArgs' => '1',
      'EMailUserDestDomain' => '1',
      'TarClientPath' => '0',
      'RsyncClientCmd' => '0',
      'IncrFill' => '1',
      'RestoreInfoKeepCnt' => '1',
      'UserCmdCheckStatus' => '0',
      'RsyncdClientPort' => '1',
      'IncrAgeMax' => '1',
      'RsyncRestoreArgs' => '1',
      'SmbClientFullCmd' => '0',
      'ArchiveInfoKeepCnt' => '1',
      'BackupZeroFilesIsFatal' => '1',
      'EMailNoBackupRecentMesg' => '1',
      'FullKeepCnt' => '1',
      'TarShareName' => '1',
      'EMailNoBackupEverSubj' => '1',
      'TarClientRestoreCmd' => '0',
      'EMailNoBackupRecentSubj' => '1',
      'ArchivePar' => '1',
      'XferLogLevel' => '1',
      'ArchiveDest' => '1',
      'ClientTimeout' => '1',
      'EMailNotifyMinDays' => '1',
      'RsyncdAuthRequired' => '1',
      'SmbClientRestoreCmd' => '0',
      'ClientNameAlias' => '1',
      'DumpPostShareCmd' => '0',
      'IncrLevels' => '1',
      'EMailOutlookBackupMesg' => '1',
      'BlackoutBadPingLimit' => '1',
      'BackupFilesExclude' => '1',
      'FullPeriod' => '1',
      'ArchivePostUserCmd' => '0',
      'RsyncClientRestoreCmd' => '0',
      'IncrPeriod' => '1',
      'RsyncShareName' => '1',
      'RestorePostUserCmd' => '0',
      'BlackoutGoodCnt' => '1',
      'ArchiveClientCmd' => '0',
      'ArchiveSplit' => '1',
      'XferMethod' => '1',
      'NmbLookupCmd' => '0',
      'BackupsDisable' => '1',
      'SmbShareName' => '1',
      'RestorePreUserCmd' => '0',
      'IncrKeepCntMin' => '1',
      'EMailNoBackupEverMesg' => '1',
      'EMailHeaders' => '1',
      'DumpPreUserCmd' => '0',
      'RsyncClientPath' => '0',
      'DumpPostUserCmd' => '0'
    };
     
  14. FaIIen

    FaIIen origami killer

    Joined:
    31 Dec 2001
    Posts:
    507
    Likes Received:
    0
    cool, thanks a lot. Those helped me a bit :)
     
  15. FaIIen

    FaIIen origami killer

    Joined:
    31 Dec 2001
    Posts:
    507
    Likes Received:
    0
    I found the solution to the following problem

    multiple "BackupPC_link got error -4 when calling MakeFileLink /random/file"

    I have mounted a seperate hard disk (/dev/hda1) and set it as a TopDIR (/u03) in order to keep my backups there. The thing is, /cpool and /pool directories are mounted by default on the installation filesystem (/var/lib/backuppc) and not on the backup hardisk (/u03) that i used as my TopDIR. If I put TopDIR under its default location on the same filesystem I get no MakeFileLink errors, however what I want to do, and I'm still looking for it, is to set the /cpool and /pool directories in the new filesystem (under /u03 that is).
     
  16. Glider

    Glider /dev/null

    Joined:
    2 Aug 2005
    Posts:
    4,173
    Likes Received:
    21
    I would mount the drive under /var/lib/backuppc, but if you don't want to do that you could just make symolic links so that the system thinks it copys to /var/lib/backuppc but in fact is copying to your prefered directory
     
  17. FaIIen

    FaIIen origami killer

    Joined:
    31 Dec 2001
    Posts:
    507
    Likes Received:
    0
    if i linke /var/lib/backuppc/cpool and /var/lib/backuppc/pool using ln -s it will link the files to /u03/cpool and /u03/pool but won't keep the permissions. Should I use hardlinks ?
     
  18. Glider

    Glider /dev/null

    Joined:
    2 Aug 2005
    Posts:
    4,173
    Likes Received:
    21
    If you just link the directory, chown it to be correct, aren't premissions stored? Not sure tough...

    Why not just mount the partition on /var/lib/backuppc?
     
  19. FaIIen

    FaIIen origami killer

    Joined:
    31 Dec 2001
    Posts:
    507
    Likes Received:
    0
    yey ..that worked :)
     
  20. FaIIen

    FaIIen origami killer

    Joined:
    31 Dec 2001
    Posts:
    507
    Likes Received:
    0
    new problem

    failed: File name too long (91) when backing up some files that got too long filenames. I've made a little research and it seems that the problem lies within cygwin I was wondering if you came across this kind of problem. The solution i've found isn't the easiest approach on this matter, I have to recompile the cygwin dll library including a patch resolving this problem. I was wondering if there's already a new cygwin.dll that supports long file names.
     
Tags:

Share This Page