[TUHS] Difference in purpose of /var/spool vs /var/lib
Arthur Krewat
krewat at kilonet.net
Fri Dec 15 09:38:53 AEST 2017
In my humble opinion, "spool" means files in transit. Run something
locally, it generates a file, it gets shipped somewhere (email, printer,
etc) and it's gone.
On Linux and Solaris (to a lesser extent), /var/lib seems to be
configuration files like samba's password database, and other "non
transient" files.
If you're storing files for long periods, /var/spool is not where you
want to do that. Again, IMHO.
On 12/14/2017 6:00 PM, Grant Taylor via TUHS wrote:
> Can anyone enlighten me on the effective difference in the use of
> /var/spool vs /var/lib?
>
> It's my understanding that spools are for files that are in transit.
> Effectively like packages moving through a shipping depo or people
> waiting in line. I.e. they come in, they hang around for a while, and
> then they leave.
>
> I'm of the opinion that files in /var/lib should stick around longer
> and are not nearly as dynamic (if at all, save for code updates).
>
> As sure as I type this, I can't think of a reason library files would
> go under /var vs a different */lib directory.
>
> Does it make any difference if the files are actually executed and /
> or consumed on the system?
>
> I don't consider the POP3 / IMAP / NNTP server to be processing files
> when people access messages / articles (read: files) via the
> respective protocols.
>
> Back story: I'm considering writing something that will download a
> file every day and process the last day's / week's / month's file(s)
> to generate output which is itself stored elsewhere. - I feel like
> these files should live in the /var/spool/<bla> subdirectory.
>
>
>
More information about the TUHS
mailing list