4

In the backup file there are a lot of encoded values. How do I get back the original data.
For example there is

+ d q+LsiGs1gD9duJDbzQSXytajtCY=

which is of the format ["+"] [SP] ["d"] [SP] [{digest}] [LF] where q+LsiGs1gD9duJDbzQSXytajtCY= is the key digest. How would the get the primary key from this?

Also Map and List values are represented as opaque byte values. How do we restore the original Map and List?

I would currently need to do all this if I wanted to make a CSV dump out of the backup.

Jeff P Chacko
  • 4,908
  • 4
  • 24
  • 32
  • 1
    You have a pair of tools asbackup and asrestore. They understand each other's formats. What are you trying to do? – Ronen Botzer Aug 22 '17 at 13:56
  • How would I make a csv out of the data I have on aerospike? Or how would I move data from aerospike into some other db? There currently seems to be no easy way to move data out of aerospike without using a node.js or java client. But asbackup also lets you take backup incrementally which I want to use. – Jeff P Chacko Aug 22 '17 at 13:58

1 Answers1

5

The tool asbackup is an open source tool, as is asrestore. The file format is described in the repo aerospike/aerospike-tools-backup on GitHub.

Alternatively, you could use the Kafka connector to move data from Aerospike to another database via Kafka.

The easiest way to do what you're looking for is still to write a program that scans the target namespace, and parses each record into a csv format. You can use predicate filtering to only get records whose last-update-time is greater than a specific timestamp, giving you the progressive backup you want. See the PredExp class of the Java client and its examples.

Ronen Botzer
  • 6,951
  • 22
  • 41