forked from benbjohnson/litestream
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add replicate flags to pump Litestream manually
For some special setups it is sometimes useful to run Litestream manually instead of letting it replicate in the background. This commit implements the following flags for replicate: * -once for doing synchronous replication and then exit * -force-snapshot to force a snapshot during -once * -enforce-retention to enforce retention rules during -once Because running once does not respect the snapshot interval the caller is expected to use -force-snapshot and -enforce-retention regularly to ensure the replication targets stay clean. For this to work correctly with a live database it needs to be opened with auto checkpointing disabled and SQLITE_FCNTL_PERSIST_WAL. Other uses include only using -force-snapshot to create regular backups of the database instead of live replication. Fixes benbjohnson#486
- Loading branch information
Showing
3 changed files
with
105 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters