Closed jantman closed 8 years ago
I was able to get a successful restore by simply ignoring any None/null values, though I'm not sure what the actual impact of that is...
diff --git a/consulate/cli.py b/consulate/cli.py
index 09a838f..3238ff2 100644
--- a/consulate/cli.py
+++ b/consulate/cli.py
@@ -307,6 +307,10 @@ def kv_restore(consul, args):
row = [row['Key'], row['Flags'], row['Value']]
if args.base64:
+ if row[2] is None:
+ print("skipping None/null value: item=%s flags=%s", row[0],
+ row[1])
+ continue
row[2] = base64.b64decode(row[2])
# Here's an awesome thing to make things work
I can confirm that the issue I described in my last comment is fixed in https://github.com/bdclark/consulate/tree/develop as of 886864c16d6c6c0b1822feb9668c0f0510939444
@gmr Is there any hope of getting @bdclark's fix merged?
This has been merged and will be released along with 0.7
+1 on a release please.
I'm running consulate from master (as of 3c6ce3c4f7a675d68046eb22ed244306a033111a) with current Consul (0.5.2). I originally tried using the version of consulate on PyPi and ran into the same issue as #61. Installing from master, that issue (when backing up) is fixed, but I get the corresponding issue on the "other side" when trying to restore the backup I just made:
If I apply the following patch:
Then it becomes a bit more clear: