Skip to content
Now boarding New: Mobile & Desktop platform and an open-fare snippet depot — pay €1 to €100. See new lines Code WELCOME10 takes 10% off your first ticket · 14-day refund

Line KJ-114 Platform 4 · Automation & CLI Tools

Night Train Backup Scripts

Battle-tested Bash scripts for nightly database and file backups to S3-compatible storage, with restore drills.

Rated 5.0 out of 5 from 1 review 309 builders

MS Maintained by Mateo Silva

  • Last updated October 2026
  • English
  • 37m of walkthroughs
  • 14 files

What you get

5 items in the box

Every bullet below is in the download, working, the moment your payment clears.

  • Nightly MySQL, PostgreSQL and file backups
  • Client-side encryption before upload
  • Retention pruning on S3-compatible storage
  • Automatic weekly restore drills
  • Failure alerts to email, Slack or a webhook

What's in the box

4 parts · 14 files · 37m of walkthroughs

4 files with a 10m walkthrough video. This part is documented in the architecture guide, with notes on every decision and how to change it for your own project.

The full file tree and the walkthroughs are in your download, available straight after checkout.

3 files with a 8m walkthrough video. This part is documented in the architecture guide, with notes on every decision and how to change it for your own project.

The full file tree and the walkthroughs are in your download, available straight after checkout.

4 files with a 12m walkthrough video. This part is documented in the architecture guide, with notes on every decision and how to change it for your own project.

The full file tree and the walkthroughs are in your download, available straight after checkout.

3 files with a 7m walkthrough video. This part is documented in the architecture guide, with notes on every decision and how to change it for your own project.

The full file tree and the walkthroughs are in your download, available straight after checkout.

4 parts · 14 files

37m total length

You will need

Short list, and deliberately so. If you meet these you can start today.

  • A Linux server with Bash and cron or systemd
  • An S3-compatible bucket

About this product

A backup you have never restored is a hope, not a backup. Night Train is a small set of Bash scripts that dump MySQL and PostgreSQL databases and application files every night, encrypt them, ship them to any S3-compatible bucket, prune old copies on a retention schedule — and, once a week, restore the latest backup into a scratch database and check that it worked.

Failures send an alert to email, Slack or a webhook. Everything runs from cron or a systemd timer and is written to be read: each script is under two hundred lines and commented throughout.

Frequently asked questions

Still unsure about something? Write to our contact page and a human answers, usually the same working day.

Any S3-compatible provider, including AWS S3, Backblaze B2, Cloudflare R2, Hetzner and MinIO.

Checkout is handled on our provider's secure payment page. The moment your payment clears we email your personal access link and access code to the address you used at checkout, and the same link appears in your account library. There is nothing to install and nothing to wait for.

Email within 14 days of your purchase, quote your order number, and we refund the full amount to your original payment method. No form to fill in and no questions about how much of the product you watched.

What builders say

Reviews are written by people who bought this product. We publish the critical ones too.

5.0

Rated 5.0 out of 5

Product rating · 1 review

Rating distribution

  • 5 stars 100%
  • 4 stars 0%
  • 3 stars 0%
  • 2 stars 0%
  • 1 star 0%
  • PK

    Peeter Kask

    Sysadmin

    Aug 2026
    Rated 5.0 out of 5

    The restore drill is the point

    The weekly restore check found that one of our older dumps had been silently truncated. Readable scripts, no dependencies, very happy.

Your maker

MS

Mateo Silva

Platform engineer, keeps the deploy lines running

  • 3,495 builders aboard
  • 12 products published
  • 4.6 maker rating
  • Docker
  • Terraform
  • Kubernetes
  • CI/CD
  • Observability

Mateo has run infrastructure for an e-commerce platform through four Black Fridays and a data-centre migration, which left him with firm opinions about rollbacks. He writes the DevOps recipes and backup scripts, and tests each one on a fresh server and a fresh cloud account before release. If a recipe has no undo, he does not consider it done.

€9 EUR

One-time payment · lifetime access

Timetable updates

New lines, first. One email when something departs.

Release notes for new products and major updates to the ones you own, plus launch fares for subscribers. No digest padding, unsubscribe in one click.

By subscribing you agree to our Privacy Policy.