Source:PostgreSQL Restore/de: Difference between revisions

From SEPsesam
(Created page with "SEP sesam Videos und Aufzeichnungen anschauen.")
(Created page with "Unter FAQ finden Sie Antworten auf die häufigsten Fragen.")
Line 20: Line 20:
| rowspan="2" style="padding:0px 10px 0px;" | [[File:SEP Tip.png|45px|link=Special:MyLanguage/FAQ|FAQ]]
| rowspan="2" style="padding:0px 10px 0px;" | [[File:SEP Tip.png|45px|link=Special:MyLanguage/FAQ|FAQ]]
| style="padding:0px 40px 0px 10px; color: grey; font-size: 90%; text-align:left;" |
| style="padding:0px 40px 0px 10px; color: grey; font-size: 90%; text-align:left;" |
Check [[Special:MyLanguage/FAQ|FAQ]] to find the answers to most common questions.
Unter [[Special:MyLanguage/FAQ|FAQ]] finden Sie Antworten auf die häufigsten Fragen.
|}
|}



Revision as of 15:24, 25 February 2020

Other languages:
Copyright © SEP AG 1999-2024. Alle Rechte vorbehalten.

Jede Form der Reproduktion der Inhalte dieses Benutzerhandbuches, ganz oder in Teilen, ist nur mit der ausdrücklichen schriftlichen Erlaubnis der SEP AG gestattet. Bei der Erstellung dieses Benutzerhandbuches wurde mit größtmöglicher Sorgfalt gearbeitet, um korrekte und fehlerfreie Informationen bereit stellen zu können. Trotzdem kann die SEP AG keine Gewähr für die Richtigkeit der Inhalte dieses Benutzerhandbuches übernehmen.

Docs latest icon.png Willkommen in der aktuellsten Version der SEP sesam Dokumentation 4.4.3/4.4.3 Beefalo V2. Frühere Versionen der Dokumentation finden Sie hier: PostgreSQL Archiv.


Übersicht

The restore of PostgreSQL database(s) is quite similar to a regular file system restore. It is possible to restore the PostgreSQL databases to the original or to a new location. Restore is triggered from the Menu bar -> Activities -> Restore. Restore wizard guides you through the process of restoring your data. For step-by-step procedure, see Standard Restore Procedure.

Restoring PostgreSQL

Create a new restore task for the PostgreSQL saveset you want to restore.

  1. From the SEP sesam GUI menu bar, select Activities -> Restore. The New Restore Task window opens.
  2. Select what you want to restore. You can search savesets by task name or by filename or path.
  3. Under the Saved in period drop-down lists, specify the time frame for which you want to conduct the search. Click Next.
  4. The search results are displayed. From the list of savesets matching your query, select the version you want to restore. Click Next.
  5. PostgreSQL restore select task Beefalo V2.jpg
  6. Under the Target Settings, set additional options.
    • Under the Target path settings, select one of the following options:
      • Restore to original target path (set by default): Restores the data to the same location from which it was backed up. If it is set together with the option Overwrite existing items the target database will be deleted first and a new one will be created from the backup saveset.
      • If you select the option New restore target and enter a new database name, the PostgreSQL command createdb creates a database with the specified name. The data is imported into the new database.
      • Information sign.png Anmerkung
        You have to set up database users and roles before the database is imported to new target.
    • Under the Execution options drop-down list, select one of the following options:
      • Do not overwrite existing items (set by default): The database will not be restored if it already exists on the target server.
      • Overwrite existing items: If the database exists on the target server, it will be replaced by the restored version.
      • Auto recover (and online) after restore: The data will be stored directly into the database without caching in the file system. Because the data is written directly into the database, it is not possible to modify it.
      • No recover after restore: Use this option if you want to modify the data before you import it into the database. The restored data will be stored on the file system first. The import of data has to be started on the command line interface of the server's operating system. The data will be written as a dump file onto the file system (usually in the directory <SESAM_VAR>/work). You can use this file as input file for the PostgreSQL program pg_restore as follows:
      • su - postgres pg_restore template1 -C /var/opt/sesam/var/work/pgsql-SF20081128224529.tmp
    • Click the Expert Options button if you want to specify additional restore settings, e.g., modify the log level, define the pre/post script for restore, etc. For details, see the Restore wizard.
    • Information sign.png Anmerkung
      As of v. 4.4.3. Beefalo, the Expert Options button for specifying more advanced restore options is only available in the Advanced and Expert UI mode. It is not available for users that run the GUI in Basic mode. In the latter case, if you want to access the the Expert Options you first have to change the Basic UI mode to Advanced or Expert, as described in UI Mode.

    PostgreSQL restore target Beefalo V2.jpg

  7. In the final step of the restore wizard, you can review all the settings of your restore task. You can also edit the settings by using Change Selection button. If you want to start your restore immediately, click Start. If you want to save the restore task, click Save.

A restore task can be scheduled like any other task. If you want to add a restore task to the schedule, see Scheduling Restore.

You can view the status of your restore jobs by selecting Job state -> Restores from the Main Selection. Restore overview provides detailed information on the last run of restore jobs, including the task name, status (successful, error, in queue ...), start and stop time of the last backup, data size, throughput, client and message.

As of 4.4.3 Beefalo V2, you can also monitor the restores online by using new Web UI. For details, see SEP sesam Web UI.

Restoring a single database (DB)

To be able to restore a single DB from a PostgreSQL server, you have to create a separate backup task for each PostgreSQL DB. If the PostgreSQL source in the backup task is set as all, you cannot restore an individual database. For details, see PostgreSQL Backup.

Information sign.png Anmerkung
In case of errors during the restore (e.g., primary key error), the restore status in the SEP sesam GUI/Web UI is displayed as erroneous. In such case, check the restore protocol and the data in the database.

Known issues

If you have problems with PostgreSQL, check the Troubleshooting Guide.