Rolling Back to a Previous Point-in-Time
  • 1 Minute to read
  • Dark
    Light
  • PDF

Rolling Back to a Previous Point-in-Time

  • Dark
    Light
  • PDF

Article Summary

Note

CTERA recommends reverting a database only with the help of CTERA 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.

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 "2023-11-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, restart the CTERA Portal on the secondary database server, the replicating server, by running: portal-manage.sh restart

Was this article helpful?