Pgsql database backup Restore record

Source: Internet
Author: User

Today, a pgsql backup restore, almost no success, used to take for granted, did not seriously think behind the things, nor the process of the doubt to record, so there is no impression, common often new, this time since the meeting on the summary.

Before the operation of the Pgsql database is mostly with the Navicat tool, but the first two with its backup to restore a library spent 1 hours not good, data transmission is always a variety of problems, later with the field of pgAdmin3 tools, backup restore a few minutes, and simple error-prone. But with pgAdmin3 always have a question, backup is the data format options are as follows: where the custom and tar format can be restored with the recovery command Pg_restore, the directory format is text, can not be directly restored with the PgAdmin3 tool, you need to use the Psql command. General normal situation with custom on the line, simple backup of a database comparison test, select Custom and directory format backup file smaller than 30 m, choose tar and unformatted backup size after 200M a little more, so generally in the default custom format back up the line. If there is an empty selection in the format, manually select the custom format, otherwise it seems that the backup is a text type and cannot be restored directly with the pgAdmin3 command.

Recovering with pgAdmin3 is also simple, as long as it is a custom or tar format that was previously backed up, create a new empty database, and then restore the backup file you selected earlier. It is best to rename the original old database to save.

Originally wanted to learn the deep-seated principle, did not find the relevant information, or first read the reference manual, and finally share a manual:

Http://pan.baidu.com/s/1mgGebEw#list/path=%2Fpgdoccn-releases

Pgsql database backup Restore record

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.