Xopero allows to create a PostgreSQL backup without additional components installed. To configure a valid backup set, you need rights to database server.
Supported versions from 9.0 and above.
Creating backup set
In order to create the PostgreSQL database backup set you need to open Xopero and run the Backup set wizard by clicking on New backup set button in My backup sets tab.
In the Backup set wizard mark Advanced copy and select PostgreSQL from dropdown list. Don’t forget to define the backup set name.
In the PostgreSQL panel you need to define parameters that are necessary to connect with the database server:
- Address - IP address of the PostgreSQL database server,
- Port - port, on which the database server is listening,
- User - PostgreSQL database username,
- Password - password for user above.
If parameters above are valid, Xopero will connect with the database and list of available databases will be displayed in the Database filed. After you choose a database, you can also select schema that will be backed up in the Schema field. If you don’t choose one, all the databases schemas will be backed up.
When you fill all the required fields, click Test connection to verify connection with the database.
|In order to set additional parameters for database connection (like timeout), you should click Advanced, what will result in creating Connection String, where required parameters can be entered.|
|If you choose to edit Connection String, you have to replace *** next to the Password parameter.|
Before you finish, define Temporary directory, which is a folder, where database dump will be made to. Click Save to create new backup set.
Restore of the database
The Restore process of PostgreSQL database is a two-step process. First, you need to download the database backup to a local machine using Xopero application. In the second step, the PostgreSQL database will be restored to a PostgreSQL server using pgAdmin or psql.
Restoring the database file from a backup
In order to download the PostgreSQL database backup run the Xopero application and go to the Restoring tab. All backed up databases will be available in the PostgreSQL branch.
Expand the branch and mark the checkbox next to the database which has to be restored. Then click on the Restore selected button.
|In order to restore previous version of the database right click on its name and from context menu select Show file versions.|
The file restore settings window will be displayed where you have to select the location where the database backup file will be saved. From this directory it will be also restored to the PostgreSQL database server.
Database restore using pgAdmin
In order to restore previously downloaded database backup, you have to start pgAdmin tool and connect with the database server.
|The pgAdmin tool is available to download from: http://www.pgadmin.org/download/|
When the connection is established, expand the Databases branch, right-click on the database, where the backup should be restored and click Restore….
In new window, enter path to previously restored database file in the Filename filed and click Restore.
Database restore using command prompt
In order to restore PostgreSQL database to destination server from previously restored file, open command prompt. Then go to psql location and enter: psql –f „path to a file” database name user, where:
- Path to a file – is a path of database file restored using Xopero application,
- Database name – name of the database, where the backup will be restored,
- User - PostgreSQL user.
The psql tool will ask for PostgreSQL user's password. If a valid password is entered, the restore process will be launched.
|psql tool is part of the PostgreSQL server and pgAdmin.|