Re: best practice in archiving CDR data - Mailing list pgsql-general

From Juan Backson
Subject Re: best practice in archiving CDR data
Date
Msg-id 27c25bc41003290718i406e0cfagbbe6077aa4677b7b@mail.gmail.com
Whole thread Raw
In response to Re: best practice in archiving CDR data  ("A. Kretschmer" <andreas.kretschmer@schollglas.com>)
List pgsql-general
Hi

Instead of dropping the table, I would like to archive the old table into a format that can be read and retrieved.

Can I db_dump on each child table?  

What is the best way to do it?  db_dump and make the data into csv and then tar.gz it or backup it up into a pg archived format?

thanks,
jb

On Mon, Mar 29, 2010 at 9:33 PM, A. Kretschmer <andreas.kretschmer@schollglas.com> wrote:
In response to Juan Backson :
> Hi,
>
> I am using Postgres to store CDR data for voip switches.  The data size quickly
> goes about a few TBs.  
>
> What I would like to do is to be able to regularly archive the oldest data so
> only the most recent 6 months of data is available.  
>
> All those old data will be stored in a format that can be retrieved back either
> into DB table or flat files.
>
> Does anyone know how should I go about doing that?  Is there any existing tool
> that can already do that?

Sounds like table partitioning: create, for instance, a table for each
month and DROP old tables after 6 month or so.

http://www.postgresql.org/docs/current/static/ddl-partitioning.html


Regards, Andreas
--
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47150,   D1: 0160/7141639 (mehr: -> Header)
GnuPG: 0x31720C99, 1006 CCB4 A326 1D42 6431  2EB0 389D 1DC2 3172 0C99

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

pgsql-general by date:

Previous
From: "A. Kretschmer"
Date:
Subject: Re: best practice in archiving CDR data
Next
From: Oliver Kohll - Mailing Lists
Date:
Subject: Re: [pgsql-general] looking for a powerful frontend/teport generator