zlacker

[parent] [thread] 1 comments
1. p_ing+(OP)[view] [source] 2026-01-04 16:36:08
> /var for variable data. This is where you would put things like your Postgres data files.

This one never sat well with me. I think of /var as temporary data, something I can lose without much consequence. But never data files. I know it's the default, but still.

/srv I like because it seems like a proper place to separate server-related data, i.e. /srv/wwwroot or similar. But if you like /var, that of course would be the place for this type of data.

replies(1): >>holowo+T
2. holowo+T[view] [source] 2026-01-04 16:40:16
>>p_ing+(OP)
No. Temporary data is /var/tmp or /tmp. The difference: /var/tmp should survive a reboot. /tmp might be lost on reboot.

/var is data that needs to be writable (/usr/*, /bin and /lib may be readonly), and that might be important. Like databases, long-term caches, mail and printer queues, etc.

[go to top]