Logical logs in Neo4j are the journal of which operations happens and are the source of truth in scenarios where the database needs to be recovered after a crash or similar. Logs are rotated every now and then (defaults to when they surpass 25 Mb in size) and the amount of legacy logs to keep can be configured. Purpose of keeping a history of logical logs include being able to serve incremental backups as well as keeping an HA cluster running. Regardless of configuration at least the latest non-empty logical log be kept.
For any given configuration at least the latest non-empty logical log will be kept, but configuration can be supplied to control how much more to keep. There are several different means of controlling it and the format in which configuration is supplied is:
keep_logical_logs=<true/false> keep_logical_logs=<amount> <type>
For example:
# Will keep logical logs indefinitely keep_logical_logs=true # Will keep only the most recent non-empty log keep_logical_logs=false # Will keep logical logs which contains any transaction committed within 30 days keep_logical_logs=30 days # Will keep logical logs which contains any of the most recent 500 000 transactions keep_logical_logs=500k txs
Full list:
Type | Description | Example |
---|---|---|
files |
| "10 files" |
size |
| "300M size" or "1G size" |
txs |
| "250k txs" or "5M txs" |
hours |
| "10 hours" |
days |
| "50 days" |
Copyright © 2012 Neo Technology