Skip to content

Commit

Permalink
Fully parameterize backup schedule
Browse files Browse the repository at this point in the history
Also: exercise backup code-path more frequently when running locally.
  • Loading branch information
c-w committed Feb 26, 2018
1 parent a79f878 commit 7b540a8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ services:
environment:
- FORTIS_CASSANDRA_HOST=cassandra
- FORTIS_CASSANDRA_PORT=9042
- BACKUP_INTERVAL=10m
- BACKUP_DELETE_LOOKBACK=30 minutes ago
env_file:
- .env-secrets

Expand Down
1 change: 1 addition & 0 deletions project-fortis-backup/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ ENV USER_FILES_BLOB_ACCOUNT_NAME=""
ENV USER_FILES_BLOB_ACCOUNT_KEY=""
ENV BACKUP_CONTAINER_NAME="backups"
ENV BACKUP_DELETE_LOOKBACK="2 weeks ago"
ENV BACKUP_INTERVAL="2h"

# a one-node local cassandra is set up via docker-compose, if you wish to use a
# larger cluster (e.g. hosted in Azure), just override this variable with the
Expand Down
2 changes: 1 addition & 1 deletion project-fortis-backup/docker/run-backup.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env sh

while :; do
sleep 60m
sleep "$BACKUP_INTERVAL"
/app/backup-cassandra-keyspace.sh settings
done

0 comments on commit 7b540a8

Please sign in to comment.