Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

Commit

Permalink
fix(litestream): only restore if db does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
dtfiedler committed May 8, 2024
1 parent 7315cce commit 3ad8c9b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions litestream/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ ytt --data-values-env TVAL -f /litestream.template.yaml > /litestream.yml

# restore if needed
echo "Restoring database from backup..."
/usr/local/bin/litestream restore -config /litestream.yml $TVAL_LOCAL_DB_PATH/state.db
/usr/local/bin/litestream restore -config /litestream.yml $TVAL_LOCAL_DB_PATH/contract.db
/usr/local/bin/litestream restore -if-db-not-exists -config /litestream.yml $TVAL_LOCAL_DB_PATH/state.db
/usr/local/bin/litestream restore -if-db-not-exists -config /litestream.yml $TVAL_LOCAL_DB_PATH/contract.db

echo "Starting Litestream for continuous replication..."
/usr/local/bin/litestream replicate -config /litestream.yml

0 comments on commit 3ad8c9b

Please sign in to comment.