Rotate LMDB records using rotate_lmdb.py
mainUse the rotate_lmdb.py script to perform maintenance on an LMDB database by deleting old records or clearing the database entirely.
Arguments:
<path_to_lmdb>: The file path to the LMDB database.<duration_or_all>:- A duration string (e.g.,
14dfor 14 days) to delete entries older than that period. - The literal string
allto remove all records from the database.
- A duration string (e.g.,
# Delete entries older than 14 days
python scripts/rotate_lmdb.py /path/to/lmdb 14d
# Delete all entries
python scripts/rotate_lmdb.py /path/to/lmdb all