Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # DUMP
- curl localhost:4001/v2/keys?recursive=true | jq -c 'recurse | objects | select(.key and .value) | {(.key): .value}' > etcd.dump
- # RESTORE
- perl -ne 'print "curl \"localhost:4001/v2/keys$1\" -XPUT -d \"value=$2\"\n" if /{"(\S+)":"(\S*)"}/' etcd.dump | sh
Add Comment
Please, Sign In to add comment