--- title: "Rolling Back to a Previous Point-in-Time" slug: "rolling-back-to-a-previous-point-in-time-3" tags: ["8.2", "Portal"] updated: 2025-05-13T12:01:03Z published: 2025-05-13T12:01:03Z canonical: "kb.ctera.com/rolling-back-to-a-previous-point-in-time-3" --- > ## 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. # Rolling Back to a Previous Point-in-Time **Note** CTERA recommends reverting a database only with the help of [CTERA support](https://www.ctera.com/support/). After continuous archiving has been set up, you can roll back to an older version of the portal database. **Note** If the database has become corrupted and it is not just the data that you want to roll back, you need to [revert the primary database to a snapshot](/v1/docs/reverting-the-primary-database-to-a-snapshot-5). **To roll back PostgreSQL continuous archiving to a previous point in time:** 1. Using SSH, log in as `root` to the CTERA Portal primary database server. 2. In the command line, enter the following command to view the oldest time possible to roll back to: `portal.sh db-rollback -p` 3. Enter the following command to roll back to a point in time within the available backup range: `portal.sh db-rollback -r "point-in-time"` Where *point-in-time* is the desired point in time, in the format YYYY-MM-DD hh:mm:ss. For example: `portal.sh db-rollback -r "2025-05-06 00:23:21"` **Note** If the CTERA Messaging service was setup after the rolled back point-in-time, the messaging service status will be gray, as if messaging is not configured, and all existing messaging data will be lost. 4. When rolling back a primary database server, from which a replication server is streaming, described in [Using PostgreSQL Streaming Replication](/v1/docs/using-postgresql-streaming-replication-3), restart the CTERA Portal on the secondary database server, the replicating server, by running: `portal-manage.sh restart`