Restricting tar or pax to a single file system

How does one restrict tar or fax to a single file system when tarring or paxing from root (/) ?

Thanks!

Restricting tar or pax to a single file system
 
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?

Thanks!
 
I bet you could use either:
[cmd=]tar cf tarfile.tar --one-file-system /
tar cf tarfile.tar -W one-file-system /
[/cmd]
BTW, be careful to not put the tarfile.tar on the same mountpoint as the one you are tarring up. At least with older implementations, it would try add the tarball to the tarball, and well, fun things happen in that case.
 
Back
Top