1.切换到postgres用户 : sudo su - postgres

2.psql进入postgresql命令行

3.create database createdbxxx

4. Ctrl+Z退出postgresql命令行

5. 恢复数据库: pg_restore -d xxx(上述创建的数据库) backup_filepath(备份文件路径)

 

 

参考链接:

http://www.ruanyifeng.com/blog/2013/12/getting_started_with_postgresql.html

https://codeday.me/bug/20180824/228265.html

相关文章:

  • 2021-12-03
  • 2021-11-29
  • 2021-09-12
  • 2021-12-27
  • 2021-04-17
  • 2022-12-23
  • 2021-06-29
  • 2021-09-16
猜你喜欢
  • 2021-09-06
  • 2021-07-09
  • 2021-12-04
  • 2021-06-28
  • 2021-05-28
相关资源
相似解决方案