Re: [tor-relays] PSA: exclude /var/lib/tor/diff-cache/ from your backups

2017-11-14 Thread teor

> On 14 Nov 2017, at 20:37, Iain R. Learmonth  wrote:
> 
> Hi,
> 
>> On 14/11/17 05:03, Roman Mamedov wrote:
>> Dear Tor project: this is very bad style to keep that in /var/lib, content
>> with properties like this must go into /var/cache/ [1], where it would be
>> automatically excluded from backups by default policies in most backup 
>> systems.
> 
> It does seem that all paths used by tor are relative to DataDirectory,
> which has usually been /var/lib/tor. Perhaps a new configuration option
> for CacheDirectory, and moving caches to that directory, would be
> useful. It would be up to packagers to actually use that option though,
> a default of using DataDirectory as CacheDirectory would not be entirely
> unreasonable for cases where tor is embedded in other software.
> 
> This would seem worthy of a trac ticket if someone could write one up.

Done:
https://trac.torproject.org/projects/tor/ticket/24272#ticket

I'm surprised this hasn't come up before: the existing consensus and
directory documents are 10MB+, and change every hour.

I guess disks are big nowadays…

Also, your relay will survive if you set DataDirectory to /var/cache.
But it will lose its keys every time /var/cache is cleared, which some
distributions do on restart. (This means it will take some time to
attract bandwidth and flags after a restart.)

T___
tor-relays mailing list
tor-relays@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-relays


Re: [tor-relays] PSA: exclude /var/lib/tor/diff-cache/ from your backups

2017-11-14 Thread Iain R. Learmonth
Hi,

On 14/11/17 05:03, Roman Mamedov wrote:
> Dear Tor project: this is very bad style to keep that in /var/lib, content
> with properties like this must go into /var/cache/ [1], where it would be
> automatically excluded from backups by default policies in most backup 
> systems.

It does seem that all paths used by tor are relative to DataDirectory,
which has usually been /var/lib/tor. Perhaps a new configuration option
for CacheDirectory, and moving caches to that directory, would be
useful. It would be up to packagers to actually use that option though,
a default of using DataDirectory as CacheDirectory would not be entirely
unreasonable for cases where tor is embedded in other software.

This would seem worthy of a trac ticket if someone could write one up.

Thanks,
Iain.



signature.asc
Description: OpenPGP digital signature
___
tor-relays mailing list
tor-relays@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-relays


[tor-relays] PSA: exclude /var/lib/tor/diff-cache/ from your backups

2017-11-13 Thread Roman Mamedov
Hello,

Turns out that dir is highly variable, and judging from the name, also
disposable.

In my case it was responsible for about 20 GB of churn over a month, i.e. it
took 25 GB to keep incremental backups of two Tor nodes with only 2 GB each in
root FS (and I was wondering what's going on with my backup location's free
space...)

Dear Tor project: this is very bad style to keep that in /var/lib, content
with properties like this must go into /var/cache/ [1], where it would be
automatically excluded from backups by default policies in most backup systems.

[1] http://www.pathname.com/fhs/pub/fhs-2.3.html#VARCACHEAPPLICATIONCACHEDATA

-- 
With respect,
Roman
___
tor-relays mailing list
tor-relays@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-relays