Re: Need help how to manage a couple of daily DB copies.

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Andreas <maps(dot)on(at)gmx(dot)net>
Cc: PostgreSQL mailing lists <pgsql-general(at)postgresql(dot)org>
Subject: Re: Need help how to manage a couple of daily DB copies.
Date: 2013-10-25 02:07:24
Message-ID: CAB7nPqQq66=Jmd=RY1-jni+YPJ3MrkBKtLeUe-KxCkd+cXxkTw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Oct 25, 2013 at 10:53 AM, Andreas <maps(dot)on(at)gmx(dot)net> wrote:
> Hi,
>
> I'd like to set up a DB-Server that keeps copies of our productive db for an
> external db-assistant.
> He should prepare chores on the test-server and mail the sql scripts to me.
> I'll look over those scripts and run them against the productive db myself.
>
> So I'd like to have a daily cron job dump the main db, rename the test-db to
> something with a date in it.
> Like test_db --> test_db_20131024
> Create a new test_db and import the dump of the main db.
>
> So far no problem but how could I limit the number of test_dbs to 5?
> I'd like to keep those test_dbs 5 days and then drop them.
A simple script kicked by a cron job would do the work for you easily...
--
Michael

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Shridhar Daithankar 2013-10-25 02:15:13 Re: Need help how to manage a couple of daily DB copies.
Previous Message Tomas Vondra 2013-10-25 02:06:25 Re: Need help how to manage a couple of daily DB copies.