Change retention and issue with CLI

Hi,

I wanted to change the retention of a bucket to forever, but when ever I save the changes in the UI, there is no change. It will remain on 365 days.

So I googled and found this command:

influx bucket update -i <your-bucket-id> --retention 0

However, when I run it in the CLI, I get the following error:

root@influxdb:~# influx bucket update -i xyz --retention 0
Error: failed to update bucket "xyz": 401 Unauthorized: unauthorized access

Can someone help me? :slight_smile:

Jo

You have to provide required authentication credentials either with each CLI command or store a CLI configuration beforehand.

1 Like

Great thank you, that did the trick :smiley: