pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedhow to take export of one year data from large database which contain 4 years of data.
3+ messages / 3 participants
[nested] [flat]
* how to take export of one year data from large database which contain 4 years of data.
@ 2015-11-16 08:17 clingareddy@vsoftcorp.com
0 siblings, 2 replies; 3+ messages in thread
From: clingareddy@vsoftcorp.com @ 2015-11-16 08:17 UTC (permalink / raw)
To: pgsql-admin
Hi All,
My database contains 4 years of data, but i want to migrate only one year i.e 2015 of data to another database.
Please help me how to take export of one year data. Is there any bus_date condition we can use while exporting?
Thanks,
Chandrakiran L
Please do not print this email unless it is absolutely necessary.
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to which they are addressed. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail and destroy all copies of this message and any attachments. Any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company.
Warning: Although the company has taken reasonable precautions to ensure no viruses are present in this email, the company cannot accept responsibility for any loss or damage arising from the use of this email or attachments.
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: how to take export of one year data from large database which contain 4 years of data.
@ 2015-11-16 08:31 Albe Laurenz <laurenz.albe@wien.gv.at>
parent: clingareddy@vsoftcorp.com
1 sibling, 0 replies; 3+ messages in thread
From: Albe Laurenz @ 2015-11-16 08:31 UTC (permalink / raw)
To: 'clingareddy@vsoftcorp.com *EXTERN*' <clingareddy@vsoftcorp.com>; pgsql-admin
clingareddy@vsoftcorp.com wrote:
> My database contains 4 years of data, but i want to migrate only one year i.e 2015 of data to another
> database.
>
> Please help me how to take export of one year data. Is there any bus_date condition we can use while
> exporting?
PostgreSQL does not know when a row was created.
If you want to export only part of a table, you can do that with:
COPY (SELECT <part of the table>) TO <filename>;
You'd have to come up with appropriate SELECT statements for each affected table,
and you would end up with one export file per table.
A bit tedious, but it can be done.
Another option would be to create a copy of the database, delete everything
that is old and dump the remaining data.
Yours,
Laurenz Albe
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: how to take export of one year data from large database which contain 4 years of data.
@ 2015-11-16 08:47 Thomas Kellerer <spam_eater@gmx.net>
parent: clingareddy@vsoftcorp.com
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Kellerer @ 2015-11-16 08:47 UTC (permalink / raw)
To: pgsql-admin
clingareddy@vsoftcorp.com schrieb am 16.11.2015 um 09:17:
> My database contains 4 years of data, but i want to migrate only one year i.e 2015 of data to another database.
>
>
> Please help me how to take export of one year data. Is there any bus_date condition we can use while exporting?
I have never used this, but Jailer claims to support exporting a (logical) subset of a database:
http://jailer.sourceforge.ne
Thomas
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2015-11-16 08:47 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2015-11-16 08:17 how to take export of one year data from large database which contain 4 years of data. clingareddy@vsoftcorp.com
2015-11-16 08:31 ` Albe Laurenz <laurenz.albe@wien.gv.at>
2015-11-16 08:47 ` Thomas Kellerer <spam_eater@gmx.net>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox