nohup pg_restore --host "127.0.0.1" --port "5432" --username "postgres" --no-password --dbname "{dbname}" --verbose --clean "$backuppath/{dbname}$cur_date.bak"
#指定表 pg_dump -d Auth_DCIM -U postgres -t auth_tenant -a > /home/backup2.sql
#指定库 pg_dump -d Auth_DCIM -U postgres -a > /home/backup2.sql
#设置环境变量
export PGPASSWORD="sA123456"
pg_dump -U postgres -d Auth_DCIM -v | gzip > /home/backup.gz
gunzip -c backup.gz | psql -U postgres -d TEST