以下是Linux下使用PgAdmin备份数据库的步骤:
.backup文件,可恢复到特定时间点。.sql文件,适合跨版本迁移。pg_dump -h localhost -U postgres -Fc 数据库名 > 备份文件路径.backup
(例:pg_dump -h localhost -U postgres -Fc mydb > /backup/mydb.backup)pg_dump -h localhost -U postgres -s 数据库名 > 备份文件路径.sql
(例:pg_dump -h localhost -U postgres -s mydb > /backup/mydb.sql)psql命令恢复:psql -U 用户名 -d 数据库名 < 备份文件.sql。参考来源: