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

flipt import read from STDIN #278

Closed
giddel opened this issue May 6, 2020 · 3 comments
Closed

flipt import read from STDIN #278

giddel opened this issue May 6, 2020 · 3 comments
Assignees

Comments

@giddel
Copy link
Contributor

giddel commented May 6, 2020

For backup the sqlite database I can use flipt export which pipes to STDOUT. In our k8s environment this looks so:
kubectl exec -it <name of flipt pod> -- /bin/sh -c './flipt export' > export.yaml
... and works like a charm :-)

But now I wonder how to import the the backup since flipt import wants to read from a file, not from STDIN. I've tried a lot of variants, all ended in Error: requires a file argument :-(

So it would be great, if I can do a flipt import to read from STDIN for restoring backups in a docker or k8s environment.

@giddel
Copy link
Contributor Author

giddel commented May 11, 2020

Little update of my idea:
Why not provide API endpoints for export and import the data?
And once we have API endpoints, why not provide these maintenance feature from the admins frontend?

@markphelps
Copy link
Collaborator

@giddel I just released https://github.com/markphelps/flipt/releases/tag/v0.14.0 which should allow you to import from STDIN. I also updated the docs here: https://flipt.io/docs/configuration/#import

Thanks for the feature request! I think I'll hold off on adding this to the API/UI for now unless someone else wants to work on it

@giddel
Copy link
Contributor Author

giddel commented Jul 9, 2020

Export from v0.13 with Sqlite and import into v0.16 with Mysql worked! :-)

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

2 participants