Virteche
Guideschevron_rightStorage

Storage · 6 min read · Updated

Using Object Storage with the AWS CLI, rclone and restic

Virteche object storage speaks the S3 API, so the tools you already use work once they know four things: the endpoint https://s3.us-west.virteche.com, the region us-west, your access key and secret from the dashboard, and path-style addressing. Create your buckets in the dashboard first; everything inside them works from any S3 tool.

The Settings

Endpoint:      https://s3.us-west.virteche.com
Region:        us-west
Addressing:    path-style (force_path_style / s3ForcePathStyle / addressing_style = path)
Access key:    from your dashboard
Secret key:    shown once in your dashboard

AWS CLI

aws configure --profile virteche          # key, secret, region us-west
aws configure set profile.virteche.s3.addressing_style path
aws configure set profile.virteche.request_checksum_calculation when_required
aws configure set profile.virteche.response_checksum_validation when_required

aws s3 ls s3://my-bucket --profile virteche --endpoint-url https://s3.us-west.virteche.com
aws s3 cp ./report.pdf s3://my-bucket/reports/ --profile virteche --endpoint-url https://s3.us-west.virteche.com
aws s3 sync ./photos s3://my-bucket/photos --profile virteche --endpoint-url https://s3.us-west.virteche.com

A link someone else can download one object with, valid for a day:

aws s3 presign s3://my-bucket/reports/report.pdf --expires-in 86400 \
  --profile virteche --endpoint-url https://s3.us-west.virteche.com

rclone

rclone config create virteche s3 provider Other endpoint https://s3.us-west.virteche.com region us-west \
  access_key_id YOUR_KEY secret_access_key YOUR_SECRET force_path_style true no_check_bucket true

rclone ls virteche:my-bucket
rclone sync ./photos virteche:my-bucket/photos --progress

restic Backups

As root (sudo -i), make a password file first. restic encrypts everything with it, and without it the backups cannot be read:

install -m 600 /dev/null /root/.restic-password
openssl rand -base64 32 > /root/.restic-password
export AWS_ACCESS_KEY_ID=YOUR_KEY
export AWS_SECRET_ACCESS_KEY=YOUR_SECRET
export AWS_DEFAULT_REGION=us-west
export RESTIC_REPOSITORY=s3:https://s3.us-west.virteche.com/my-bucket/restic
export RESTIC_PASSWORD_FILE=/root/.restic-password

restic init
restic backup /etc /home /var/www
restic forget --keep-daily 7 --keep-weekly 4 --prune

restic encrypts before uploading, so the storage only ever holds encrypted data. Keep a copy of the password somewhere other than the server you are backing up, such as a password manager: if the server is lost, you need it to restore.

SDKs

Every S3 SDK takes an endpoint and a path-style flag — for example forcePathStyle: true in the JavaScript SDK v3 or config=Config(s3={"addressing_style": "path"}) in boto3 — plus the region us-west.

Object Storage or a Storage Box?

If your tools speak SSH — rsync, Borg, SFTP — a storage box is simpler. The comparison guide goes through it.

Common Questions

  • Why does my tool say the bucket does not exist, or the signature is wrong?

    Almost always one of two settings: path-style addressing is off (the tool tries bucket.s3.us-west.virteche.com), or the region is not us-west. Set both explicitly.

  • Can I create buckets from the command line?

    No — buckets are created and deleted in your dashboard, which keeps them within your plan. Everything inside a bucket (uploading, listing, deleting objects) works from any S3 tool.

  • Is multipart upload supported?

    Yes. Large uploads from the AWS CLI, rclone and SDKs use it automatically. Unfinished uploads count toward your space until they are completed or aborted.

Plans and prices

Object Storage

S3-compatible storage from 1 TB with transfer included and a flat monthly price.

See all plans
  • 1 TB

    1 TB transfer a month

    Up to 10 buckets

    $7.00/mo

  • 2 TB

    2 TB transfer a month

    Up to 10 buckets

    $13.00/mo

  • 5 TB

    5 TB transfer a month

    Up to 10 buckets

    $30.00/mo

Hosted in United States (West).

Keep Reading

All guides