From: Leon L. <le...@le...> - 2002-06-20 16:45:58
|
Duh :) I was reading the docs before I went to sleep last night and should have checked the file before asking. Another question. Can I say $conf{BackupFilesExclude} = '~Temporary Internet Files\*.*'; Or something like that, to exclude a pathname. This is because there is always a different username in front of this folder name. eg. c:\Documents and Settings\leon\Local Settings\Temporary Internet Files . I read the docs this time and I don't see anything like this in there :) Thanks a lot, Leon -----Original Message----- From: Chris Snyder [mailto:cs...@mv...] Sent: Thursday, June 20, 2002 12:19 PM To: Craig Barratt Cc: BackupPC Users Mailing List Subject: Re: [BackupPC-users] excluding files Ahh, that explains it - I was using Tar 1.13. Here's what happens with that version: [root@cdr test]# tar -c -f - . --exclude=./proc | tar tvf - drwxr-xr-x root/root 0 2002-06-20 15:29 ./ drwxr-xr-x root/root 0 2002-06-20 15:29 proc/ -rw-r--r-- root/root 0 2002-06-20 15:29 proc/xxx drwxr-xr-x root/root 0 2002-06-20 15:29 proc2/ -rw-r--r-- root/root 0 2002-06-20 15:29 proc2/yyy drwxr-xr-x root/root 0 2002-06-20 15:29 other./ drwxr-xr-x root/root 0 2002-06-20 15:29 other./proc/ -rw-r--r-- root/root 0 2002-06-20 15:29 other./proc/zzz Under 1.13.25, it works properly, since it now is placing the ./ in front of every file. You might want to make a note of this in the docs (under system requirements, maybe?). Craig Barratt wrote: >>This is a followup to the problems I've been having when the /proc >>directory wasn't excluded, and the trouble I've been having getting it >>excluded. >> >>I finally got it to exclude the directories. Even after upgrading to >>the latest alpha (good job and thanks BTW), it still wasn't excluding my >>directories properly. I found that it was passing the options to tar >>fine, but tar wasn't excluding them. It turns out that you shouldn't >>put any path information in - by telling it to just exclude "proc" I was >>able to get it to work. The problem is, any files named proc, dev, or >>tmp will not be backed up as well. Any ideas on workarounds? Thanks. > > > Hmmm, I'd like to get to the bottom of this before I release 1.5.0. > > First off, BackupPC will run a command basically like: > > tar -c -v -f - -C / . > > so all the paths should start with "./". Therefore your exclude > file should be "./proc" or "./tmp". This will do the right thing, > since the exclude option is required to be a complete part of a path. > > To really be sure you need GNU tar version 1.13.20 or higher. It has an > option --anchored which anchors the --exclude option to the start of the > path. (See http://www.funet.fi/pub/gnu/alpha/gnu/tar to get the latest > tar-1.13.25.tar.gz.) > > Here's an example: > > mkdir test > cd test > mkdir proc proc2 other. other./proc > touch proc/xxx proc2/yyy other./proc/zzz > > With tar 1.13.19: > > tar -c -f - . --exclude=proc | tar tvf - > drwxr-xr-x craig/wheel 0 2002-06-19 22:59:51 ./ > drwxr-xr-x craig/wheel 0 2002-06-19 23:00:07 ./proc2/ > -rw-r--r-- craig/wheel 0 2002-06-19 23:01:41 ./proc2/yyy > drwxr-xr-x craig/wheel 0 2002-06-19 23:01:37 ./other./ > > Notice proc and other./proc are excluded, which is wrong. > > Next, again with tar 1.13.19: > > tar -c -f - . --exclude=./proc | tar tvf - > drwxr-xr-x craig/wheel 0 2002-06-19 22:59:51 ./ > drwxr-xr-x craig/wheel 0 2002-06-19 23:00:07 ./proc2/ > -rw-r--r-- craig/wheel 0 2002-06-19 23:01:41 ./proc2/yyy > drwxr-xr-x craig/wheel 0 2002-06-19 23:01:37 ./other./ > drwxr-xr-x craig/wheel 0 2002-06-19 23:01:41 ./other./proc/ > -rw-r--r-- craig/wheel 0 2002-06-19 23:01:41 ./other./proc/zzz > > This is the correct behavior: ./proc is excluded but ./other./proc is not. > > Finally, you can get the same result with tar 1.13.25 using --anchored: > > navajo 1690% tar -c -f - . --anchored --exclude=./proc | tar tvf - > drwxr-xr-x craig/wheel 0 2002-06-19 22:59:51 ./ > drwxr-xr-x craig/wheel 0 2002-06-19 23:00:07 ./proc2/ > -rw-r--r-- craig/wheel 0 2002-06-19 23:01:41 ./proc2/yyy > drwxr-xr-x craig/wheel 0 2002-06-19 23:01:37 ./other./ > drwxr-xr-x craig/wheel 0 2002-06-19 23:01:41 ./other./proc/ > -rw-r--r-- craig/wheel 0 2002-06-19 23:01:41 ./other./proc/zzz > > If you have tar version >= 1.3.20 then you can add --anchored to > $Conf{TarClientCmd}. > > It is possible that --anchored is not necessary and simply making sure > your excludes start with "./" is sufficient. I'd need to look at the > source for tar to be sure. > > Please tell us if "./proc" works, then I can close out this issue > for the documentation. > > Craig > > > ------------------------------------------------------- > Bringing you mounds of caffeinated joy > >>> http://thinkgeek.com/sf <<< > > _______________________________________________ > BackupPC-users mailing list > Bac...@li... > https://lists.sourceforge.net/lists/listinfo/backuppc-users ------------------------------------------------------- Bringing you mounds of caffeinated joy >>> http://thinkgeek.com/sf <<< _______________________________________________ BackupPC-users mailing list Bac...@li... https://lists.sourceforge.net/lists/listinfo/backuppc-users |