PostgreSQL provides pg_dump
and pg_dumpall
commands to implement logical backup.
These two commands are almost the same, guess what the names are!
Backup such as pg_dump will not cause users to block data operations.
When the database is not very large, pg_dump is not impossible!
Operation command
View a wave of commands:
Look at this command from three parts: http://postgres.cn/docs/12/app-pgdump.html
- Connection information, specify which library to connect to and which user to use~
- For more information on options, check out the official website.
- Back up the database!
Make a move.
Back up data
Back up all data in Lao Zheng's database.
Data recovery
Delete the tables and other information in the current laozheng database, and then restore the data
In addition, you can also back up through the graphical interface. Just click Backup in the library location and export a text file.