Infra · 2026 · Jasa

A backup has to leave the machine

The server always had backups, but they sat on the same disk as the site. Now it packs one bundle a day, and the computer at home comes to fetch it.

The old backups only changed folders

The server backs up the site, the admin and every app’s database each day. The trouble is that those backups live on the same machine and the same disk as the site. If the machine really fails, the site and its backups go together.

Two times a day

At 4:40 in the morning, the server packs everything important into one archive, a little over 300 MB, and keeps only three days of them itself. Databases aren’t packed as-is: each one is first copied with its own backup feature into a complete snapshot, so the bundle never holds a half-written file.

At 5:30, the computer at home fetches the bundle and compares it with the checksum the server computed. Only a match counts, and it keeps fourteen days locally.

04:40 pack3 days on serverCheck sumscomputed twice05:30 home14 days at home
A bundle stays on the server for three days, and for two weeks once it’s home.

Home pulls; the server doesn’t push

The computer at home pulls the bundle; the server never pushes it out. Pulling uses a read-only account that can do exactly one thing, download. It can’t change files or run commands. Even if that key were lost, someone could only get the backups, not touch the server.

The bundle includes every service’s configuration, so the backup folder at home is readable only by administrators.

What I took away

← All notes