Overview

BHK Cloud works with a variety of backup tools and strategies. Because our storage is S3-compatible, any tool that supports the S3 protocol can be used to automate backups to BHK Cloud.

Scheduled Backups with rclone

The simplest approach is to pair rclone with a cron job for automated, scheduled backups.

Linux / macOS (cron)

Open your crontab with crontab -e and add a daily backup at 2 AM:

crontab
0 2 * * * rclone sync /home/user/data bhkcloud:backups/daily --log-file=/var/log/rclone-backup.log --log-level INFO

Windows (Task Scheduler)

Create a batch script and schedule it with Task Scheduler:

backup.bat
rclone sync C:\Users\me\Documents bhkcloud:backups/daily --log-file C:\logs\rclone-backup.log --log-level INFO

API-Based Backup Scripts

For more control, write a custom backup script using the BHK Cloud API.

backup.sh
#!/bin/bash
BACKUP_DIR="/home/user/data"
TIMESTAMP=$(date +%Y%m%d-%H%M%S)

tar czf /tmp/backup-$TIMESTAMP.tar.gz "$BACKUP_DIR"

curl -X POST \
  -H "Authorization: Bearer $BHK_API_KEY" \
  -F "file=@/tmp/backup-$TIMESTAMP.tar.gz" \
  -F "key=backups/backup-$TIMESTAMP.tar.gz" \
  https://api.bhkcloud.com/v1/files/upload

rm /tmp/backup-$TIMESTAMP.tar.gz

Third-Party Integrations

Duplicati

Duplicati is a free, open-source backup client with a web-based UI. It supports S3-compatible storage out of the box.

  1. Download Duplicati from duplicati.com
  2. Create a new backup and select S3 Compatible as the storage type
  3. Set the server to s3.bhkcloud.com
  4. Enter your BHK Cloud API key and secret key
  5. Choose your bucket and configure your schedule

Duplicati supports encryption, deduplication, and incremental backups automatically.

restic

restic is a fast, encrypted backup program designed for efficiency.

Initialize repository
export AWS_ACCESS_KEY_ID="YOUR_ACCESS_KEY"
export AWS_SECRET_ACCESS_KEY="YOUR_SECRET_KEY"

restic -r s3:s3.bhkcloud.com/my-backups init
Create a backup
restic -r s3:s3.bhkcloud.com/my-backups backup /path/to/data

restic handles encryption, deduplication, and snapshot management automatically.

Best Practices

  • 3-2-1 Rule — Keep 3 copies of data, on 2 different media types, with 1 copy offsite (BHK Cloud).
  • Test restores regularly — A backup is only as good as your ability to restore it.
  • Use encryption — Enable client-side encryption for sensitive data, in addition to BHK Cloud's server-side encryption.
  • Monitor your backups — Set up log monitoring and alerts for failed backup jobs.
  • Version your backups — Use timestamped paths or snapshot-based tools like restic to maintain multiple backup versions.
  • Set retention policies — Automatically prune old backups to manage storage costs.