A calendar of 2026 with the 23 backup copies still held on 31 December: twelve monthly, four weekly and seven daily

Keep 7 daily, 4 weekly and 12 monthly copies of a 20 GB site and you hold 23 copies, or 460 GB, once the schedule is full. That takes a year to reach, so the first year stores 4,157 GB-months and the second 5,520. Thirty daily copies cost more than that and reach back only 30 days. This is the arithmetic, the deletion rule and a script you can run with no lifecycle rules at all.

The pattern is usually called grandfather-father-son: daily copies are the sons, weekly the fathers, monthly the grandfathers. Our rclone backup guide covers what to back up and how to practise a restore. This one covers how long to keep each copy and what that adds up to.

What each schedule stores

Every copy here is a full 20 GB archive, and 20 GB is the size after compression. We counted day by day through 2026 and 2027 and turned the daily totals into GB-months, the unit storage is billed in. The cost columns use Amazon S3 Standard at $0.023 per GB-month in US East (AWS price file dated 15 October 2026) as a common yardstick.

Keep (daily / weekly / monthly)Copies when fullStored when fullOldest restore
7 / 0 / 07140 GB6 days
7 / 4 / 314280 GBAbout 3 months
7 / 4 / 1223460 GBAbout 12 months
30 / 0 / 030600 GB29 days
14 / 8 / 1234680 GBAbout 12 months
KeepGB-months, year 1GB-months, year 2Cost, year 1Cost, year 2
7 / 0 / 01,6661,680$38.32$38.64
7 / 4 / 33,2523,360$74.78$77.28
7 / 4 / 124,1575,520$95.61$126.96
30 / 0 / 06,9147,200$159.02$165.60
14 / 8 / 126,6428,160$152.76$187.68

Compare 7/4/12 with 30 daily copies: seven fewer copies and about twelve times the reach. What you give up is fine grain in old history. Beyond a week you can go back only to a Sunday, and beyond about a month only to the first of a month. For most sites that's the right trade, because a mistake you notice today usually happened recently, and a mistake you notice in June may need a copy from March but rarely a particular Tuesday.

Pick the schedule from two questions: how late could you discover a problem, and do you have a contract or rule that sets a period? If nothing sets one, 7/4/12 is a sensible start, and 7/4/3 saves 180 GB if a year of history has no use to you.

How the 460 GB builds up

Dailies and weeklies fill in the first month. After that, storage climbs by one 20 GB copy a month until the twelfth monthly lands. A budget based on the first few months' bill will be low.

Date in 2026DailyWeeklyMonthlyCopiesStored
28 January74112240 GB
28 March74314280 GB
28 June74617340 GB
28 September74920400 GB
1 December onward741223460 GB

A site that grows changes the sum. At 1 GB of growth a month, starting from 20 GB, the same schedule holds 655 GB on 31 December instead of 460, which is 42% more, and stores 5,203 GB-months in the year, which is 25% more. New copies are the large ones, so the total rises faster than the site does.

What to delete and when

The rule is one line per prefix: after a good upload, keep the newest N and delete the rest. Here is what that looks like after the run on 3 November 2026.

PrefixHoldsWhat this schedule deletes next
daily/28 October to 3 November (7)28 October, in the run on 4 November
weekly/11, 18, 25 October and 1 November (4)11 October, in the run on Sunday 8 November
monthly/1 January to 1 November (11)Nothing until there are 12; 1 January 2026 goes on 1 January 2027

1 November 2026 is both a Sunday and the first of a month, so that one archive sits in all three prefixes for a week: 60 GB of identical bytes. It leaves daily/ on 8 November and weekly/ on 29 November. A server-side copy saves the upload, not the storage, because each prefix holds its own object. That happens on 3 dates in 2026: 1 February, 1 March and 1 November.

A single prefix with a keep list would avoid those duplicates. We counted that as well: 22 distinct copies and 440 GB at the end of 2026, and 3,822 GB-months for the year, about 8% less. We still prefer three prefixes for a script you maintain by hand, because anyone can read the bucket and see which tier a copy belongs to.

The script

Save this as a nightly cron job. It's written for Linux and needs rclone, tar, and GNU date, stat and head. There are no lifecycle rules in it: tport.space doesn't offer them yet, and as the next sections show, you may not want them anyway. Dates are UTC, so a change of server time zone can't produce a missed or doubled day.

ini
# ~/.config/rclone/rclone.conf
[tport]
type = s3
provider = Other
access_key_id = TPS...
secret_access_key = ...
endpoint = https://s3.tport.space
region = auto
force_path_style = true
no_check_bucket = true
bash
#!/usr/bin/env bash
set -euo pipefail

REMOTE=tport:site-backups
SOURCE=/srv/site
TODAY=$(date -u +%F)
ARCHIVE=/tmp/site-$TODAY.tar.gz

tar czf "$ARCHIVE" -C "$SOURCE" .

# Much smaller than the newest copy: stop before anything changes in the bucket
NEW=$(stat -c %s "$ARCHIVE")
PREV=$(rclone lsl "$REMOTE/daily/" | sort -k4 | tail -n 1 | awk '{print $1}')
if [ "${PREV:-0}" -gt 0 ] && [ "$NEW" -lt $((PREV / 2)) ] && [ -z "${ALLOW_SHRINK:-}" ]; then
  echo "Archive shrank from $PREV to $NEW bytes. Check it, or rerun with ALLOW_SHRINK=1" >&2
  rm -f "$ARCHIVE"
  exit 1
fi

rclone copyto "$ARCHIVE" "$REMOTE/daily/$TODAY.tar.gz" --s3-chunk-size 16M
rm -f "$ARCHIVE"

# Promote with a server-side copy: nothing is uploaded twice
if [ "$(date -u -d "$TODAY" +%u)" = 7 ]; then
  rclone copyto "$REMOTE/daily/$TODAY.tar.gz" "$REMOTE/weekly/$TODAY.tar.gz"
fi
if [ "$(date -u -d "$TODAY" +%d)" = 01 ]; then
  rclone copyto "$REMOTE/daily/$TODAY.tar.gz" "$REMOTE/monthly/$TODAY.tar.gz"
fi

# Keep the newest N in each prefix; the names sort by date
prune() {
  rclone lsf --files-only "$REMOTE/$1/" | sort | head -n -"$2" | while read -r f; do
    rclone deletefile "$REMOTE/$1/$f"
  done
}
prune daily 7
prune weekly 4
prune monthly 12

One setting is worth explaining for tport.space. no_check_bucket = true stops copy and copyto from trying to create the bucket, which on tport.space is done in the console, so the call is refused as NotImplemented. We checked this on the live service on 3 November 2026 with rclone v1.75.2. Make site-backups in the console first.

What we tested

On 3 November 2026 we ran that script against a local test copy of the tport.space S3 service, with rclone v1.75.2 and a small test archive. Sizes in the sums above are calculated, not uploaded: we did not push 460 GB. The runs check the logic of what is kept and deleted.

TestResult
365 nightly runs, 1 January to 31 December 2026Every day matched the expected counts. It ended with 7 daily, 4 weekly and 12 monthly copies, the exact 23 files predicted, and no failed run
Archive shrinks from 200,294 to 156 bytesExit 1 with a message, nothing uploaded, nothing deleted. The next night's run stopped the same way
Same archive with ALLOW_SHRINK=1Uploaded, exit 0
No backups for 41 days, then one good runSix older dailies kept, 7 in total, oldest from 5 March; an age rule would have left one
Server-side promotion of a 30 MiB file, forced to multipartMD5 of the copy matched the original
Lifecycle rule sent with put-bucket-lifecycle-configurationNotImplemented

Why it prunes by count, not by age

An age rule says delete anything older than 7 days. It keeps deleting after your backups stop working. Leave a broken job for 8 days and every daily is gone, and a lifecycle rule does the same thing with no script to fail first. A count rule can only remove a copy after a newer one has arrived, and because this script runs with set -e, a failed upload never reaches the prune step.

There's a second trap if you copy a folder tree instead of an archive. rclone's --min-age went by each file's modification time, not when it reached the bucket. In our test, a logo last changed on 15 January 2024 and uploaded that day into daily/2026-11-03/ matched --min-age 7d at once. So rclone delete --min-age 7d could remove unchanged files from a backup made minutes earlier. Parse the date from the name, as the script does.

The shrink check covers the quiet failure: a tar of an empty folder after a bad mount still exits zero and would push a good copy out of the list each night. Stopping before the upload means the check keeps firing until someone looks. A cron job's failure is worth nothing unless it reaches you, so send it to an email or a monitor.

What the upload costs in time and requests

A 20 GB archive at 100 Mbit/s takes about 27 minutes, at 20 Mbit/s about 2 hours 13 minutes, and at 1 Gbit/s under 3 minutes. Check that the slow end fits your nightly window. Part size decides the request count, which is why the script sets 16 MiB. The multipart part-size article has the fuller picture.

Part sizeParts per 20 GB uploadCalls in a yearAt S3's $0.005 per 1,000rclone memory, one file
5 MiB (rclone default)3,8151,393,205$6.9720 MiB
16 MiB1,193436,175$2.1864 MiB
64 MiB299109,865$0.55256 MiB

Calls are parts plus two per upload, for 365 uploads. Promotions and listings add a few more. On tport.space multipart steps count as writes and deletes are free, so pruning never adds to the count.

When a deduplicating tool beats full copies

Full archives are easy to reason about and restore with nothing but tar. They're also wasteful when little changes. Suppose only 200 MB of the 20 GB changes each day. Keeping every changed byte for a year would come to at most 20 + 0.2 × 365 = 93 GB, against 460 GB of full copies. That's our assumption for the change rate, not a measurement, so yours will differ.

restic does this and has the same schedule built in. We ran init, two backups, the forget below, restore and check with restic 0.19.1 on the same test copy, and all of them passed.

bash
export AWS_ACCESS_KEY_ID=TPS... AWS_SECRET_ACCESS_KEY=...
export RESTIC_REPOSITORY=s3:https://s3.tport.space/site-backups
export RESTIC_PASSWORD_FILE=/root/.restic-password

restic init        # once
restic backup /srv/site
restic forget --keep-daily 7 --keep-weekly 4 --keep-monthly 12 --prune

Three differences to plan for. forget alone frees nothing, which is why --prune is there. Its weeks run Monday to Sunday and it counts only periods that have a snapshot, so a gap doesn't use up your history. And a lost repository password means the data is gone, so store it away from the server.

Make a bucket for your backups, then run the script once by hand before you schedule it.

Explore tport.space

Sources, read 3 November 2026