zimbra redo log retention period

 

ChatGPT said:

In Zimbra, the redo log retention period controls how long redo logs (which record mailbox transactions for backup/replay) are kept before deletion.
Here’s how you can view and set the redo log retention period:



Perfect ๐Ÿ‘ — here’s how you can automatically delete old Zimbra redo logs after a specific number of days.


๐Ÿงฐ Example: Keep Redo Logs for 7 Days

Run these steps as the zimbra user:

su - zimbra crontab -e

Then add this line at the bottom:

# Delete redo logs older than 7 days 0 2 * * * find /opt/zimbra/redolog/archive/ -type f -name "*.log" -mtime +7 -delete

Explanation:

  • Runs every day at 2:00 AM

  • Looks in /opt/zimbra/redolog/archive/

  • Deletes files ending in .log that are older than 7 days


๐Ÿงฉ If You Want 30-Day Retention Instead

Just change +7 to +30:

0 2 * * * find /opt/zimbra/redolog/archive/ -type f -name "*.log" -mtime +30 -delete

⚠️ Notes

  • Make sure zimbraRedoLogArchiveEnabled is set to TRUE, otherwise no archived redo logs are created:

    zmprov mcf zimbraRedoLogArchiveEnabled TRUE
  • You can verify the archive path using:

    zmprov gacf | grep zimbraRedoLogArchiveDir
  • Adjust /opt/zimbra/redolog/archive/ if your installation uses a different directory.

Comments

Popular posts from this blog

how to install internet download manger in linux

ImportError: DLL load failed while importing onnx_cpp2py_export

awstats with www