GithubHelp home page GithubHelp logo

riakdataportation's Introduction

riakdataportation

Build/Install

  • Install golang on your machine, making sure you have go command on PATH
  • Run go get github.com/likemindnetworks/riakdataportation/portation
  • That should be it

Usage

Note that flags/options (e.g. -a) must go before arguments (e.g. import)

Riak Data Portation Tool
Usage: portation <export|import> <riak host with port>
  -a string
    	app name
  -c int
    	number of connections (default 20)
  -d string
    	data version
  -i string
    	input file for import
  -o string
    	output folder for export result (default ".")
  -v	print version

To Export data out of the DB

  • -a Required. name of the application, e.g. teamDental
  • -o the folder where the output is written to, default to current direction
  • set first argument after the flags/options to export
  • set second argument after the flags/options to url to the riak protocol buffer port

Example:

portation \
  -a teamCS \
  -o . \
  export Riak-dev-ELB-749646943.us-east-1.elb.amazonaws.com:8087

This will write to a file named similar to teamCS.2016-03-10T16:41:56-05:00.bin. The format is:

<app name>@<data version>.<timestamp>.bin

To Import data into the DB

  • -i the path to data file generated from exporting
  • -a name of the application, e.g. teamDental, When importing, the app name can override to app name in the data file, this allows data from one app to be imported into another app. This requires caution and a confirmation will be asked
  • set first argument after the flags/options to import
  • set second argument after the flags/options to url to the riak protocol buffer port

Example:

portation \
  -a teamCS \
  -i ./teamCS.2016-03-10T16:41:56-05:00.bin \
  import Riak-dev-ELB-749646943.us-east-1.elb.amazonaws.com:8087

Data File Format

A request followed by its corresponding response. There are only two types request and response pairs:

  • RpbGetReq, RpbGetResp
  • DtFetchReq, DtFetchResp
|protocol header (5 bytes)|request protocol message|protocol header (5 bytes)|response protocol message|...

For detailed specs: http://docs.basho.com/riak/latest/dev/references/protocol-buffers/

riakdataportation's People

Contributors

sencenan avatar

Stargazers

Hidekazu Tanaka avatar

Watchers

Seungpyo "Steve" Chae avatar James Cloos avatar  avatar Derek Ho avatar Ying Wei Loke avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.