Looking for environment variables

I am trying to find the doc that relates to the environment variables bellow. For some reason I am unable to find any mention of them.

RETENTION_YEARS: '0'
RETENTION_MONTHS: '12'
RETENTION_WEEKS: '5'
RETENTION_DAYS: '7'
RETENTION_HOURS: '120'

I wanted to change the above with en env for --keep-within to replace the above now that I better understand how retention works but as I said, I see no mention of any of the above.

Any help would be welcome. Thanks!

I might be wrong but a quick grep of the restic repo shows no signs of the above variables so I’m guessing they are no longer valid.

Please correct me if I’m wrong.

Environment variables are listed in the documentation. As far as I know there are no envvars which apply to prune rules; none of those are envvars I recognise.

2 Likes

What made you think they ever existed in restic in the first place?

3 Likes

Hi @rawtaz @ProactiveServices ,

Thank you both for your help.

@ProactiveServices , how I missed that section of a doc is a mystery. thanks for pointing it out!

@rawtaz , you are absolutely right. I got confused between existing env vars and the ones I had created for myself a while ago. This is my actual command which makes far more sense now.

  restic forget --cache-dir ${cache_dir} \
                --keep-tag critical \
                --keep-tag archive \
                --keep-yearly $RETENTION_YEARS \
                --keep-monthly $RETENTION_MONTHS \
                --keep-weekly $RETENTION_WEEKS \
                --keep-daily $RETENTION_DAYS \
                --keep-hourly $RETENTION_HOURS \
                --prune 1> $maintenance_output 2> $maintenance_failure

Sorry for the confusion and thanks again for your help.

3 Likes