Postgres is a very good open-source database. Good performance.
When it comes to databases, there's the topic of backup and import.
Backups are also broken down in a number of ways.
1. Full backup
This is the way most people use it to back up the
1. Fully Automated backupNeed to install postgres (preferably the same version) on the backup machineIn the Postgres directory to create a password to save the file (plaintext, so confidentiality is important), if not established, because each
One: Command line Backup and recovery Postgres database①: First switch to Postgres userSu Postgres
②: Backing up a database named host to a temporary file Host.dumpPg_dump-w Host >/tmp/host.dump
③: Import data from backup file infile to database
What this article contains: Use commands to manipulate import and export of Oracle, Postgres, MySQL, including logging on to dataNote: I am using the Center OS operating system in the company, so both Oracle and Postgres are used in Linux and not
PostgreSQL Learning Notes (v) Backup and recovery1. Backup tools: Pg_dump and Pg_dumpallThe pg_dump can back up a specified databasePg_dumpall can back up all database data and system global data at once2. The Pg_dump and Pg_dumpall tools do not
In Oracle, deleting a table or deleting a table record; There is a flashback feature that does not require a stop operation and can perfectly retrieve the record. There are, of course, some other recovery tools, such as ODU tools, Gdul tools. can
Seven, Pg_dump:
Pg_dump is a tool for backing up the PostgreSQL database. It can even make a full, consistent backup when the database is being used concurrently, without blocking access to the database by other users. The dump format generated by
Command operation: data export: pg_dump-Upostgres (User Name) (-t table name) Database Name (lack of time and the same user name) c: fulldb. SQL data import: psql-Upostgres (User Name) Database Name (lack of time and the same user name) C: fulldb.
To back up the database:pg_dump-h localhost-u root demo02 >/home/arno/dumps/demo02.bakTo recover a database:psql-h localhost-u root-d Demo Backup table:pg_dump-h localhost-u root demo02-t books >/home/arno/dumps/books.bakRecovery table:psql-h
PostgreSQL comes with a client pgadmin, there is a backup, recovery options, but also to restore the database (restore), but recently found that the database slowly large, often error, the backup of the file process error probability that is quite
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.