Guest User

Untitled

a guest
Jul 19th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. # DUMP
  2. curl localhost:4001/v2/keys?recursive=true | jq -c 'recurse | objects | select(.key and .value) | {(.key): .value}' > etcd.dump
  3.  
  4. # RESTORE
  5. 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