Ubuntu Backup Frequency Calculator
“How often should I back this up?” has one honest answer, and it is a calculation, not a habit: the interval is bounded by how much data you can afford to lose, by how long a backup takes, and by when the machine is free to run it. Enter the size of the dataset, how fast it changes, and the data-loss window you would actually accept after a restore — your recovery point objective, or RPO — and this calculator models every candidate interval from every 15 minutes up to daily. It shows you, for each one, the worst-case data loss in gigabytes, whether it fits inside your available window, and how much storage the retention policy costs. The verdict is the coarsest interval that survives all three constraints — the cheapest backup schedule that never puts you outside the loss window you declared — and it hands you a ready-to-paste cron line, a systemd timer pair or an rsnapshot/borg/rsync config for your chosen method. Everything is computed in this tab: nothing you enter leaves the page.
100% private. The interval math, the candidate table and every generated config are produced with JavaScript in this browser tab. Your paths, sizes and schedules never leave the page; there is no server-side calculation and nothing to send.
1. Describe the data source
A preset fills every field for a common scenario — pick one and edit it, or start from scratch.
Every candidate interval, modelled
Generated schedule for the recommendation
Checks on this plan
How to use it
Start from a preset if one matches — the six cover the shapes that come up most: the slow-growing photo archive, the always-on business server, the transaction-heavy database, the churny developer tree, the active media project and the small VPS. Then correct whatever does not fit your box: the size, the change rate and the full-backup duration are the three numbers that most often get guessed wrong, and each of them moves the verdict. The change rate is a percentage of the dataset per day, not an absolute gigabyte count — 5% of a 500 GB set is 25 GB of churn, while 5% of a 5 TB archive is 250 GB.
The RPO select is the heart of the tool: it is the data-loss window you are willing to accept in the worst case — restore at 09:14 and the newest thing you can have lost happened just before the last backup finished. Pick the value your business would survive, not the value that makes the schedule look cheap. The results panel then shows the verdict with its reasons, four summary numbers (worst-case loss, runs per day, time per run, storage needed), a table of every candidate interval from 15 minutes to daily, and three config tabs — cron, systemd timer, and the method-specific rsync/rsnapshot/borg snippet. Copy any tab, download the install script for the recommendation, or copy the share link to hand the whole plan, inputs included, to a colleague. The page recalculates live as you change anything, so you can watch the verdict and the storage column move while you argue with your own numbers.
Worked example: the small business server
Pick the “Small business server (docs + DB)” preset. It fills in a 500 GB dataset changing at 8% per day (40 GB of churn), an RPO of 1 hour, a full backup that takes 45 minutes, the deduplicating method, an always-on box and 14 generations of retention.
The calculator models the candidates against those constraints:
- Every 15 or 30 minutes satisfies the RPO with room to spare, but they are not the recommendation: a 4.5-minute borg run is cheap, yet paying for 96 or 48 runs a day when 24 already meet the loss window is throwing money away. The table shows their worst-case loss (0.21 GB and 0.42 GB) so you can see exactly what you would be buying.
- Every hour wins. It is the coarsest interval at or under the 1-hour RPO, so worst-case loss is 1.67 GB of the day’s 40 GB — inside your declared window by construction. Twenty-four runs a day at about 4.5 minutes each use roughly two hours of the disk or link per day, which an always-on box absorbs without a dedicated window.
- Daily fails the RPO outright: one run a day means up to 40 GB of lost changes in a worst-case restore, ten times your declared window. The table marks it red rather than hiding it, because “I back up every night” is exactly the plan that fails this test.
- Storage stays sane: 500 GB for the base archive plus thirteen deduplicated incrementals of about 0.83 GB each lands at roughly 511 GB total — a single spare disk, which is what the 3-2-1 rule asks for.
The systemd tab emits a oneshot service plus a timer with
OnCalendar=*-*-* 02:00:00/1h and Persistent=true, so a reboot
mid-window replays the missed run instead of silently skipping it. The cron tab
emits the equivalent 0 * * * * line wrapped in flock -n with an
explicit log redirect. The install script writes both units, runs
systemctl daemon-reload and enables the timer in one command.
How it works
Three constraints bound the interval, and the calculator checks every candidate against all three. The first is your RPO: an interval of I hours means the worst-case loss is I hours’ worth of changes, computed as size × change rate ÷ 24 × I. Any candidate whose interval exceeds your RPO is disqualified, no matter how cheap it is. The second is the time a run takes: with the method’s typical cost factor (full copies take 100% of a full run, rsnapshot-style incrementals about 20%, deduplicating archives about 10%), the per-run minutes must fit the gap between runs on an always-on box, or the whole day’s runs must fit inside your limited window. The third is storage: a full-every-time policy costs retention × size (fourteen full copies of 500 GB is 7 TB — the number that usually kills this option), while incremental and deduplicating policies cost one base archive plus the accumulated changes, with the dedup estimate halved to reflect overlap between archives. The recommendation is the coarsest interval that passes all three — cheapest first, because a backup schedule you can afford to run is worth more than one you cannot.
The config generation is plain text templating on top of those numbers. An
hourly interval becomes 0 * * * * in cron and
OnCalendar=*-*-* 02:00:00/1h in a systemd timer; every-15-minutes becomes
*/15 * * * * and the sub-minute-capable step form; daily becomes a fixed
time of day, taken from your window’s opening hour so the run starts when the
box is actually free. Cron lines are wrapped in flock -n so a slow run can
never overlap itself, and they carry an explicit log redirect because cron has no
journal of its own. The systemd pair gets Persistent=true whenever you have a
limited window or the box may be off at the scheduled moment, so missed slots are
replayed on the next boot rather than lost.
Choosing the method and reading the table
The three methods trade three different things. Full copies (a fresh rsync to a clean target) are the easiest to verify — any generation is a complete, immediately mountable tree — but they pay the full time and the full storage on every single run, so they only make sense for small datasets or very relaxed RPOs. Incremental tools like rsnapshot keep one base plus hard-linked generations: restores of recent data are fast, older restores follow a chain that gets slower the further back you go, and the time per run stays roughly constant at about two-tenths of a full. Deduplicating tools like borg or restic store content-defined chunks, so runs cost only what actually changed — ideal for large, mostly-stable datasets and for off-site targets where you pay per byte transferred — at the price of a restore that reassembles files from chunks and a key you must keep somewhere the ransomware cannot reach.
Read the candidate table top to bottom: each row is one interval, and the green and red marks answer two questions — does this row respect your RPO, and do its runs fit your window? The highlighted row is the recommendation. If the highlighted row is far down the table (daily) while you wanted hourly, the findings panel tells you which constraint is binding: usually it is the window, and the fix is a faster method or a longer window rather than a looser RPO.
Common mistakes this calculator catches
- “I back up every night.” A daily backup is a 24-hour RPO. If your declared window is 1 hour, the table shows the nightly row in red and the verdict moves to hourly — the gap between “I have backups” and “my backups meet my requirements” is exactly what this page measures.
- Sub-hour RPO with full backups. A 15-minute loss window on a database cannot be met by file-level copies: the run itself takes longer than the window. The findings panel says so and points at the real tools — replication or point-in-time recovery for the hot data, with the backup as the safety net behind it.
- Scheduling more runs than the window allows. Twelve runs a day that each take 30 minutes need six hours of the eight-hour night window before you count a slow month; the table’s window-fit column catches this per candidate, and the verdict never recommends a row whose runs do not fit.
- Retention nobody priced. Fourteen generations of full copies on a 500 GB set is 7 TB. The storage column makes that number visible next to the 511 GB the same retention costs with deduplication, so the method choice stops being a habit.
- A cron line on a machine that sleeps. Cron fires at the clock time or not at all. The systemd config carries
Persistent=truefor limited-window boxes, and the findings panel flags the combination when you pick the cron tab anyway. - Guessing the change rate at 1%. Photo archives really are close to 1%, but a working tree is often 20–40% of its size per day. The loss column scales linearly with this input — if your number is wrong by ten times, your worst-case loss is wrong by ten times, so measure it once (
duagainst a manifest, or your sync tool’s transfer log) rather than guessing forever.
Related tools
Suggested
Luke Keam | techgeek.biz