New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@hoobs/migration

Package Overview
Dependencies
Maintainers
3
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hoobs/migration

HOOBS 4 Migration Tool

latest
npmnpm
Version
4.4.24
Version published
Maintainers
3
Created
Source

HOOBS migration utility. This utility can migrate a HOOBS 3 or Homebridge setup to HOOBS 4.

Installing

Use NPM to install this utility globally;

sudo npm install -g @hoobs/migration

Usage

To run the migration tool simply run this command.

sudo hbs-migrate

This will show you a list of steps the migration tool will take to upgrate to HOOBS 4. You will be asked if you want to execute the plan.

By default this assumes that you are running this tool on the system to be migrated. It will generate a script to be ran on boot. Your device will reboot a few times.

Transfering

If you want to transfer this setup to a new device or plan on re-flashing your sd card, you can use the -t or --transfer flag.

cd ~/
sudo hbs-migrate -t

Then from another computer you can use scp to transfer the backup.

scp hoobs@hoobs.local:~/migration.backup ./

Note. The above example if for a default HOOBS Box. You may need to change the username and/or hostname depending on your setup.

Note. If you are transfering the backup file using macOS, scp is available in the terminal. If using Windows 10, PowerShell has an scp command.

It is recommended that you power down your current device before restoring your new device or new SD card. This will prevent network collisions.

On you new HOOBS 4 setup, you can restore it, using the migration.backup file, from the Hub Settings dialog.

Command Line

This tool has flags that can automate parts of the migtation routine.

FlagShorthandParametersDescription
--app-ahoobs or homebridgeselect the application you are migrating from
--unattended-yautomatically execute the migration
--split-ssplit plugins into individual bridges
--transfer-tgenerate backup for transfer to another device
--debug-dused to migrate without executing the scripts

Module

This tool can also be used as a module in code.

const Migration = require("@hoobs/migration");

// first setup the tasks object
const tasks = new Migration.tasks(/* transfer: [true | false] */);

// you need to fetch a list of instances
const instances = Migration.instance.paths(/* app: [hoobs | homebridge] */);

// next start the system interrogation and execute the tasks
tasks.interrogate(
    /* app :[hoobs | homebridge] */,
    instances[0], // <-- example, it's best to ask the user which instance to migrate
    /* split: [true | false] */,
).then(() => {
    tasks.execute(/* path: [string | undefined] */).then(() => {
        console.log("complete");
    });
});

The tasks.execute() function can either reboot the system and migrate to HOOBS 4 or it can save a migration backup file to the path specified.

If you plan on only creating a migration backup file, you must set the transfer flag to true when creating the tasks object.

HOOBS and the HOOBS logo are registered trademarks of HOOBS Inc. Copyright (C) 2020 HOOBS Inc. All rights reserved.

FAQs

Package last updated on 25 Jul 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts