GithubHelp home page GithubHelp logo

neonota / nebula-migrate Goto Github PK

View Code? Open in Web Editor NEW

This project forked from telios-org/nebula-migrate

0.0 0.0 0.0 114 KB

Migration tool for upgrading Nebula Drives between updates with breaking changes

License: MIT License

JavaScript 100.00%

nebula-migrate's Introduction

nebula-migrate

Migration tool for upgrading Nebula drives between updates with breaking changes

Usage

await Migrate({ rootdir: __dirname, drivePath: '/drive', encryptionKey, keyPair })


const drive = new Drive(path.join(__dirname, '/drive'), null, {
  keyPair,
  encryptionKey,
  swarmOpts: {
    server: true,
    client: true
  }
})

await drive.ready() // Upgraded drive is now ready for use!


/**
 *  Existing drive is renamed to <drivePath>_old
 *  New drive replaces the original at <drivePath>
 * 
 *  Old drive persists in the event migration fails. 
 *  Feel free to decide if this old directory can be removed or not.
 * 
 *  Before:
 *  |__ root/
 *     |__ drive/
 * 
 *  After:
 *  |__root/
 *      |__ drive/
 *      |__ drive_old/
 * 
 * /

await Migrate({ rootdir, drivePath[,encryptionKey][,keyPair] })

Migrates an older version of nebula to the newer version.

  • rootdir: root directory that the drive resides in
  • drivePath: the relative path of the drive /drive
  • encryptionKey: Encryption key for migrating encrypted drives
  • keyPair: The original drive's keyPair

nebula-migrate's People

Contributors

hexadecible 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.