# @hyperspace/migration-tool

> A tool for migrating from hyperdrive-daemon to hyperspace.

Latest version **1.2.1** (published 2020-09-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install @hyperspace/migration-tool
pnpm add @hyperspace/migration-tool
yarn add @hyperspace/migration-tool
bun add @hyperspace/migration-tool
```

Provides the command `hyperspace-migration-tool`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.1 |
| Published | 2020-09-23 |
| First published | 2020-07-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Unpacked size | 7.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Andrew Osheroff |
| Maintainers | andrewosh, mafintosh |
| Keywords | hyperspace, hyperdrive, daemon, migration |

## Links

- npm: https://www.npmjs.com/package/@hyperspace/migration-tool
- Repository: https://github.com/andrewosh/hyperspace-migration-tool
- Homepage: https://github.com/andrewosh/hyperspace-migration-tool#readme
- Issues: https://github.com/andrewosh/hyperspace-migration-tool/issues
- npm.io page: https://npm.io/package/@hyperspace/migration-tool

## Dependencies (6)

- [level](https://npm.io/package/level.md) ^6.0.1
- [hyperspace](https://npm.io/package/hyperspace.md) ^3.0.0
- [subleveldown](https://npm.io/package/subleveldown.md) ^5.0.0
- [stream-collector](https://npm.io/package/stream-collector.md) ^1.0.1
- [@hyperspace/client](https://npm.io/package/@hyperspace/client.md) ^1.0.0
- [buffer-json-encoding](https://npm.io/package/buffer-json-encoding.md) ^1.0.2

## Recent versions

- 1.2.1 (latest) — 2020-09-23
- 1.2.0 — 2020-09-16
- 1.1.2 — 2020-07-19
- 1.1.1 — 2020-07-19
- 1.1.0 — 2020-07-13
- 1.0.0 — 2020-07-13

## README

# `@hyperspace/migration-tool`
A tool for migrating from the [Hyperdrive daemon](https://github.com/hypercore-protocol/hyperdrive-daemon) to [Hyperspace](https://github.com/hyperspace-org/hyperspace).

This tool does a few things:
1. It moves all your stored hypercores from `~/.hyperdrive/storage/cores` to `~/.hyperspace/storage`.
2. It copies all network configurations (the cores you're seeding) from the daemon's Level instance (at `~/.hyperdrive/storage/db`) into Hyperspace's config trie.
3. It copies your FUSE root drive key into a separate config file that will be loaded by [`@hyperspace/hyperdrive`](https://github.com/hyperspace-org/hyperspace-hyperdrive-service).

### Installation
```
npm i @hyperspace/migration-tool -g
```

### Usage
This migration tool is currently bundled with Hyperspace -- it's run by default when Hyperspace is first started, so you shouldn't have to run this manually. After a few months or so, we'll be removing it. 

If you'd like to do the migration manually anyway, you can install this module globally (`npm i @hyperspace/migration-tool -g`) and use the included `bin.js` CLI tool.

#### As a module
The tool exports two functions, `migrate` and `isMigrated`. `await migrate()` will perform the migration.

### From the CLI
`./bin.js` will perform the migration. It assumes that your Hyperdrive daemon storage is stored in `~/.hyperdrive` and that your Hyperspace storage directory is going to be `~/.hyperspace`.

### License
MIT

---
_Source: https://npm.io/package/@hyperspace/migration-tool · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
