From: | Ron <ronljohnsonjr(at)gmail(dot)com> |
---|---|
To: | pgsql-admin(at)lists(dot)postgresql(dot)org |
Subject: | Re: Move database |
Date: | 2020-11-10 14:24:53 |
Message-ID: | 07a5cf21-76f6-b47f-bd7c-22e1241e9f3a@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
On 11/10/20 8:22 AM, Yambu wrote:
> Hi
>
> Same version of database, the old server will remain running with other
> databases, we just want to move one database.
If that's the case, then you either must:
* do a pg_dump/pg_restore, or
* depending on the version, logically replicate that one database.
>
> regards
>
> On Tue, Nov 10, 2020 at 4:16 PM Ron <ronljohnsonjr(at)gmail(dot)com
> <mailto:ronljohnsonjr(at)gmail(dot)com>> wrote:
>
> On 11/10/20 8:11 AM, Paul Förster wrote:
> > Hi Yambu,
> >
> >> On 10. Nov, 2020, at 14:48, Yambu <hyambu(at)gmail(dot)com
> <mailto:hyambu(at)gmail(dot)com>> wrote:
> >> What is the best way to move a database from one VM to another
> without losing records from updating applications?
> > I assume you want to minimize down time? If so, set up a streaming
> replication on the new VM and let PostgreSQL copy the whole database
> over by itself as a standby database. After copying is finished and
> both databases are completely in sync, then shut down the old
> (primary) database and promote the standby database. After that, you
> can delete the old database.
> >
> > Assuming you can afford the down time, there is always the option of
> shutting the database down and scp or rsync it to the new VM and start
> it there.
> >
> > If you run it on some external storage like mounted NFS filesystems,
> you can shut it down, umount the NFS volume(s) on the old VM, mount
> the NFS volume(s) on the new VM and start it there.
> >
> > It really depends on your system (storage) architecture.
>
> Given this set of circumstances, they could dismount the LUNs from
> VM-old,
> and mount them on VM-new:
> * it's on a SAN,
> * they're keeping the same version number,
> * the database files are on dedicated mount points.
>
> --
> Angular momentum makes the world go 'round.
>
>
--
Angular momentum makes the world go 'round.
From | Date | Subject | |
---|---|---|---|
Next Message | Wells Oliver | 2020-11-10 18:53:52 | temp_buffers and work_mem and big temp tables |
Previous Message | Yambu | 2020-11-10 14:22:03 | Re: Move database |