From: | Scot Kreienkamp <Scot(dot)Kreienkamp(at)la-z-boy(dot)com> |
---|---|
To: | Julie Nishimura <juliezain(at)hotmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | RE: automated refresh of dev from prod |
Date: | 2019-02-27 21:37:03 |
Message-ID: | 17082AAFC33A934082836458CB53494374EF0B96@MONDB03.na.lzb.hq |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
My method is complex and not so good for newbies, but it is incredibly fast and should scale to almost any size database. Mine are not nearly as large though.
I use two methods... the normal backup/restore for longer lived development environments, and for shorter lived environments I use postgres native mirroring from a secondary prod server to all my dev environments, then use LVM snapshots to take a snapshot of the postgres mount. Mount the snapshot and startup a second postgres instance in it and you have a mirror of production ready for use. That only lasts for a finite amount of time though (until you fill the space dedicated to the snapshot) before it becomes unusable,
that's the downside... it can't be long lived (hours, 1-2 days maybe). The upside is that the refresh from production in my environment for a 400G database is 3 seconds. It is a trade-off and not fit for every use, that's why we also use the traditional backup/restore in some cases.
Scot Kreienkamp |Senior Systems Engineer | La-Z-Boy Corporate
One La-Z-Boy Drive| Monroe, Michigan 48162 | Office: 734-384-6403 | | Mobile: 7349151444 | Email: Scot(dot)Kreienkamp(at)la-z-boy(dot)com
From: Julie Nishimura [mailto:juliezain(at)hotmail(dot)com]
Sent: Wednesday, February 27, 2019 4:16 PM
To: pgsql-general(at)postgresql(dot)org
Subject: automated refresh of dev from prod
ATTENTION: This email was sent to La-Z-Boy from an external source. Be vigilant when opening attachments or clicking links.
Hello everybody, I am new to postgresql environment, but trying to get up to speed.
Can you please share your experience on how you can automate refreshment of dev environment on regular basis (desirably weekly), taking for consideration some of prod dbs can be very large (like 20+ TB
Any suggestions?
Thank you!
This message is intended only for the individual or entity to which it is addressed. It may contain privileged, confidential information which is exempt from disclosure under applicable laws. If you are not the intended recipient, you are strictly prohibited from disseminating or distributing this information (other than to the intended recipient) or copying this information. If you have received this communication in error, please notify us immediately by e-mail or by telephone at the above number. Thank you.
From | Date | Subject | |
---|---|---|---|
Next Message | Ron | 2019-02-27 21:56:56 | Re: automated refresh of dev from prod |
Previous Message | Julie Nishimura | 2019-02-27 21:15:50 | automated refresh of dev from prod |