您的位置:首页 > 其它

Postgre back up and migrate database

2018-02-26 22:07 302 查看
1.Stop the new postgressql service and start old postgresql service
2.Use cmd to open the old postgresql bin directory
"D:\medavis\postgresql94\pgsql\bin> pg_dumpall -U postgres > back_file"
the back_file include all database of PG_SQL

back_file is created at directory:D:\medavis\postgresql94\pgsql\bin
3.copy "back_file" to the new database directory:"D:\medavis\medavis-postgresql-dist-1.0.0.1\pgsql\bin"
4.Stop the old postgresql service and start new postgresql service
5.Use cmd to open the new postgresql bin directory
D:\medavis\medavis-postgresql-dist-1.0.0.1\pgsql\bin>psql -U postgres < back_file
all database are migrated successfully to the new postgresql server.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: