dcent-archiver
v0.1.1
Published
Archive files into a hyperdrive
Downloads
7
Maintainers
Readme
Dcent Archiver
Archive files into a hyperdrive.
Use only for files which do not change, such as images or video.
Description
This tool adds all files in a directory to a hyperdrive. After the files are added, they can be deleted (they will remain available from the hyperdrive).
There is a delay of 10 minutes before a file is added to the hyperdrive. Once a file is added, it will never be added again, so for files which change (such as a document which is updated), only the first version will be archived. The exception is when a file is updated during the grace period of 10 minutes.
Install
npm i -g dcent-archiverUsage
Parameters are passed in as environment variables. Optional parameters include:
DCENT_ARCHIVER_CORESTORE=my/corestore/loc # Defaults to ~/.dcent-archiver
DCENT_ARCHIVER_LOG_LEVEL=debug # defaults to info. See pino docs for the options.CLI
DCENT_ARCHIVER_DIR=/dir/to/watch/ dcent-archiver | pino-prettyNote: piping the output into pino-pretty is optional, but shows human-readable logs. Run npm i -g pino-pretty to install it.
Docker
Replacing /my/dir/to/archive/, run:
sudo docker run --rm --network=host --mount type=bind,source=/my/dir/to/archive/,target=/home/dcent-archiver/dir/,readonly --mount type=volume,source=dcent-archiver-corestore-volume,target=/home/dcent-archiver/corestore hdegroote/dcent-archiver