autorestic icon indicating copy to clipboard operation
autorestic copied to clipboard

Cron per backend

Open N-Schaef opened this issue 1 year ago • 2 comments

I could not find anything in the docs. Is it currently possible to have different crons per backend location?

For example:

locations:
  data:
    from: /mnt/data
    to:
      - local
      - remote

And perform the local backup daily and the remote backup weekly?

I know I could use two locations for that, but this seems more like a workaround

N-Schaef avatar Aug 11 '22 12:08 N-Schaef

That is not an option rn

cupcakearmy avatar Aug 11 '22 13:08 cupcakearmy

What you could do rn is use the extra field and yaml anchors to achieve a similar behavior. https://autorestic.vercel.app/config#aliases

version: 2

extras:
  data: &foo
    from: /mnt/data
    # ...

locations:
  data-local:
    <<: *foo
    to: local
    cron: '0 0 0 0 0'
  
  data-remote:
    <<: *remote
    to: local
    cron: '0 0 0 1 0'

cupcakearmy avatar Aug 11 '22 13:08 cupcakearmy