From: Craig B. <cr...@at...> - 2002-05-18 23:46:52
|
> [backuppc@backup pc]$ cd www > [backuppc@backup www]$ ls -l > total 35449 > -rw-r----- 1 backuppc backuppc 0 May 18 22:15 backups > -rw-r----- 1 backuppc backuppc 0 May 16 22:01 backups.old > -rw-r----- 1 backuppc backuppc 1710 May 14 17:18 config.pl > -rw-r----- 1 backuppc backuppc 0 Apr 20 07:54 LOCK > -rw-r----- 1 backuppc backuppc 4456 May 18 22:15 LOG > -rw-r----- 1 backuppc backuppc 3989 Apr 30 19:00 LOG.0 > drwxr-x--- 3 backuppc backuppc 96 May 18 22:15 new > -rw-r----- 1 backuppc backuppc 25264128 May 19 07:51 NewFileList > -rw-r----- 1 backuppc backuppc 11013273 May 19 07:48 XferLOG > -rw-r----- 1 backuppc backuppc 236 Apr 20 07:54 XferLOG.bad > [backuppc@backup www]$ tail -f XferLOG.bad > Running: /usr/bin/ssh -q -n -l root www /bin/gtar -c -v -f - -C / > --atime-preserve --totals . > tarExtract: Unexpected end of tar archive (tot = 512, num = , posn = ) > tarExtract: Done: 1 errors, 0 filesExist, 0 sizeExist, 0 sizeExistComp XferLOG.bad is very old: April 20th, so this isn't relevant. > [backuppc@backup www]$ tail -f XferLOG > ./staging/htdocs/wwdir/WW476253.HTM > ./staging/htdocs/wwdir/WW476326.HTM > ./staging/htdocs/wwdir/WW476609.HTM > ./staging/htdocs/wwdir/WW476879.HTM > ./staging/htdocs/wwdir/WW476880.HTM > ./staging/htdocs/wwdir/WW476882.HTM > ./staging/htdocs/wwdir/WW477775.HTM > ./staging/htdocs/wwdir/WW477804.HTM > ./staging/htdocs/wwdir/WW478837.HTM > ./staging/htdocs/wwdir/WW478839.HTM > > Now this is interesting because this is the directory that contains 70,000 > files. It's also interesting because I asked it not to back this one up > (which I've probably done incorrectly). You've done it correctly. My code looks like it is wrong. The first line of XferLOG shows the exact tar command it runs. You can use that to see what's wrong. I'm using GNU tar's --exclude=PATTERN option to exclude the directories or files you want. Around line 77 of lib/BackupPC/Xfer/Tar.pm you'll see this: $fileList .= '--exclude=^' . $bpc->shellEscape($file); I use "^" to match the start of the string, followed by whatever you put in the config file. However, I just found out (RTFM!) that GNU tar PATTERN is sh-style, not regexp-style, so it doesn't support ^. So the workaround is to change this line of code to remove the "^": $fileList .= '--exclude=' . $bpc->shellEscape($file); You might also want to add "./" to the start of your Exclude files, eg: $Conf{BackupFilesExclude} = { '/' => ['./staging/htdocs/wwdir','./wombat/v2.1/index'] }; I need to come up with a better fix for this. Since I can't use "^" to root the pattern at the start of the string, some other directories (eg: /some/where/else./staging/htdocs/wwdir) will also get excluded too. Hmmm. Anyhow, give this a go and tell me how you get along. I'm flying to Asia tomorrow, so my email might be intermittent. Craig |