Backup and restore are most important when you are transporting a database. Today, we tested backup and restore using Pg_dumpall.
Backup Restore method: Pg_dump and Pg_restore, first carefully explain these two commands
Back up the database,
Really did not think, has been the user of PostgreSQL, suddenly need a library transplant has become the first trick! Originally it was quite different from the MySQL command line operation.Don't be afraid, but be careful, because database operation
A sample that can jump directly to the last face to view Really did not think, has been the user of PostgreSQL, suddenly need a library transplant has become the first trick! Originally it was quite different from the MySQL command line
0. Remove unnecessary tables and stored procedures from the 200 server Setup database
DROP TABLE "Sensorpressure";DROP FUNCTION hex_to_int (text);DROP FUNCTION "Pressuredatatosensorpressure" ();
1. Back up 200 of the SETUPD database,:p g_dump-d-H
first, compile and install:
Environment Preparation:
GNU make version >=3.8 (make--version)
Iso/ansi C compiler, at least compatible with C89 standard, GCC or Intel translator, etc. can be
gzip, bzip2, tar, source
Initdb will specify a PGDATA directory, which is where PostgresQL stores data, such as:/var/lib/pgsql/10/data.====== Display Data Catalog1. Enter PsqlSudo-u Postgres Psql2. Locate the Data directorypostgres=# SHOW data_directory;Data_directory-------
I. Installation ErrorQ: I have installed phpPgAdmin, but when I try to use it,I got an error saying that the php I installed does not support correct database compilation.
A: This information indicates that your PHP does not compile PostgreSQL
First, installation ErrorQ: I've installed the phppgadmin, but when I try to use it,I got a bug saying that I installed PHP without the correct compile database support.
A: This information means that your PHP did not compile the PostgreSQL support.
PostgreSQL itself provides the logical export tool Pg_dumpall and pg_dump, where pg_dumpall export all the databases, Pg_dump export a single database, the usage and parameters of two tools are no longer detailed, this article from the code level to
XV, operating system control 1. Execute any operating system commandParameters:--os-cmd and--os-shellIf the database management system is MySQL, PostgreSQL, or Microsoft SQL Server and the current user has the relevant permissions sqlmap can use SQL
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.