The Lire Archive and Temporary Files
Prev | Chapter 19. Configuration Parameters | Next

## The Lire Archive and Temporary Files

By default, files in intermediate formats are stored in the directory specified in the `TMPDIR` configurable variable, and removed after processing. If you set the `LR_KEEP` configurable variable, those files won't be removed.

There is no rotate-like mechanism yet. If your `LR_KEEP` is set to 1, you'll have to clean up `TMPDIR` manually once in a while.

### Note

You could create a crontab entry like this :

    0 3 * * 0 find $HOME/tmp -type f -ctime +14 | xargs rm

to clean up the all files older than two weeks. Run such an entry as a trusted user only.

Files which could be reused later (e.g. reports which could be merged, see also the section called “Merging Reports”) can be stored in an archive. If you like to build such an archive, set `LR_ARCHIVE`: `LR_ARCHIVE` indicates whether files should get archived. If set, files which are candidates for archiving are moved from `TMPDIR` to the archive. I.e.:

Table 19.1. To keep or to archive?

file is candidate for archive | variable LR_KEEP is | variable LR_ARCHIVE is | file is kept in
--- | --- | --- | ---
yes | set | set | archive
yes | set | unset | TMPDIR
yes | unset | set | archive
yes | unset | unset | /dev/null
no | set | set | TMPDIR
no | set | unset | TMPDIR
no | unset | set | /dev/null
no | unset | unset | /dev/null

When LR_ARCHIVE is set, a Lire database gets built in `$LR_ARCHIVEDIR/meta/index` (LR_ARCHIVEDIR is `/usr/local/var/lib/lire/data` per default). This database is used to keep meta-information on the archived files.

Prev | Up | Next
Miscellaneous Configuration Parameters | Home | Chapter 20. Lire Logging and Error Messages