You are here

Restoring a Database from a Backup

Subscribe to Syndicate

Clients often ask how to set up a training or demo database. Instructions for doing so follow.

  • Please note that these instructions are written and intended for experienced/technical users only.
  • It would be easy for an inexperienced user to accidentally delete the live database while attempting this process.
  • Please do not attempt if you are uncertain about any of the instructions below.
  1. Open pgAdmin and select/log in to the PostgreSQL Server.

    do this directly on the server machine to bypass having to enter a password. When the password prompt comes up, just click "OK" to log in.

  2. Highlight Databases and Edit >> New Object >> New Database.

  3. In Properties, set the Name to something descriptive of what kind of database this will be.

    In the above example - Training

  4. Set the Owner to TheatreManager.
  5. ***Version 8 ONLY**Select SQL_ASCII as the Encoding format.

    ***Version 9 ONLY**Select UTF8 as the Encoding format.

  6. ***Version 8 ONLY**Set the Template to Template0.

    ***Version 9 ONLY**Skip selecting this field.

  7. Click OK to create the database.

    You can use a backup of an existing database to populate the training database for staff use. Look in:

    • Mac: /Users/Shared/Backups
    • PC: C:/Box Office/Backups

    Then you can restore a backup to the new database you just created in pgAdmin:

  8. Highlight the new database.

    TrainingDatabase in the example.

  9. Select Tools >> Restore.
  10. Choose the backup to use and click OK.

    The Restore Database window opens.

    This process can take anywhere from a few minutes to a few hours to complete. Theis depends on the size of the database and speed of the server. Let it run without interruption.

    When the database is finished loading the window will have a line that reads

    "Process returned exit code 0" or "Process returned exit code 1".

  11. Either return exit code (0 or 1) is acceptable.

    Users can now log in to Theatre Manager and click Change Data File on the login window to access the new database from the database drop-down menu.