watch-and-mirror
v1.0.0
Published
Watch and mirror from and to Hyperdrives and local drives
Maintainers
Readme
Watch and Mirror
Watch and mirror from and to Hyperdrives and local drives. Enables continuously syncing a remote drive to a local one using peer-to-peer connections.
Built on Hyperdrive, Mirror Drive and Watch Drive.
Install
npm i -g watch-and-mirrorUsage
Run local-to-drive on the source machine, and run drive-to-local on the target machine. One-to-many replication is trivially possible (just run drive-to-local on multiple machines).
Both commands accept an optional environment variable WATCH_AND_MIRROR_STORAGE_LOC with the location of the corestore (by default they are stored in ~/.watch-and-mirror)
drive-to-local <drive key> <destination directory>local-to-drive <source directory> <drive name>Where the specified drive name is passed to the corestore namespace (determining the hyperdrive key). The corresponding hyperdrive key will be logged.
Pipe the logs into pino-pretty for a human-readable format.
