pshima/consul-snapshot

backup/restore to local disk

Closed this issue · 3 comments

I need a backup/restore for Consul and storing in a public cloud like AWS/S3 won't work for us.
We manage our own datacenter and I'd like to instead backup/restore to/from local drive/nfs.

I see there is support in the source code for first backing up locally before uploading, but local is not exposed as a first class final data source.

Also, the env variables for all the remote information is in the way.

I also see there is an "acceptance" flag that when set bypasses the remote behavior.

And lastly, I see an outstanding PR supporting Google cloud that has some improvements to better enable conditional logic for handling S3 vs GC.

Before I try hacking this in, I thought I'd post inquiring about how best to go about this.
I wish the GC support was merged so I could leverage some of the improvements, but that merge sems somewhat stalled.

I'm sure others would like a first class -local option.

Thanks

EDIT: I hacked the config.go,backup.go and restore.go to support local backups.
I'm testing it now, but I'll issue a PR if it looks like a go.

hi @richard-mauri I would support local backups as long as it fits into the regular flow. I haven't had google cloud access to test out the PR which is the hang up there. I'll take another look at getting that going.

I have forked your project and it might be worth having a PR with that local feature before the google cloud storage PR? See: https://github.com/richard-mauri/consul-snapshot

Hi @richard-mauri PRs welcome for local file backups, but this is already supported directly in consul so it would probably be better to just use the native functionality: https://www.consul.io/docs/commands/snapshot.html