Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Make retention configurable #53

Open
erdostom opened this issue Nov 7, 2024 · 5 comments
Open

Feature request: Make retention configurable #53

erdostom opened this issue Nov 7, 2024 · 5 comments

Comments

@erdostom
Copy link

erdostom commented Nov 7, 2024

Some users may want longer retention than 24h.

Suggesting two new config items:

  • retention
  • snapshot_interval
@fractaledmind
Copy link
Owner

How do those map to configuration on the underlying Litestream utility?

@alxvernier
Copy link
Contributor

I have set this config in my config/litestream.yml file for 3 days retention with full snapshot every 12 hours.

dbs:
  - path: storage/${RAILS_ENV}.sqlite3
    replicas:
      - type: s3
        region: $LITESTREAM_REPLICA_REGION
        endpoint: $LITESTREAM_REPLICA_ENDPOINT
        bucket: $LITESTREAM_REPLICA_BUCKET
        path: app/storage/${RAILS_ENV}.sqlite3
        access-key-id: $LITESTREAM_ACCESS_KEY_ID
        secret-access-key: $LITESTREAM_SECRET_ACCESS_KEY
        retention: 72h
        snapshot-interval: 12h

@erdostom
Copy link
Author

erdostom commented Nov 7, 2024

hey @alxvernier it's possible to just set those values & they get passed to Litestream without extra work?

UPDATE: I tried adding the lines to my config/litestream.yml and it didn't work (Litestream stopped working altogether)

@erdostom
Copy link
Author

erdostom commented Nov 8, 2024

How do those map to configuration on the underlying Litestream utility?

I think they're discussed here https://litestream.io/reference/config/#:~:text=The%20default%20retention%20period%20is,and%20defaults%20to%20every%201h%20.

@alxvernier
Copy link
Contributor

@erdostom I didn't do more than inserting these options to make it work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants