--- title: "Change the Maximum Number of Days Backups are Retained" slug: "how-to-14" updated: 2026-06-17T13:31:53Z published: 2026-06-17T13:31:53Z canonical: "kb.ctera.com/how-to-14" --- > ## Documentation Index > Fetch the complete documentation index at: https://kb.ctera.com/llms.txt > Use this file to discover all available pages before exploring further. # Change the Maximum Number of Days Backups are Retained When initially configuring PostreSQL continuous archiving, the maximum number of days to keep the backups was set using `portal.sh configure-db-recovery <backup-history-days>`, where *backup-history-days* is the number of days you want to retain a base backup archive before a new one is created. You can change this setting at a later date. ## Step-by-step guide **To change the maximum number of days to keep the backups:** 1. Log in to the CTERA Portal as root, using SSH. 2. Run the following command: `portal.sh set_archive_history_days <history-days>`, where history-days is the PostgreSQL archive history days. CTERA recommends that the minimum retention period is not less than 7 days. If you set the retention period to less than 7 days, you must also have a secondary backup method in order to protect the portal from disasters.