0

I’m looking at archiving data with TimescaleDB. Typically, I want to have TimescaleDB running on a box with little disk space and continuously archive it to an S3 bucket. To do so, I’m using pgBackRest. The issue is I have a data retention policy on the hypertable that is being backed up, thus my backups are limited to the same data as what is kept into database by the retention policy. Is there a way to ignore what’s been deleted by the data retention policy when performing a backup?

Note: I’m open to alternative solutions other than pgBackRest.

I have looked through the documentation for potential configurations / options without success

  • 2
    It's quite unclear what you are asking for. e.g. "Is there a way to ignore what’s been deleted by the data retention policy when performing a backup?": What does that mean? When you delete data and then take a backup, the backup will of course not contain that (deleted) data. – TmTron Mar 23 '23 at 08:06
  • Thank you for your reply. The goal is to backup all the data inserted in database, but also only retain the most recent entries in the database to keep disk usage low. Example: at time t0: I insert 100000 rows in my db ; at time t1: the data retention policy keeps only the last 20000 rows. I want to be able to restore the 100000 rows inserted into the db from the backup Instead, I'll only be able to get the last 20000 rows because the backup will reflect the actions of the retention policy – WillowOfTheBorder Mar 24 '23 at 12:46

0 Answers0