Backing up and restoring a database on PostgreSQL - 7.3

Talend Data Catalog Installation and Upgrade Guide

Version
7.3
Language
English
Operating system
Linux
Product
Talend Big Data Platform
Talend Data Fabric
Talend Data Management Platform
Talend Data Services Platform
Talend MDM Platform
Talend Real-Time Big Data Platform
Module
Talend Data Catalog
Content
Installation and Upgrade
Last publication date
2023-03-15
Back up and restore your PostgreSQL database with the Oracle Data Pump technology.
  • You have created a directory on your server machine to store all the exported files, such as dump files.
  • You have stopped Talend Data Catalog application server before performing the backup and restore tasks.

Backing up using the pg_dump command

  1. Open a command prompt window.
  2. Execute the following command to backup your PostgreSQL database into a file:
    pg_dump -b -f <backup_directory_path>\<backup_file_name> -Ft -d "<db_name>" -h <postgre_host> -w -p <postgre_port> -U <postgre_username>

Restoring using the pg_restore command

  1. Open a command prompt window.
  2. Execute the following command to restore the file into the database server:
    pg_restore -c -Ft -d "<db_name>" -h <postgre_host> -w -p <postgre_port> -U <postgre_username> -n public -n repo -n system -n util -n lineage <backup_directory_path>\<backup_file_name>

    All the database objects and data are dropped before recreating them.

  3. Restart Talend Data Catalog application server.
  4. To ensure the optimal Talend Data Catalog application server performance, go to MANAGE > Schedules to run the database maintenance script.
  5. Right-click Run Database Maintenance and click Run operation now to update the database indexes and statistics.

For more information on the pg_dump and pg_restore commands, refer to the PostgreSQL documentation.