Opened 12 days ago

Last modified 7 days ago

#32354 new enhancement

Support "Cache Directory Tagging Standard" (already implemented e.g. in GNU tar)

Reported by: rm Owned by:
Priority: Medium Milestone: Tor: unspecified
Component: Core Tor/Tor Version:
Severity: Normal Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

Tor seems to store sizable cached data in /var/lib/tor/diff-cache/. There is now a standard for apps to indicate that transient caches like this to be skipped from backups: https://bford.info/cachedir/spec.html

The application needs to create (and recreate) a file called "CACHEDIR.TAG" in the cache directory, with content of "Signature: 8a477f597d28d172789f06886806bc55".

Skipping cache directories marked as such via this standard is already supported for example in GNU tar:

--exclude-caches

Exclude contents of directories containing file CACHEDIR.TAG, except for the tag file itself.

--exclude-caches-all

Exclude directories containing file CACHEDIR.TAG and the file itself.

--exclude-caches-under

Exclude everything under directories containing CACHEDIR.TAG

Child Tickets

Change History (3)

comment:1 Changed 12 days ago by rm

Also perhaps move /var/lib/tor/cached-* into their own dir marked like this as well.

comment:2 Changed 12 days ago by nickm

Milestone: Tor: unspecified

Also perhaps move /var/lib/tor/cached-* into their own dir marked like this as well.

For this, see the CacheDirectory option.

comment:3 Changed 7 days ago by rm

Oh and currently it will also actively fight the user trying to manually add such file:


Nov 06 09:43:10.000 [warn] Found misformatted file "CACHEDIR.TAG" in consensus cache; removing it.

Note: See TracTickets for help on using tickets.