Re: tar exclude cache

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/21/2015 02:41 PM, Patrick Dupre wrote:
Thank you

By the way, the signature is the MD5 hash of the string
".IsCacheDirectory" and it's SPECIFICALLY looked for by tar:

[root@prophead tmp]# strings /bin/tar | grep 8a477f597d28d172789f06886806bc55
	Signature: 8a477f597d28d172789f06886806bc55

They don't mention the need for the signature in the man page, but it IS
buried in the "info" pages (under section 6.4):

<quote>
   When creating an archive, the '--exclude-caches' option family causes
'tar' to exclude all directories that contain a "cache directory tag".
A cache directory tag is a short file with the well-known name
'CACHEDIR.TAG' and having a standard header specified in
<http://www.brynosaurus.com/cachedir/spec.html>.  Various applications
write cache directory tags into directories they use to hold
regenerable, non-precious data, so that such data can be more easily
excluded from backups.

   There are three 'exclude-caches' options, each providing a different
exclusion semantics:

'--exclude-caches'
     Do not archive the contents of the directory, but archive the
     directory itself and the 'CACHEDIR.TAG' file.

'--exclude-caches-under'
     Do not archive the contents of the directory, nor the
     'CACHEDIR.TAG' file, archive only the directory itself.

'--exclude-caches-all'
     Omit directories containing 'CACHEDIR.TAG' file entirely.
</quote>

And the spec mentioned was written in...2004! Jeeze! I don't think they
could have buried this information deeper if they tried. I knew about
it, but it's pretty damned silly to not put it in the man page since not
everyone installs info and its database. And even with info, the
signature itself is NOT defined except in the webpage cited. What if
they decide to take that site offline because the author doesn't wish
to keep it up?

I'm sending a copy of this note to bug-tar@xxxxxxx. Perhaps they'll update their docs.

Sent: Monday, December 21, 2015 at 9:50 PM
From: "Doug H." <fedoraproject.org@xxxxxxxxxxx>
To: users@xxxxxxxxxxxxxxxxxxxxxxx
Subject: Re: tar exclude cache

On Mon, 2015-12-21 at 21:29 +0100, Patrick Dupre wrote:
Hello,

I am trying to exclude the .cache directories when I tar a home
directory
by using:
tar -cjf /mnt/backup/home.tbz2 --exclude-caches-all /home/pdupre
but it does not work.
What am I doing wrong ?


Do the .cache dirs each have a file called CACHEDIR.TAG with just the
below line?

Signature: 8a477f597d28d172789f06886806bc55

I don't remember learning about this tar feature but checking the man
page of tar I found the name of that tag file and a test found the file
to not be enough but a web search came up with the idea that they need
that signature and adding that line to my tag file caused my tar to act
as expected.



--
Doug H.
--
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org



--
----------------------------------------------------------------------
- Rick Stevens, Systems Engineer, AllDigital    ricks@xxxxxxxxxxxxxx -
- AIM/Skype: therps2        ICQ: 226437340           Yahoo: origrps2 -
-                                                                    -
-   You possess a mind not merely twisted, but actually sprained.    -
----------------------------------------------------------------------
--
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux