On 7/7/05, Drew Tomlinson <drew at mykitchentable.net> wrote:
> I'm trying to copy an entire file system while using an exclude file to
> avoid copying things such as /dev, /proc, etc. I've read the man page
> and found the -X or --exclude-from tar option. I've create a file
> called /exclude.list. It contains lines such as:
>> /exclude.list
> /dev
> /proc
>> But I can't figure out how to form the correct command line. I
> basically want to do this:
>> tar -cvf - --exclude-from /exclude.list -C / . | tar xpf - -C .
>> I've search the web and found examples that look similar to the above
> but this does not work for me. tar attempts to copy /dev and I get all
> the associated errors. I've tried other placements of either "-X", "X",
> and "--exclude from" on the command line various things happen from it
> just being ignored to tar thinking I want to create and archive named
> "-X", etc., to tar trying to add a file named "-X", etc. to the current
> archive. I'm at a loss.
>> I'm using 4.11 and trying to make a good backup before upgrading to
> 5.4. Can anyone tell me the secret incantation to make this work?
>> Thanks,
>> Drew
>> --
> Visit The Alchemist's Warehouse
> Magic Tricks, DVDs, Videos, Books, & More!
>>http://www.alchemistswarehouse.com>> _______________________________________________
>freebsd-questions at freebsd.org mailing list
>http://lists.freebsd.org/mailman/listinfo/freebsd-questions> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"
>
I wrote this years ago,
http://www.justlinux.com/forum/showpost.php?p=294384&postcount=1