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.
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
- It failed twice on the first try. Once, the script treated a routine message during connection as a fatal error and quit. Once, the key file’s permissions were too open and SSH refused to use it.
- Compute the checksum on both sides. A finished download isn’t the same as a correct one.
- The next step is a restore drill. A backup that has never been restored only “probably exists”.
