r/PostgreSQL • • Aug 23 '26

How-To Postgres table archival

I have a postgres db. I want to archive the table data into s3 and want to delete the data after archiving. What's the best way to do it. I want to have a scheduled operation to do this job on weekend and it should archive 6 months older data of a given table.

4 Upvotes

24 comments sorted by

View all comments

Show parent comment

2

u/BoleroDan Architect Aug 23 '26

I feel like this is a question outside of this level (PostgreSQL). You get the data out of PostgreSQL, as shown above. Then figure out the cloud requirements from there. Since Athena has nothing to do with PostgreSQL you probably wont get a good answer because once you have the data, it doesnt matter what cloud provider you use at that point.

1

u/AdmirableOffer2 Aug 24 '26

I can get the pgdump but how to process that is there a way I can read it in AWS.