So to fetch data, you can use a separate FETCH statements for each cursor. Paste the command you copied from restore_with_psql.bat into the Command Prompt.Ĭhange "MyBackup_10_29_2015.backup" to the name of your backup file.If you call a procedure that returns multiple result sets in PSQL tool, pgAdmin Query tool or another function, the query returns cursor names: "C:\Program Files\Postgresql\9.6\bin\psql.exe" -d "licor_image_studio" -f "MyBackup_10_29_2015.backup" –U “postgres" This is the command in restore_with_psql.bat: Open the file C:\IsServerApp\sample backups files\restore_with_psql.bat in a text editor like Windows Notepad. In pgAdmin 4, ensure the licor_image_studio database is empty and has the owner image_studio. The following example procedure shows how restore_with_psql.bat can be used. Restore a Plain Text BackupĪ batch script restore_with_psql.bat is provided in the Image Studio 21CFR11 server installation folder to assist with restoring backups. The script will back up the database to a file named in the following format: MyBackup_.backup.Īdditional backup and restore information can be found on the PostgreSQL wiki. ![]() To backup the database, run the script by entering the following command:Īs the script runs, output from the pg_dump command will be displayed. In this folder, you will find a script called backup.bat. In the Command Prompt Window, navigate to this folder: C:\IsServerApp\sample backups files. Right click the Image Studio Service icon, and then click Stop service.Ī red bar underneath the Image Studio Service icon indicates that the Image Studio Service has stopped. If the Image Studio service is running, there will be a green bar underneath the Image Studio Service icon. On the server, open the Windows System Tray and locate the Image Studio Service icon. Stopping the Image Studio Service will cause clients to disconnect. Ensure there are no active Image Studio Client sessions and no active System Management Tool sessions active. The following example procedure shows how backup.bat can be used.įor this procedure, you will need to stop the Image Studio Service on the server. Ensure that the backup procedure you use meets your needs and complies with your organization's policies. Use or modify the script as necessary for use in your backup procedure. ![]() This script calls pg_dump.exe to create a plain text backup. Back up Database Using a Batch ScriptĪ batch script backup.bat is provided in the Image Studio 21CFR11 server installation folder to assist with automated backups. Please see the following third-party guide for more information about using the pgAdmin 4 database management system to back up and restore your database. Back up Database Using the pgAdmin 4 Interface
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |