Re: excluding files w/ tar

From: Winston Smith (violinuxist_at_yahoo.co.uk)
Date: 06/02/05

  • Next message: Redefined Horizons: "Debian Sarge - What happened to tasksel?"
    Date: Thu, 02 Jun 2005 11:08:15 -0400
    To: Cameron Matheson <cmatheson3@yahoo.com>
    
    

    On Wed, Jun 01, 2005 at 11:00:18AM -0700, Cameron Matheson wrote:
    > Hi everyone,
    >
    > i'm trying to back up an old suse box so that i can
    > clear it off and install debian. anyway, i want to
    > tar up basically everything (except for the obvious
    > stuff like proc, /tmp/, /dev, etc.) so i've made an
    > excludes file:
    >
    > $ cat /tmp/excludes
    > /tmp/*
    > /dev/*
    > *oldstuff*
    > /proc
    > /var/tmp/*
    > /home/suse
    >
    > then i'm using this command to tar it up:
    > $ tar cv -X /tmp/excludes -p --atime-preserve * -- |
    > netcat 10.1.22.39 80
    >
    > but all the directories in my excludes file are still
    > being backed up! where am i going wrong?

    I think the match is done against the file as it named by tar, which,
    in the absence of this option of tar:

           -P, --absolute-names
                             don't strip leading `/'s from file names

    would be, for example, "./tmp/", not "/tmp/".

    Try putting ./tmp/* instead of /tmp/* and so on in /tmp/excludes, or, if you
    never make mistakes, use -P (dangerous when extracting).

    Winston

    -- 
    To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org 
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
    

  • Next message: Redefined Horizons: "Debian Sarge - What happened to tasksel?"

    Relevant Pages

    • excluding files w/ tar
      ... i'm trying to back up an old suse box so that i can ... clear it off and install debian. ... tar up basically everything (except for the obvious ... but all the directories in my excludes file are still ...
      (Debian-User)
    • Re: message during tar backup
      ... It means that one of the 'files' you were trying to tar was actually a pointer ... Thanks, Scott. ... I'll have to tweak my excludes file a bit ...
      (Ubuntu)
    • [SLE] Need help with new TAR behavior
      ... I just upgraded from Suse 8.1 to Suse 10. ... Under 10 tar behaves differently. ... backup using the --newer option. ... My tar command... ...
      (SuSE)
    • Re: Tar Question
      ... > Thought I'd do it from SUSE to alleviate any problems with accessing ... > locked files?? ... I copied a whole root-partiton to another ... But then you need 'l' flag, otherwise tar tries to store eg /proc in the ...
      (comp.os.linux.misc)
    • Re: apt-get debian-cd installs openoffice.org!!
      ... >> I added a new hard drive but I can't use the drive until I install debian on it. ... Use lvm, or simply tar c | tar x a whole tree, or copy around ... so you're saying I can simple copy my whole entire drive ... To UNSUBSCRIBE, email to debian-user-request@lists.debian.org ...
      (Debian-User)