Shouldn't GNU tar be ignoring /proc with --one-file-system?
bonomi at mail.r-bonomi.com
Fri Nov 18 17:26:06 UTC 2011
> From owner-freebsd-questions at freebsd.org Fri Nov 18 09:36:09 2011
> From: Kirk Strauser <kirk at strauser.com>
> Date: Fri, 18 Nov 2011 09:34:18 -0600
> To: FreeBSD Questions ML <freebsd-questions at freebsd.org>
> Subject: Shouldn't GNU tar be ignoring /proc with --one-file-system?
> I use Amanda to make nightly backups of a bunch of servers using GNU tar. Howe
> ver, gtar doesn't seem to respect its --one-file-system flag with /proc. Amand
> a runs a variation of this command:
Don't blame the software.
It is just doing *exactly* what you told it to. :)
> # /usr/local/bin/gtar --create --file - --directory / --one-file-system --sparse --ignore-failed-read --totals . > /dev/null
> /usr/local/bin/gtar: ./proc: file changed as we read it
> Before I file a bug report, can anyone think of a legitimate reason why gtar would be touching /proc at all?
Yup. You (or more properly, Amanda) _told_ it to.
See the output of 'mount(8)' for the names of all the mounted filesystems on
*NOTE*WELL* that '/proc' is *not* a separate filesystem. It is merely a
_directory_ with a bunch of 'special' files in it.
The 'error message' is accurate -- but it is _just_ a 'warning', and -- in *this*
circumstance -- _totally_ innocuous.
If you want to suppress generation of that error, simply add an '--exclude' for
/proc to the Amanda run.
More information about the freebsd-questions