Nightly Backups to Your Own Bucket with rclone
A practical walkthrough: point rclone at basin.alawadi.cloud, script a nightly backup with cron, add retention, and actually test a restore. Free egress means practicing restores costs nothing.
You have data you would hate to lose: application files, uploads, a database dump. With Basin now live on alawadi.cloud, the fix is one bucket, one config file, and one cron line. This guide sets up a nightly backup with rclone, adds retention, and, most importantly, tests a restore.
What you'll need
- An alawadi.cloud account with a bucket (created from the dashboard in about a minute)
rcloneinstalled on the machine that holds the data- A shell with cron: your server, a VPS, or any always-on box
Step 1: Create the bucket and save the credentials
In the portal, create a Basin bucket and pick a size that fits your backups with headroom. The bucket's access key and secret are shown once at creation. Store them in your password manager before closing the dialog; if you lose them you'll need to regenerate.
Keys are scoped to this bucket alone, which is exactly what you want for a backup job: even if the machine running the job is compromised, only the backup bucket is exposed.
Step 2: Configure rclone
Add a remote to ~/.config/rclone/rclone.conf:
[alawadi]
type = s3
provider = Other
access_key_id = EXAMPLE_ACCESS_KEY_ID
secret_access_key = EXAMPLE_SECRET_KEY
endpoint = https://basin.alawadi.cloud
region = damm-1
force_path_style = trueVerify it works (an empty bucket prints nothing and exits 0):
rclone ls alawadi:YOUR_BUCKETStep 3: Write the backup script
Save this as /usr/local/bin/nightly-backup.sh and adjust the data path:
#!/usr/bin/env bash
set -euo pipefail
STAMP="$(date +%F)"
ARCHIVE="/tmp/app-data-${STAMP}.tar.gz"
# 1. Snapshot the data directory into a dated archive
tar -czf "${ARCHIVE}" -C /var/lib/myapp data
# 2. Ship it to the bucket
rclone copy "${ARCHIVE}" "alawadi:YOUR_BUCKET/nightly/"
# 3. Clean up the local archive
rm -f "${ARCHIVE}"Make it executable with chmod +x /usr/local/bin/nightly-backup.sh and run it once by hand. Then confirm the object landed:
rclone ls alawadi:YOUR_BUCKET/nightly/If your data lives in a database, dump it first (pg_dump, mysqldump, or your engine's equivalent) and ship the dump the same way. Managed databases on alawadi.cloud are already backed up by the platform; this pattern is for data you manage yourself and for keeping an extra copy under your own keys.
Step 4: Schedule it
One cron line runs the backup every night at 03:00:
crontab -e0 3 * * * /usr/local/bin/nightly-backup.sh >> /var/log/nightly-backup.log 2>&1Check /var/log/nightly-backup.log after the first night. A backup job that fails silently is worse than no backup job, because it buys false confidence.
Step 5: Add retention
Nightly archives add up. Keep the last 30 days by appending one line to the script, after the upload:
# 4. Drop archives older than 30 days
rclone delete "alawadi:YOUR_BUCKET/nightly/" --min-age 30dThirty daily archives of a 200 MB data directory is about 6 GB, which costs roughly $0.24 per month at $0.04 per GB-month. Adjust the window to your appetite.
Step 6: Test the restore
A backup you have never restored is a hope, not a backup. Pull last night's archive back and verify it:
mkdir -p /tmp/restore-test
rclone copy "alawadi:YOUR_BUCKET/nightly/app-data-2026-07-02.tar.gz" /tmp/restore-test/
# The archive lists cleanly = the backup is readable end-to-end
tar -tzf /tmp/restore-test/app-data-2026-07-02.tar.gz | headDo this once now and put a reminder in your calendar to repeat it monthly. Because egress is free on alawadi.cloud, a restore drill costs you nothing, no matter how big the archive. There is no billing penalty for being careful.
Where to go from here
- The storage quickstart covers the S3 API, SDK configuration, and more tools.
- The pricing calculator estimates your storage line next to your other services.
Questions? Open a support ticket in the portal, or email [email protected].
The company behind alawadi.cloud
The company building an Arabic-first cloud platform, from the physical servers up to the developer experience.