在Ubuntu下恢复PostgreSQL数据,可使用以下方法:
sudo apt-get install pgadmin4
。sudo apt-get install postgresql-client
。pg_restore
命令,如pg_restore -U <用户名> -h <主机名> -p <端口号> -d <目标数据库名> -F c <备份文件路径>
。psql
命令,如psql -U <用户名> -h <主机名> -p <端口号> -d <目标数据库名> -f <备份文件路径>
。