复制数据库
[postgres@localhost ~]$ psql -c"create database abc" ----创建一个空库
CREATE DATABASE
[postgres@localhost ~]$ pg_dump portal |psql abc
----以流的方式,将portal数据库中的数据复制到abc库中
[postgres@localhost ~]$ psql -c"create database abc" ----创建一个空库
CREATE DATABASE
[postgres@localhost ~]$ pg_dump portal |psql abc
----以流的方式,将portal数据库中的数据复制到abc库中