zn

Crates.iozn
lib.rszn
version1.0.2
sourcesrc
created_at2021-04-15 00:30:41.83172
updated_at2021-05-30 03:21:23.274267
descriptionCLI for Files (Cloud Storage)
homepage
repositoryhttps://github.com/apibillme/zn
max_upload_size
id384284
size74,001
Bevan Hunt (bevanhunt)

documentation

README

Zn - CLI for Files (Cloud Storage)

crates.io

Purpose

This application is a CLI for files - a CDN Origin Server for Cloud Storage.

Zn makes it easy to upload a directory to a bucket, download a bucket to a directory, and copy buckets between cloud providers.

Zn in the future will support lumber to allow shipping logs from cloud storage to portal for search indexing.

To use this service you need to be running both a broker and a files server.

Features

  • Very performant with almost no CPU and memory usage
  • Supports uploading a directory to a bucket
  • Supports downloading a bucket to a directory
  • Supports copying between buckets including between providers
  • Under 500 lines of code
  • Built on broker and files

Use

cargo install zn

  • Refer to zn -h for help

  • Valid regions are:

Provider Region
wasabi wa-us-east-1
wasabi wa-us-east-2
wasabi wa-us-west-1
wasabi wa-eu-central-1
aws us-east-1
aws us-east-2
aws us-west-1
aws us-west-2
aws ca-central-1
aws ap-south-1
aws ap-northeast-1
aws ap-northeast-2
aws ap-northeast-3
aws cn-north-1
aws cn-northwest-1
aws eu-north-1
aws eu-central-1
aws eu-west-1
aws eu-west-2
aws eu-west-3
aws me-south-1
aws sa-east-1
do nyc3
do ams3
do spg1
do fra1
vultr ewr1
yandex ru-central1

Examples

  • -q is the URL for broker
  • -w is the URL for files

Upload a directory to a bucket

zn -u="/home/me/upload_data" -a="us-east-1" -j="my-bucket" -r="user" -p="password" -q="https://broker.upbase.dev" -w="https://files.upbase.dev"

Download a bucket to a directory

zn -d="/home/me/download_data" -b="us-east-1" -k="my-bucket" -r="user" -p="password" -q="https://broker.upbase.dev" -w="https://files.upbase.dev"

Copy the files of a bucket to another bucket - including between providers

  • This will copy the files in your my-aws-bucket in us-east-1 to my-wasabi-bucket in wa-us-east-1
zn -a="wa-us-east-1" -b="us-east-1" -j="my-wasabi-bucket" -k="my-aws-bucket" -r="user" -p="password" -q="https://broker.upbase.dev" -w="https://files.upbase.dev"

TechStack

Commit count: 0

cargo fmt