1.1.0 • Published 8 years ago

happn-migrator v1.1.0

Weekly downloads
-
License
MIT
Repository
-
Last release
8 years ago

#happn-migrator for moving data between happn instances, both multiple and single

//example config

var config = {
    skipSystemObjects: false,//will move /_SYSTEM data
    outputFolder: __dirname + require('path').sep + 'tmp',//will use this folder to put the temporary data and log files
    happn_instances:[//instances you may want to start up (leave out already running ones)
      {
        name:'Test1',
        port:55011
      },{
        name:'Test2',
        port:55022
      },{
        name:'Test3',
        port:55033
      },{
        name:'Test4',
        port:55044
      }
    ],
    input_clients:[ //clients for data you wish to get
      {
        name:'Test1-input',
        config:{
          port:55011
        }
    },{
        name:'Test2-input',
        config:{
          port:55022
        }
    }
    ],
    output_clients:[ // migration destination clients, each will get a copy of the input data
      {
        name:'Test1-output',
        config:{
          port:55033
        }
      },{
        name:'Test2-output',
        config:{
          port:55044
        }
      }
    ]
  };

  //then run the migrator:
  var Migrator = require('happner-migrator');
  var migrator = new Migrator(configFile);

  migrator.initialize(function(e){
    if (e) return done(e);

     migrator.on('completed migration', function(state){

      //YAY migration complete, checkout state.log and state.output for the log and output files

     });

     migrator.start();

  });

#command line execution:

npm install -g happn-migrator
or
sudo npm install -g happn-migrator

happn-migrator --conf ./test/fixtures/cli_conf.js

#you may have some permissions issues - be sure to specify a temp directory you have permission for in the config field: outputFolder
1.1.0

8 years ago

1.0.0

8 years ago

0.2.5

8 years ago

0.2.4

8 years ago

0.2.2

8 years ago

0.2.1

8 years ago

0.2.0

8 years ago

0.1.0

8 years ago