Backup
A PowerShell Script named ‘backup-database.ps1’ is available in the directory {TRYANE_INSTALLATION_DIRECTORY}/install
Update the following variables at the beginning of this script:
- PG_PASSWORD: password of the PostgreSQL user
- PG_DIRECTORY: path to installation directory of PostgreSQL. By default, C:\Program Files\PostgreSQL\9.4
- PG_DIRECTORY: location where you want to register backups
Execute the PowerShell script. It will backup all databases used by Tryane Analytics.
Backup files are named: backup_<database_name>_<timestamp>.dump
Restore
If you want to restore backups for databases tryane and tryane_c_s1:
- Check that the Tryane service is stopped
- Delete the database tryane and tryane_c_s1 with PgAdmin3.
Then create these databases with the same names. - Execute the command pg_restore.exe for each database with its associated backup in PowerShell:
<PostgreSQL_installation_directory>\bin\pg_restore.exe -U tryane -W -h localhost -d <database_name> <backup_path>
Password of PostgreSQL user tryane will be requested by the program.
You can restart the Tryane service when all databases have been restored.
Comments
0 comments
Article is closed for comments.