Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Nov 2009 00:57:32 +0200
From:      Giorgos Keramidas <keramida@ceid.upatras.gr>
To:        jaymax <jaymax36@gmail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Restricting tar or pax to a single file system
Message-ID:  <87bpiu9nhf.fsf@kobe.laptop>
In-Reply-To: <26466083.post@talk.nabble.com> (jaymax's message of "Sun, 22 Nov 2009 08:01:07 -0800 (PST)")
References:  <26463168.post@talk.nabble.com> <20091122071719.GG89004@dan.emsphone.com> <26466083.post@talk.nabble.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 22 Nov 2009 08:01:07 -0800 (PST), jaymax <jaymax36@gmail.com> wrote:
> I think my reply went to the previous post, but here is
>
> The syntax here is confusing, should it be >
> [ignoring other options]
>
> tar -c -W one-file-system -f tarfile2Becreated.tar /
>
> {
> From the man pages
> -W longopt=value
> Long options (preceded by --) are only supported directly on systems that
> have the getopt_long(3) function.  The -W option can be used to access long
> options on systems that do not support this function.
> }
>
> Or is there another synopsis?

Yes, there are a few alternative ways to phrase the same thing. For example:

    cd /
    tar -cf /backup/tarball.tar --one-file-system .
    tar -c --one-file-system -f /backup/tarball.tar .

You can combine the options of tar in almost *any* order with a bit of
care.  For example, here's a small part of my incremental backup script:

    cd /home/keramida/.zfs/snapshot/today
    env TZ=UTC tar -c --one-file-system --newer-mtime '2009-11-20 00:00:00' \
        -f '/backup/home.keramida.2009-11-20.tar' .




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?87bpiu9nhf.fsf>