Update retention policy to infinite/default when restoring a backup

Hello,

I am trying to restore a Backup from a InfluxDb with a 1w retention policy in a new Db with an infinite/default retention policy.

influxd restore -portable -db data -newdb data-restore -rp one_week_only -newrp infinite ~/influx-backup

When I import the backup and overwrite the retention policy with -newrp, the current shards-groups are still marked as expired and are deleted when the next enforcement comes. Even if i alter the retention policy to something other. I also tried to set -newrp to autogen, but that didn’t work either.

How can I set the expiry time of past shards or import them with a correct/updated expiry time?

> SHOW shard groups
name: shard groups
id  database     retention_policy start_time           end_time             expiry_time
--  --------     ---------------- ----------           --------             -----------
...
156 data-restore infinite         2019-07-20T00:00:00Z 2019-07-21T00:00:00Z 2019-07-21T00:00:00Z
157 data-restore infinite         2019-07-21T00:00:00Z 2019-07-22T00:00:00Z 2019-07-22T00:00:00Z
158 data-restore infinite         2019-07-22T00:00:00Z 2019-07-23T00:00:00Z 2019-07-23T00:00:00Z
159 data-restore infinite         2019-07-23T00:00:00Z 2019-07-24T00:00:00Z 2019-07-24T00:00:00Z

Hi @vh-vogler welcome to the community !

backup / restore does not change the existing shard properties,
you will have to use the export /import utilities to insert the data in a new database | retention policy ,
or if this is the only database , you could set the retention enabled=false ,
or set the check-interval to 171 years or both :slight_smile:
Please test first on a test environment …
[retention]
enabled = false
check-interval = “1500000h0m0s”