BackupPC-users

Re: [BackupPC-users] Disk space used far higher than reported pool size

2013-10-30 11:08:54
Subject: Re: [BackupPC-users] Disk space used far higher than reported pool size
From: "Craig O'Brien" <cobrien AT fishman DOT com>
To: "General list for user discussion, questions and support" <backuppc-users AT lists.sourceforge DOT net>
Date: Wed, 30 Oct 2013 11:07:15 -0400
> I'm fairly sure:
> du -sm /backup/pool /backup/cpool /backup/pc/*
> It should count all the data under pool and cpool, and there should be minimal space used for the pc folders (because it counts the space for the first time the inode is seen)

I'm trying that now. I'll report back when it finishes.

> To delete a host, hit the Delete button. For Add, Delete, and configuration copy, changes don't take effect until you select Save. None of the deleted host's backups will be removed, so if you accidently delete a host, simply re-add it. 
> To completely remove a host's backups, you need to manually remove the files below /var/lib/backuppc/pc/HOST 

This is how I've done it when I've removed a host. I would delete the /backup/pc/host directory and remove the entry from /etc/BackupPC/hosts file.

> I would not stake my life on this, but I would bet a pretty substantial amount of money:  you did something to break the pooling.  Most likely by copying backups around.  This undid the hardlinks and > left you with individual copies of the files. 

I don't doubt the pooling is probably broken but I haven't moved any backups around. For what it's worth I before I switched all the pc's to use rsync instead of smb a couple months ago my pool file system was sitting at 30%. I don't know if that's relevant but it does seem odd that my problems seem to have started with that.

> Or punt completely:  rebuild the BackupPC server and start over. 

> You could do almost as well by confirming that your latest backups *are* hardlinking properly and then deleting all of the old backups except maybe a copy or two.  
> I would not delete the copies by > hand, but rather change the configuration to only keep 1 full and 1 incremental.  
> It might be a good idea to make some archives to make sure you have a good copy somewhere.  In any case, once BackupPC has deleted all of the old backups, 
> go into your pc directories and make sure that there is indeed only the backups listed in the GUI in the folder structure.  
> Then, change the incremental and full keep counts back to what they should be and allow it to rebuild. 

I'll probably have to do that. At this point I'm just trying to add to the knowledge base and figure out how it went wrong so it doesn't just happen again. 

> My thought was to parse the output of "df /path/to/drive" and confirm that it was mounted correctly.

Just in case it helps at all:

bash-4.1$ df -h /backup
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1              11T  9.7T   28G 100% /backup
bash-4.1$

> Did you forget to exclude the path to TopDir (usually /var/lib/backuppc)
> from the backup of the BackupPC server itself? I've seen that before. Heck,
> I've DONE that before.

I don't have the server backing itself up.


Here's my config file (with #comment lines removed) just in case that helps at all.
-----------------------------------------

$Conf{ServerHost} = 'localhost';
$Conf{ServerPort} = -1;
$Conf{ServerMesgSecret} = '';
$Conf{MyPath} = '/bin';
$Conf{UmaskMode} = 23;
$Conf{WakeupSchedule} = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23];
$Conf{MaxBackups} = 4;
$Conf{MaxUserBackups} = 4;
$Conf{MaxPendingCmds} = 15;
$Conf{CmdQueueNice} = 10;
$Conf{MaxBackupPCNightlyJobs} = 4;
$Conf{BackupPCNightlyPeriod} = 1;
$Conf{MaxOldLogFiles} = 14;
$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} = '/usr/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/sbin/';
$Conf{BackupPCUserVerify} = '1';
$Conf{HardLinkMax} = 31999;
$Conf{PerlModuleLoad} = undef;
$Conf{ServerInitdPath} = undef;
$Conf{ServerInitdStartCmd} = '';
$Conf{FullPeriod} = 90;
$Conf{IncrPeriod} = 7;
$Conf{FullKeepCnt} = [ 4 ];
$Conf{FullKeepCntMin} = 1;
$Conf{FullAgeMax} = 3000;
$Conf{IncrKeepCnt} = 13;
$Conf{IncrKeepCntMin} = 1;
$Conf{IncrAgeMax} = 45;
$Conf{IncrLevels} = [ 1 ];
$Conf{BackupsDisable} = 0;
$Conf{PartialAgeMax} = 3;
$Conf{IncrFill} = '0';
$Conf{RestoreInfoKeepCnt} = 5;
$Conf{ArchiveInfoKeepCnt} = 5;
$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{ClientCharsetLegacy} = 'iso-8859-1';
$Conf{SmbShareName} = [
  'C$'
];
$Conf{SmbShareUserName} = '';
$Conf{SmbSharePasswd} = '';
$Conf{SmbClientPath} = '/usr/bin/smbclient';
$Conf{SmbClientFullCmd} = '$smbClientPath \\\\$host\\$shareName $I_option -U $userName -E -d 1 -c tarmode\\ full -Tc$X_option - $fileList';
$Conf{SmbClientIncrCmd} = '$smbClientPath \\\\$host\\$shareName $I_option -U $userName -E -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} = 'sudo $tarPath -c -v -f -C $sharename -totals';
$Conf{TarFullArgs} = '$fileList+';
$Conf{TarIncrArgs} = '--newer=$incrDate+ $fileList+';
$Conf{TarClientRestoreCmd} = 'sudo $tarPath -x -v -f -C $sharename -totals';
$Conf{TarClientPath} = '/bin/gtar';
$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} = [
  'netbackup'
];
$Conf{RsyncdClientPort} = 873;
$Conf{RsyncdUserName} = ''; #Edited to remove detail
$Conf{RsyncdPasswd} = ''; #Edited to remove detail
$Conf{RsyncdAuthRequired} = '0';
$Conf{RsyncCsumCacheVerifyProb} = '0.01';
$Conf{RsyncArgs} = [
  '--numeric-ids',
  '--perms',
  '--owner',
  '--group',
  '-D',
  '--links',
  '--hard-links',
  '--times',
  '--block-size=2048',
  '--recursive'
];
$Conf{RsyncArgsExtra} = [];
$Conf{RsyncRestoreArgs} = [
  '--numeric-ids',
  '--perms',
  '--owner',
  '--group',
  '-D',
  '--links',
  '--hard-links',
  '--times',
  '--block-size=2048',
  '--relative',
  '--ignore-times',
  '--recursive'
];
$Conf{FtpShareName} = [
  ''
];
$Conf{FtpUserName} = '';
$Conf{FtpPasswd} = '';
$Conf{FtpPassive} = '1';
$Conf{FtpBlockSize} = 10240;
$Conf{FtpPort} = 21;
$Conf{FtpTimeout} = 120;
$Conf{FtpFollowSymlinks} = '0';
$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 -w 3 $host';
$Conf{PingMaxMsec} = 80;
$Conf{CompressLevel} = 3;
$Conf{ClientTimeout} = 172000;
$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} = ''; #Edited to remove detail
$Conf{EMailUserDestDomain} = ''; #Edited to remove detail
$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="utf-8"
';
$Conf{CgiAdminUserGroup} = 'admin';
$Conf{CgiAdminUsers} = ''; #Edited to remove detail
$Conf{CgiURL} = ''; #Edited to remove detail
$Conf{Language} = 'en';
$Conf{CgiUserHomePageCheck} = '';
$Conf{CgiUserUrlCreate} = 'mailto:%s';
$Conf{CgiDateFormatMMDD} = 1;
$Conf{CgiNavBarAdminAllHosts} = '1';
$Conf{CgiSearchBoxEnable} = '1';
$Conf{CgiNavBarLinks} = [
  {
    'link' => '?action="">
    'lname' => 'Documentation',
    'name' => undef
  },
  {
    'lname' => undef,
    'name' => 'Wiki'
  },
  {
    'lname' => undef,
    'name' => 'SourceForge'
  }
];
$Conf{CgiStatusHilightColor} = {
  'Reason_backup_failed' => '#ffcccc',
  'Reason_backup_done' => '#ccffcc',
  'Reason_backup_canceled_by_user' => '#ff9900',
  'Reason_no_ping' => '#ffff99',
  'Disabled_OnlyManualBackups' => '#d1d1d1',
  'Status_backup_in_progress' => '#66cc99',
  'Disabled_AllBackupsDisabled' => '#d1d1d1'
};
$Conf{CgiHeaders} = '<meta http-equiv="pragma" content="no-cache">';
$Conf{CgiImageDir} = '/usr/share/BackupPC/html/';
$Conf{CgiExt2ContentType} = {};
$Conf{CgiImageDirURL} = '/BackupPC/images';
$Conf{CgiCSSFile} = 'BackupPC_stnd.css';
$Conf{CgiUserConfigEditEnable} = '1';
$Conf{CgiUserConfigEdit} = {
  'EMailOutlookBackupSubj' => '1',
  'ClientCharset' => '1',
  'TarFullArgs' => '1',
  'RsyncdPasswd' => '1',
  'FtpBlockSize' => '1',
  'IncrKeepCnt' => '1',
  'PartialAgeMax' => '1',
  'FixedIPNetBiosNameCheck' => '1',
  'SmbShareUserName' => '1',
  'EMailFromUserName' => '1',
  'ArchivePreUserCmd' => '0',
  'PingCmd' => '0',
  'FullAgeMax' => '1',
  'FtpUserName' => '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',
  'FtpFollowSymlinks' => '1',
  'ArchiveComp' => '1',
  'TarIncrArgs' => '1',
  'EMailUserDestDomain' => '1',
  'TarClientPath' => '0',
  'RsyncClientCmd' => '0',
  'IncrFill' => '1',
  'RestoreInfoKeepCnt' => '1',
  'UserCmdCheckStatus' => '0',
  'RsyncdClientPort' => '1',
  'IncrAgeMax' => '1',
  'RsyncdUserName' => '1',
  'RsyncRestoreArgs' => '1',
  'ClientCharsetLegacy' => '1',
  'SmbClientFullCmd' => '0',
  'ArchiveInfoKeepCnt' => '1',
  'FtpShareName' => '1',
  'BackupZeroFilesIsFatal' => '1',
  'EMailNoBackupRecentMesg' => '1',
  'FtpPort' => '1',
  'FullKeepCnt' => '1',
  'TarShareName' => '1',
  'EMailNoBackupEverSubj' => '1',
  'TarClientRestoreCmd' => '0',
  'EMailNoBackupRecentSubj' => '1',
  'ArchivePar' => '1',
  'XferLogLevel' => '1',
  'ArchiveDest' => '1',
  'RsyncdAuthRequired' => '1',
  'ClientTimeout' => '1',
  'EMailNotifyMinDays' => '1',
  'SmbClientRestoreCmd' => '0',
  'ClientNameAlias' => '1',
  'DumpPostShareCmd' => '0',
  'IncrLevels' => '1',
  'EMailOutlookBackupMesg' => '1',
  'BlackoutBadPingLimit' => '1',
  'BackupFilesExclude' => '1',
  'FullPeriod' => '1',
  'RsyncClientRestoreCmd' => '0',
  'ArchivePostUserCmd' => '0',
  'IncrPeriod' => '1',
  'RsyncShareName' => '1',
  'FtpTimeout' => '1',
  'RestorePostUserCmd' => '0',
  'BlackoutGoodCnt' => '1',
  'ArchiveClientCmd' => '0',
  'ArchiveSplit' => '1',
  'FtpRestoreEnabled' => '1',
  'XferMethod' => '1',
  'NmbLookupCmd' => '0',
  'BackupsDisable' => '1',
  'SmbShareName' => '1',
  'FtpPasswd' => '1',
  'RestorePreUserCmd' => '0',
  'RsyncArgsExtra' => '1',
  'IncrKeepCntMin' => '1',
  'EMailNoBackupEverMesg' => '1',
  'EMailHeaders' => '1',
  'DumpPreUserCmd' => '0',
  'RsyncClientPath' => '0',
  'DumpPostUserCmd' => '0'
};

------------------------------------------------
Each of the config files in /etc/BackupPC/pc look like this:

bash-4.1$ cat mypc.pl
$Conf{XferMethod} = 'rsyncd';
$Conf{RsyncdPasswd} = ''; #Edited to remove detail
$Conf{RsyncShareName} = [
  'fileshare'
];
bash-4.1$

Regards,
Craig
------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
_______________________________________________
BackupPC-users mailing list
BackupPC-users AT lists.sourceforge DOT net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/