PageSourceSearch

https://www.civo.com/docs/assets/js/a6364037.2f2b3ab4.js

js civo.com collected 2026-09-24 18:19:02 UTC 13,092 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkcivo_documentation=self.webpackChunkcivo_documentation||[]).push([[6075],{8453:(e,s,t)=>{t.d(s,{R:()=>o,x:()=>d});var n=t(6540);const r={},i=n.createContext(r);function o(e){const s=n.useContext(i);return n.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function d(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),n.createElement(i.Provider,{value:s},e.children)}},8670:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>l,contentTitle:()=>d,default:()=>h,frontMatter:()=>o,metadata:()=>n,toc:()=>a});const n=JSON.parse('{"id":"database/postgresql/migrate-from-14-to-17","title":"Migrating Your Database from PostgreSQL\u202f14 to PostgreSQL\u202f17","description":"Learn how to safely migrate your Civo managed PostgreSQL 14 database to PostgreSQL\u202f17 with step\u2011by\u2011step instructions, prerequisites, and troubleshooting tips.","source":"@site/content/docs/database/postgresql/migrate-from-14-to-17.md","sourceDirName":"database/postgresql","slug":"/database/postgresql/migrate-from-14-to-17","permalink":"/docs/database/postgresql/migrate-from-14-to-17","draft":false,"unlisted":false,"tags":[],"version":"current","lastUpdatedAt":null,"frontMatter":{"title":"Migrating Your Database from PostgreSQL\u202f14 to PostgreSQL\u202f17","description":"Learn how to safely migrate your Civo managed PostgreSQL 14 database to PostgreSQL\u202f17 with step\u2011by\u2011step instructions, prerequisites, and troubleshooting tips."},"sidebar":"mainSidebar","previous":{"title":"Connecting to your Civo PostgreSQL Database","permalink":"/docs/database/postgresql/connect"},"next":{"title":"PostgreSQL Database Migration to Civo","permalink":"/docs/database/postgresql/migrate"}}');var r=t(4848),i=t(8453);const o={title:"Migrating Your Database from PostgreSQL\u202f14 to PostgreSQL\u202f17",description:"Learn how to safely migrate your Civo managed PostgreSQL 14 database to PostgreSQL\u202f17 with step\u2011by\u2011step instructions, prerequisites, and troubleshooting tips."},d="Migrating Your Database from PostgreSQL\u202f14 to PostgreSQL\u202f17",l={},a=[{value:"Why upgrade to PostgreSQL\u202f17?",id:"why-upgrade-to-postgresql17",level:2},{value:"Prerequisites",id:"prerequisites",level:2},{value:"Migration Steps",id:"migration-steps",level:2},{value:"Step 1: Retrieve connection info for the PostgreSQL\u202f14 DB",id:"step-1-retrieve-connection-info-for-the-postgresql14-db",level:3},{value:"Step 2: Create a dump file",id:"step-2-create-a-dump-file",level:3},{value:"Step 3: Verify the dump",id:"step-3-verify-the-dump",level:3},{value:"Step 4: Provision a PostgreSQL\u202f17 instance",id:"step-4-provision-a-postgresql17-instance",level:3},{value:"Step 5:  Restore the dump into PostgreSQL\u202f17",id:"step-5--restore-the-dump-into-postgresql17",level:3},{value:"Step 6:  Update your application",id:"step-6--update-your-application",level:3},{value:"Troubleshooting",id:"troubleshooting",level:2},{value:"Need Help?",id:"need-help",level:2}];function c(e){const s={a:"a",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,i.R)(),...e.components},{Head:t}=s;return t||function(e,s){throw new Error("Expected "+(s?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Head",!0),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t,{children:(0,r.jsx)("title",{children:"Migrating Your Database from PostgreSQL\u202f14 to PostgreSQL\u202f17 | Civo Documentation"})}),"\n",(0,r.jsx)(s.header,{children:(0,r.jsx)(s.h1,{id:"migrating-your-database-from-postgresql14-to-postgresql17",children:"Migrating Your Database from PostgreSQL\u202f14 to PostgreSQL\u202f17"})}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"PostgreSQL\u202f14 reaches end\u2011of\u2011life on\u202f12\u202fNov\u202f2026."})}),"\n",(0,r.jsx)(s.p,{children:"Plan your move to PostgreSQL\u202f17 now. This guide shows how to migrate a Civo managed database safely and efficie
1ntly."}),"\n",(0,r.jsx)(s.h2,{id:"why-upgrade-to-postgresql17",children:"Why upgrade to PostgreSQL\u202f17?"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"Stronger security"})," \u2013 new authentication and encryption options."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"Better performance"})," \u2013 faster query planning and execution."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"New features"})," \u2013 logical replication improvements, JSON handling, etc."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"Longer support window"})," \u2013 ensures stability for the coming years."]}),"\n"]}),"\n",(0,r.jsx)(s.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,r.jsxs)(s.table,{children:[(0,r.jsx)(s.thead,{children:(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.th,{children:"Requirement"}),(0,r.jsx)(s.th,{children:"Details"})]})}),(0,r.jsxs)(s.tbody,{children:[(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:"Civo Dashboard access"}),(0,r.jsx)(s.td,{children:"You need to view connection info and create a new database."})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:"PostgreSQL client tools"}),(0,r.jsxs)(s.td,{children:[(0,r.jsx)(s.code,{children:"pg_dump"})," and ",(0,r.jsx)(s.code,{children:"psql"})," installed locally."]})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:"Disk space"}),(0,r.jsx)(s.td,{children:"Enough room for the dump file (usually a few GB)."})]})]})]}),"\n",(0,r.jsx)(s.h2,{id:"migration-steps",children:"Migration Steps"}),"\n",(0,r.jsx)(s.h3,{id:"step-1-retrieve-connection-info-for-the-postgresql14-db",children:"Step 1: Retrieve connection info for the PostgreSQL\u202f14 DB"}),"\n",(0,r.jsxs)(s.ol,{children:["\n",(0,r.jsxs)(s.li,{children:["Log in to the ",(0,r.jsx)(s.strong,{children:"Civo Dashboard"}),"."]}),"\n",(0,r.jsx)(s.li,{children:"Open your PostgreSQL\u202f14 instance."}),"\n",(0,r.jsxs)(s.li,{children:["Note the ",(0,r.jsx)(s.strong,{children:"host (IP)"}),", ",(0,r.jsx)(s.strong,{children:"port"}),", ",(0,r.jsx)(s.strong,{children:"database name"}),", ",(0,r.jsx)(s.strong,{children:"username"})," (default ",(0,r.jsx)(s.code,{children:"civo"}),"), and ",(0,r.jsx)(s.strong,{children:"password"}),"."]}),"\n"]}),"\n",(0,r.jsx)(s.h3,{id:"step-2-create-a-dump-file",children:"Step 2: Create a dump file"}),"\n",(0,r.jsx)(s.p,{children:"To execute the dump execute the following command over your database"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-bash",children:"pg_dump -h <IP_ADDRESS> -p 5432 -U civo --no-owner --schema public postgres > backup_civo_database.sql\n"})}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.em,{children:"What each flag does"})}),"\n",(0,r.jsxs)(s.table,{children:[(0,r.jsx)(s.thead,{children:(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.th,{children:"Flag"}),(0,r.jsx)(s.th,{children:"Purpose"})]})}),(0,r.jsxs)(s.tbody,{children:[(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"-h <IP_ADDRESS>"})}),(0,r.jsx)(s.td,{children:"Target server"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"-p 5432"})}),(0,r.jsx)(s.td,{children:"Port"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"-U civo"})}),(0,r.jsx)(s.td,{children:"User"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"--no-owner"})}),(0,r.jsx)(s.td,{children:"Omit ownership data (helps when moving between servers)"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"--schema public"})}),(0,r.jsxs)(s.td,{children:["Dump only the ",(0,r.jsx)(s.code,{children:"public"})," schema"]})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"> backup_civo_database.sql"})}),(0,r.jsx)(s.td,{children:"Write output to a file"})]})]})]}),"\n",(0,r.jsx)(s.p,{children:"Enter the password when prompted."}),"\n",(0,r.jsx)(s.h3,{id:"step-3-verify-the-dump",children:"Step 3: Verify the dump"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-bash",children:"ls -lh backup_civo_database.sql\n"})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:"File should exist in the current directory."}),"\n",(0,r.jsx)(s.li,{children:"Size should be non\u2011zero."}),"\n",(0,r.jsxs)(s.li,{children:["Optional: ",(0,r.jsx)(s.code,{children:"head backup_civo_database.sql"})," to glance at the content."]}),"\n"]}),"\n",(0,r.jsx)(s.h3,{id:"step-4-provision-a-postgresql17-instance",children:"Step 4: Provision a PostgreSQL\u202f17 instance"}),"\n",(0,r.jsxs)(s.ol,{children:["\n",(0,r.jsxs)(s.li,{children:["In the dashboard, go to ",(0,r.jsx)(s.strong,{children:"Create Database"}),"."]}),"\n",(0,r.jsxs)(s.li,{children:["Choose ",(0,r.jsx)(s.strong,{children:"PostgreSQL\u202f17"}),"."]}),"\n",(0,r.jsx)(s.li,{children:"Set name, size, region, etc."}),"\n",(0,r.jsxs)(s.li,{children:["Click ",(0,r.jsx)(s.strong,{children:"Create"})," and wait for provisioning to finish."]}),"\n"]}),"\n",(0,r.jsx)(s.h3,{id:"step-5--restore-the-dump-into-postgresql17",children:"Step 5:  Restore the dump into PostgreSQL\u202f17"}),"\n",(0,r.jsxs)(s.ol,{children:["\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsxs)(s.p,{children:["Grab the new instance\u2019s connection string (e.g., ",(0,r.jsx)(s.code,{children:"postgresql://civo@<NEW_IP>:5432/postgres?sslmode=require"}),")."]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsx)(s.p,{children:"Test connectivity:"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-bash",children:'psql "postgresql://civo@<NEW_IP>:5432/postgres?sslmode=require"\n'})}),"\n",(0,r.jsx)(s.p,{children:"Enter the password when asked. If the connection is up you can close the connection (type exit in the postgres connection cli)."}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsx)(s.p,{children:"Run the restore:"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-bash",children:"psql postgresql://civo@<IP_ADDRESS>:5432/postgres?sslmode=require < backup_civo_only.sql\n"})}),"\n",(0,r.jsx)(s.p,{children:"Enter the password when asked."}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["\n",(0,r.jsx)(s.p,{children:"Confirm tables are present:"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-bash",children:'psql "postgresql://civo@<NEW_IP>:5432/postgres?sslmode=require" -c "\\dt"\n'})}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(s.h3,{id:"step-6--update-your-application",children:"Step 6:  Update your application"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:"Change the DB connection string to point to the new PostgreSQL\u202f17 host."}),"\n",(0,r.jsx)(s.li,{children:"Run tests in a staging environment."}),"\n",(0,r.jsx)(s.li,{children:"Deploy the updated config to production."}),"\n",(0,r.jsx)(s.li,{children:"Keep an eye on logs for any anomalies."}),"\n"]}),"\n",(0,r.jsx)(s.h2,{id:"troubleshooting",children:"Troubleshooting"}),"\n",(0,r.jsxs)(s.table,{children:[(0,r.jsx)(s.thead,{children:(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.th,{children:"Symptom"}),(0,r.jsx)(s.th,{children:"Possible cause"}),(0,r.jsx)(s.th,{children:"Fix"})]})}),(0,r.jsxs)(s.tbody,{children:[(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"Connection refused"})}),(0,r.jsx)(s.td,{children:"Wrong IP/port or firewall"}),(0,r.jsx)(s.td,{children:"Verify settings in the dashboard."})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"Password authentication failed"})}),(0,r.jsx)(s.td,{children:"Incorrect password"}),(0,r.jsx)(s.td,{children:"Re\u2011copy the password from the dashboard."})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:"Restore errors (e.g., permission denied)"}),(0,r.jsx)(s.td,{children:"Dump includes objects you can\u2019t create"}),(0,r.jsx)(s.td,{children:"Review the error, adjust dump flags, or grant needed rights."})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:"Missing data after restore"}),(0,r.jsx)(s.td,{children:"Incomplete dump"}),(0,r.jsxs)(s.td,{children:["Re\u2011run ",(0,r.jsx)(s.code,{children:"pg_dump"})," and check file size."]})]})]})]}),"\n",(0,r.jsx)(s.h2,{id:"need-help",children:"Need Help?"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["Open a ticket with ",(0,r.jsx)(s.a,{href:"https://support.civo.com/tickets-view",children:"Civo Support"}),"."]}),"\n",(0,r.jsxs)(s.li,{children:["Consult the official ",(0,r.jsx)(s.a,{href:"https://www.postgresql.org/docs/",children:"PostgreSQL documentation"})," for deeper details on migration and compatibility."]}),"\n"]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.em,{children:"Happy migrating!"})})]})}function h(e={}){const{wrapper:s}={...(0,i.R)(),...e.components};return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(c,{...e})}):c(e)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.