postgresql_upgrade_majort_version

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
postgresql_upgrade_majort_version [2020/01/26 09:05] – [Out-Of-Place] andonovjpostgresql_upgrade_majort_version [2020/01/26 17:06] (current) – external edit 127.0.0.1
Line 224: Line 224:
  
  
-[[postgresql_migrate_9110| Migrate Between Major Versions]]+We have two environments: 
 + 
 +PostgreSQL 9.1 on Linux 5, which should be migrated to: 
 +PostgreSQL 10 on Linux 7 
 + 
 +To migrate from such an old version there are two options 
 + 
 + 
 +  Upgrade the current version to 10 and simply migrate the data using backup/restore 
 +  -  Backup the current version 9.1 using (pg_dumpall and pg_dump) and restore it (pg_restore) to the new version 10 
 + 
 +Since the first path will take waaay longer and since we are lazy AF, we will be using the second path 
 + 
 + 
 +=====Backup===== 
 +In order to backup the data in universal format we have to: 
 + 
 +  - Dump the globals: Roles & Tablespaces using pg_dumpall 
 +  - Dump each database (we will use the custom format "-Fc" since it is more flexible) using pg_dump -Fc 
 + 
 +So let's get going: 
 + 
 +===Dump Globals=== 
 +<sxh bash> 
 + 
 + 
 + 
 +</sxh> 
  • postgresql_upgrade_majort_version.1580029510.txt.gz
  • Last modified: 2020/01/26 17:05
  • (external edit)