PostgreSQL 备份恢复权限设置

安装dos2unix转化格式
me@me:/opt/HighGo/Develop/bin$ ./createopenssl.sh highgo
bash: ./createopenssl.sh: /bin/bash^M: 解释器错误: 没有那个文件或目录
me@me:/opt/HighGo/Develop/bin$ dos2unix createopenssl.sh 
dos2unix: 正在转换文件 createopenssl.sh 为Unix格式...
执行脚本文件createopenssl.sh
me@me:/opt/HighGo/Develop/bin$ ./createopenssl.sh highgo
Generating a 2048 bit RSA private key
.......................................+++
.........+++
writing new private key to 'privkey.pem'
-----
writing RSA key
me@me:/opt/HighGo/Develop/bin$ 
以me用户进行备份.
me@me:/opt/HighGo/Develop/bin$ ./pg_dump.bin -F p highgo > hehe.sql

me@me:/opt/HighGo/Develop/bin$ ./pg_dump.bin -U me highgo > hehe1.sql

me@me:/opt/HighGo/Develop/bin$ ls -al hehe*
-rw-r--r-- 1 me me 604 2月  28 16:36 hehe1.sql
-rw-r--r-- 1 me me 604 2月  28 16:33 hehe.sql
me@me:/opt/HighGo/Develop/bin$ ./pg_dump me > hehe2.sql
口令: No recipient(s) certificate(s) specified
smime: Use -help for summary.


pg_dump.bin: [归档 (db)] 与数据库 "me" 联接失败: fe_sendauth: no password supplied
me@me:/opt/HighGo/Develop/bin$ ./pg_dump me > hehe2.sql
No recipient(s) certificate(s) specified
smime: Use -help for summary.
口令: 
me@me:/opt/HighGo/Develop/bin$ ls -al hehe*
-rw-r--r-- 1 me me 604 2月  28 16:36 hehe1.sql
-rw-r--r-- 1 me me   0 2月  28 16:46 hehe2.sql
-rw-r--r-- 1 me me 604 2月  28 16:33 hehe.sql

你可能感兴趣的:(postgresql,pg_dump,备份,postgresql)