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.
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.
相关文章推荐
- How to Back Up and Restore a MySQL Database
- cold back up the database and modify the nls_character
- How to Back up and restore SharePoint 2013 using a VSS requestor
- Flask-Migrate用法(Target database is not up to date原因、No changes in schema detected原因)
- cpio - archiver to copy and back up files
- Backing Up and Restoring the Database
- Navigation with Back and Up
- Back up MySQL Databases with a Simple Bash Script
- Prepare to back up and restore a farm (Office SharePoint Server 2007)
- A small-to-medium depth FIFO with optional capability to back up and reread data
- Steps To Migrate-Move a Database From Non-ASM to ASM And Vice-Versa
- Steps To Migrate-Move a Database From Non-ASM to ASM And Vice-Versa
- New eXtremeDB Financial Edition Version 6.0 Ramps Up Database System's Speed, Scalability and Develo
- Retore database from a back up file.
- Steps To Migrate-Move a Database From Non-ASM to ASM And Vice-Versa
- [转载]Back up all of your mysql databases nightly
- Your Database is downloaded and backed up on....(腾讯云的mysql被攻击)
- Steps To Migrate-Move a Database From Non-ASM to ASM And Vice-Versa
- How to back up and restore Gmail account on Linux
- Steps To Migrate-Move a Database From Non-ASM to ASM And Vice-Versa