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

Give replicate command a -restore-if-db-not-exists flag #442

Open
ipmb opened this issue Nov 1, 2022 · 2 comments
Open

Give replicate command a -restore-if-db-not-exists flag #442

ipmb opened this issue Nov 1, 2022 · 2 comments
Labels
enhancement New feature or request
Milestone

Comments

@ipmb
Copy link

ipmb commented Nov 1, 2022

To get a copy of the database before replication starts, you need to write a shell script like this: https://github.com/benbjohnson/litestream-docker-example/blob/8f4d71055049ccd3cc52f499539e70601bb10d48/scripts/run.sh#L4-L10

Could replicate get a flag like -restore-if-db-not-exists that would restore the database if it doesn't exist prior to starting replication?

This seems like a common use case and it would be nice to be able to cover it with a single command instead of adding an additional script to handle it.

@benbjohnson benbjohnson added this to the v0.4.0 milestone Nov 3, 2022
@benbjohnson benbjohnson added the enhancement New feature or request label Nov 3, 2022
@benbjohnson
Copy link
Owner

Yeah, that's a good idea @ipmb. I added to the next milestone.

@morki
Copy link

morki commented Feb 16, 2023

That would be awesome, but just want to note it should imply -if-replica-exists because of first start.

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

No branches or pull requests

3 participants