Rullst AcademyRullst Academy/Lesson
Applications with Rullst I · Lesson 13 / 14

Recover without erasing the present

A backup gains trust when we can actually use it.

Learning paths20 min

Let's discover together

  1. 1

    Save two missions and stop the server. Run cargo run --locked -- backup missions.db first-backup.db. The utility reads an existing database, checks integrity and schema and uses VACUUM INTO with a new destination. A wrong source name must fail, not create an empty database.

  2. 2

    Later add a third mission to the original database and stop again. Run restore first-backup.db rehearsal.db, prefixed with cargo run --locked --. The destination must be new: the tool refuses overwrite. The backup represents the two-mission moment, not the current state.

  3. 3

    Run verify rehearsal.db and then serve rehearsal.db with the same Cargo prefix. Check the two titles, priorities and states in the browser. Stop and return to serve missions.db: all three original missions should remain. Structural integrity without expected-content checks is insufficient.

  4. 4

    A same-disk copy is a rehearsal, not protection against losing the computer. VACUUM INTO can fail or be interrupted; trust it only after completion and checks. Do not copy only the main file of an active database without understanding journals/WAL.

Your application workbench

The kit includes a complete app to investigate and modify. The excerpt below explains this step; the editor contains the indicated file. Rullst Academy does not compile or run this server in your browser.

File to study and modify

NOTES.md

cargo run --locked -- backup missions.db first-backup.db
cargo run --locked -- restore first-backup.db rehearsal.db
cargo run --locked -- verify rehearsal.db
cargo run --locked -- serve rehearsal.db

Extract the kit to a new folder and open a terminal beside Cargo.toml. Use Rust 1.96+; the first build may download dependencies and take time. Then open http://127.0.0.1:3010. Stop with Ctrl+C and run again after editing.

cargo test --locked
cargo run --locked
My files and GitHub

Download your draft and replace the indicated file in your extracted copy. The editor saves one file in this browser; your account saves assessments and XP. The ZIP excludes your edits. GitHub sends only the confirmed file; use Git manually for the whole app, excluding databases, backups and secrets.

Official links and next step

✦
YOUR MISSION

Create a consistent snapshot, restore to another file and check content and integrity.

Now it's your turn

Discovery workshop

Decide before running

Create a consistent snapshot, restore to another file and check content and integrity.
Build your answers and check when you are ready.
A moment to understand

Which evidence supports a verified recovery?

I need a hint

Existence is not recovery. The check must show expected data returning without destroying the present.

Loading your journey…

Take it with you

Rehearse with fictional data, recording before/after and the active file. Try an existing destination and confirm it stays intact. Explain where you would keep an off-device copy without publishing databases to GitHub.

At your own pace

My files and GitHub

Every lesson can become your own record: code, notes or a practice plan. Saving a file to GitHub is optional and does not change your XP.

Student guide

The editor and downloads open when this lesson is available to your account. Check access below or return to the track map.

Checking your access to this lesson…

Rullstpetbot

AI can make mistakes. Check the lesson material.