You can have automated daily backups running on a Linux cloud server in under an hour: install a backup tool or write a 20-line script, schedule it with cron (or a systemd timer), push the archive to object storage in a different provider or region, keep 7 daily plus 4 weekly copies, and test a restore once a month. That combination — schedule, off-site copy, retention, and verified restores — is what separates a real backup from a file sitting on the same disk that will die with the server.
Most failed backup stories share the same three mistakes: the backup lived on the same volume as the data, nobody checked whether the job actually ran, and nobody ever tried restoring it. The setup below avoids all three. It costs roughly $1–5 per month in object storage for a typical small server (20–100 GB of data), and it takes about 45 minutes the first time.
Key points
- A working daily backup needs four parts: a consistent database dump, an off-site encrypted copy, a retention policy (7 daily / 4 weekly / 6 monthly), and a tested restore.
- Cron or a systemd timer with Persistent=true schedules the job; log the exit code and alert if no successful run appears within 26 hours.
- Object storage for backups typically costs $1–5 per month for a small server — enable versioning and a 7–30 day immutability window against ransomware.
- Restore a real archive monthly and time it; an untested backup is an assumption, not a safety net.
Step 1: Decide what you are actually backing up
Before scheduling anything, list the paths that matter: application code or uploads, configuration files under /etc, and — most importantly — the databases. A database cannot be safely copied as a raw file while it is running; dump it with the native tool (mysqldump, pg_dump, or their equivalents) so the archive is consistent.
Exclude the noise. Caches, logs you do not need for compliance, and node_modules-style dependency folders can triple archive size for zero recovery value. A 60 GB disk often backs up to 8–15 GB once you exclude the junk, which directly cuts your storage bill.
- Databases: dump with mysqldump/pg_dump, never copy live data files
- Config: /etc, nginx/apache vhosts, cron files, SSL certificates
- Application data: uploads, user files, .env and secrets (encrypted)
- Exclude: caches, temp files, logs beyond retention needs
Step 2: Pick your tool — script, restic, or provider snapshot
Three approaches cover almost every case. A shell script plus tar and a database dump is the simplest and most transparent; a popular community setup is exactly that: a Bash script on a systemd timer producing compressed archives and syncing them off-box. Dedicated tools like restic or borg add deduplication, encryption, and incremental snapshots, so a daily job after the first run transfers only changed blocks — often a few hundred MB instead of tens of GB.
Provider-level snapshots (volumes or VM images) are the easiest of all and are worth enabling as a second layer, but treat them as a complement, not the plan: snapshots usually live inside the same account, and a deleted instance or a compromised account can take them with it.
Step 3: Schedule it with cron or a systemd timer
A cron entry is one line: run the script daily at 03:30 server time, log the output, and mail or alert on failure. Use `30 3 * * *` with an absolute script path and a full environment, because cron runs with a minimal PATH and half of all "my cron job doesn't work" cases are a missing binary path. systemd timers are the sturdier alternative: they support `Persistent=true` so a missed run (server rebooting at 03:30) executes at the next boot instead of silently skipping a day.
Pick an off-peak hour in your users' timezone and stagger database dumps from file archives so the I/O spike doesn't overlap. If your data changes constantly, a single daily run is the floor — for higher frequency, see our guide on how often to back up, which maps recovery point objectives to schedules.
- Cron: 30 3 * * * /usr/local/bin/backup.sh >> /var/log/backup.log 2>&1
- systemd: OnCalendar=*-*-* 03:30:00 with Persistent=true
- Always log start, end, archive size and exit code
- Alert if no successful run in 26 hours
| Approach | Setup time | Daily transfer | Storage cost/month | Best for |
|---|---|---|---|---|
| tar + mysqldump script to object storage | 30–60 min | 2–15 GB full | $1–5 | Small sites, single server |
| restic/borg incremental to S3-compatible storage | 45–90 min | 0.2–2 GB | $1–4 | Growing data, many versions |
| Provider volume snapshots | 5–10 min | Block-level | $2–10 | Fast rollback, second layer |
| Managed backup add-on from host | 10–20 min | Varies | $5–25 | Teams without ops time |
Step 4: Send copies off the server and encrypt them
The backup must leave the machine. Sync the finished archive to S3-compatible object storage (AWS S3, Backblaze B2, Wasabi, or your host's own object storage) using rclone or restic's native backend. Ideally the bucket sits in a different region or provider from the server, so a regional outage doesn't take both. The general model is described on the remote backup service page: primary data on one system, a durable copy on another.
Encrypt before upload — restic and borg do this natively; with a plain tar script, pipe through GPG or openssl with a key stored somewhere other than the server. Also enable object versioning and, where available, object lock or immutability for 7–30 days: ransomware that reaches your credentials should not be able to delete the last week of backups. This is the same principle behind any serious cloud hosting security checklist — assume the server itself may be compromised.
- Separate credentials: the backup user can write and list, not delete
- Enable bucket versioning plus a 7–30 day immutability/lock window
- Encrypt client-side; keep the key off the server
- Cross-region or cross-provider copy for anything business-critical
Step 5: Set retention so storage costs stay flat
Without retention rules, daily backups grow forever. A standard, defensible policy is 7 daily, 4 weekly, and 3–12 monthly copies — restic's `forget --keep-daily 7 --keep-weekly 4 --keep-monthly 6` does it in one command. That keeps roughly 15–20 restore points at any time regardless of how long the server runs.
If you are unsure what the storage line will cost at your data size, the cloud hosting cost calculator gives a quick estimate, and our breakdown of how to calculate cloud hosting costs covers the backup storage line in detail. Typical object storage runs $5–6 per TB per month on the cheap tiers, so even generous retention rarely exceeds a few dollars.
Step 6: Monitor the job and test a restore monthly
An unmonitored backup is a rumour. Check three things automatically: the job exited 0, the archive size is within ±30% of the previous run (a sudden 2 KB archive means the dump failed), and the object exists in the bucket. A simple healthchecks-style ping or a one-line curl to your monitoring endpoint at the end of the script covers it.
Then restore. Once a month, pull the latest archive onto a scratch server and actually recover a database and a handful of files. Time it — that number is your real recovery time objective. Untested backups fail at the worst moment; the Wikipedia entry on backup states the point plainly: a backup is only as good as its restore. Budget 30–60 minutes for the drill.
What about iCloud, Jira, and Confluence backups?
Two related searches deserve a direct answer. iCloud backups run automatically once enabled: on iPhone go to Settings → [your name] → iCloud → iCloud Backup and switch it on; on a Mac, System Settings → Apple ID → iCloud → iCloud Backup. Apple keeps daily snapshots for 30 days, and you cannot schedule extra runs yourself — you can only tap "Back Up Now" for an extra manual run.
For Jira and Confluence Cloud, Atlassian runs its own infrastructure backups, but site admins should still export a scheduled XML/CSV backup (Jira: System → Import and Export → Backup manager, with a daily or weekly automatic schedule) and download it off-platform, because Atlassian's copy is not a self-service restore point you control. For self-hosted Jira or Confluence, treat them like any database workload: nightly database dump plus the attachments/home directory, following the same schedule, off-site, retention and restore-test pattern above. Our pre-migration checklist covers the same data-inventory thinking before you move workloads.
Frequently asked questions
How to make an iCloud backup every day? iCloud backups run automatically once enabled and the device is on Wi-Fi, plugged in and locked — Apple keeps daily snapshots for 30 days, so there is no user-facing schedule to set. On iPhone use Settings → [your name] → iCloud → iCloud Backup; on Mac, System Settings → Apple ID → iCloud → iCloud Backup. You can tap "Back Up Now" for an extra manual run.
How to setup automatic backups? Write or install a backup script that dumps your database and archives your files, then schedule it with cron (for example 30 3 * * *) or a systemd timer, and push the result to off-site object storage with encryption and retention rules. Add a failure alert and test a restore monthly so the schedule is proven, not assumed.
Is automatic backup available with cloud storage? Yes — most object storage services (S3, Backblaze B2, Wasabi and host-provided storage) support lifecycle rules, versioning and scheduled sync tools like rclone or restic, which automate uploads and retention. The scheduling intelligence usually sits on your server or in the backup tool; the cloud storage provides the durable, off-site destination.
Cloud Solutions Editor
Jordan curates and edits content on cloud hosting and IT services. With years of experience in tech publishing, Jordan ensures that complex topics are presented clearly and accurately. Jordan is passionate about helping readers make informed hosting decisions.
