Closes #6590: Introduce a nightly housekeeping command to clear expired sessions and change records

This commit is contained in:
jeremystretch
2021-06-11 10:44:17 -04:00
parent a1ba3b567c
commit d87ec82fe3
8 changed files with 93 additions and 12 deletions

View File

@@ -0,0 +1,10 @@
# Housekeeping
NetBox includes a `housekeeping` management command that should be run nightly. This command handles:
* Clearing expired authentication sessions from the database
* Deleting changelog records older than the configured [retention time](../configuration/optional-settings.md#changelog_retention)
This command can be invoked directly, or by using the shell script provided at `/opt/netbox/contrib/netbox-housekeeping.sh`. This script can be copied into your cron scheduler's daily jobs directory (e.g. `/etc/cron.daily`) or referenced directly within the cron configuration file.
The `housekeeping` command can also be run manually at any time: Running the command outside of scheduled execution times will not interfere with its operation.