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

Can we have a persistent storage for the key-value store? #97

Open
ashish235 opened this issue Jul 16, 2015 · 3 comments
Open

Can we have a persistent storage for the key-value store? #97

ashish235 opened this issue Jul 16, 2015 · 3 comments

Comments

@ashish235
Copy link

I know that with consul we have fault tolerance, but there maybe a possibility where all my consul servers are going down together. Then in that scenario, I will loose all the configuration I have stored in the K/V store.

Does the -v /mnt:/data also gives persistence to the data in my K/V store?

@mpresh
Copy link

mpresh commented Sep 19, 2016

Is there any update for this question.

@ianmcorvidae
Copy link

Mounting a host volume in as the /data directory will persist the data when consul is restarted in a rolling fashion. The key-value data is persisted in this directory; the details are mentioned in https://groups.google.com/forum/#!msg/consul-tool/QHA_t9DR5LQ/gPitNrlvIwAJ

As you know, consul can get into a broken state when servers are not restarted in a rolling fashion. This is the behavior of consul itself, and not particular to this image, so in performing outage recovery, consult the guide at https://www.consul.io/docs/guides/outage.html

The google groups thread I linked above includes some comments/recommendations on the topic of backing up the K/V store, and when this is relevant/recommended.

In any case, the immediate answer is: yes, your K/V data is persisted in the data directory, so if you would like it to be persistent across several containers, use a shared volume of some sort.

@ghost
Copy link

ghost commented Jul 21, 2017

Can this /data volume info be added to a README.md somewhere?

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

3 participants