Migration and snapshot of database - Mailing list pgsql-admin

From aarti sawant
Subject Migration and snapshot of database
Date
Msg-id CALTiZF_CwtLg9+ieM0PE_xNMRhAF--eMS_crGXLTA2tucrxtnQ@mail.gmail.com
Whole thread Raw
List pgsql-admin
I want to migrate physical server on to virtual machine
My physical server consist of 
1. Some Application.
2. PostgreSQL Database

Here the system migrated from Physical machine will be replicated into two 

VM's.
- One will be act as live machine, on which live operations will be performed.
- Second will be test VM, where I can make changes in application and test for 

new features.

Both VM need to have their own database. But two copies of database require 

twice the storage.
I want to optimize for storage.

Once the database is migrated to new machine, how I can use this database for 

both VM's without two independent copies.
Test VM will have its own write operations, which will be ignored later.

My approach
Migration:
-I am thinking of using pg_basebackup for online database backup from physical 

machine to new machine.
-Is pg_barman or pg_rman is faster than pg_basebackup? 

Storage optimization:
I want to use snapshot to optimize for storage.
- Will take snapshot of original database and export the snapshot with 

read/write access to test VM.

Since, I could not found anything within postgres, I plan to do it using file 

system or LVM.
So with this method I can do my testing and delete the snapshot after testing 

is done without reflecting original database.

Has anyone work on such scenario?  What are problem faced in writable 

snapshot?

pgsql-admin by date:

Previous
From: Sergey Konoplev
Date:
Subject: Re: WAL files required to make base backup consistent
Next
From: aarti sawant
Date:
Subject: Migration and snapshot of database