Documentation
Backing up your data
On Margine you back up far less than on a normal distro, because most of the disk is either rebuildable or re-downloadable. The operating system is an atomic image — you can reinstall or roll it back any time, so it never needs a backup. Your code lives in ~/dev and is already on GitHub. Games, VM images and container layers are big but re-downloadable. What's actually irreplaceable is a small slice: your documents and media in ~/data, your app settings, and your game saves. This page sets up the pre-installed Déjà Dup to capture exactly that slice to an external disk — encrypted, scheduled, and skipping the heavy stuff — and flags the one folder people wrongly exclude and lose their saves.
Why backup is easy here
Two Margine design choices do most of the work for you:
- The OS doesn't need backing up. It's an atomic image. If the disk dies or an update misbehaves, you reinstall from the ISO or roll back a deployment (
ujust margine-updatestages the new one; the old one stays selectable in GRUB). Nothing in/usr,/etcdefaults, or the installed packages is yours to lose — it all comes back from the image. - Your home is sorted by intent already. The data/dev/scratch layout means the irreplaceable stuff is concentrated in
~/data, code is in~/dev(on GitHub), and~/scratchis disposable by definition. You're not hunting through eight scattered folders deciding what matters.
So a Margine backup is small: ~/data + your settings + your saves. Everything else is rebuildable.
What to keep vs. skip
| Keep (irreplaceable) | Skip (rebuildable / re-downloadable) |
|---|---|
~/data — documents, photos, media |
~/scratch — disposable |
~/.config — app settings |
~/.cache, ~/.npm — caches |
~/.var/app — Flatpak app data + saves |
~/.local/share/Trash — the bin |
~/.local/share/Steam/steamapps/compatdata — Proton game saves |
~/.local/share/Steam/steamapps/common — game binaries (17 GB+) |
~/.local/share/Steam/userdata — Steam saves/config |
~/.local/share/Steam/steamapps/{shadercache,downloading} |
~/.local/share/lutris — Lutris prefixes + saves |
~/.local/share/libvirt — VM disk images |
~/dev (optional — see below) |
~/.local/share/containers — podman images |
The pattern isn't "exclude games." It's exclude anything you could re-download or regenerate, keep the small precious stuff — even when the precious stuff sits right next to the heavy stuff (your Proton saves live one folder away from the 17 GB of game binaries).
Set it up with Déjà Dup
Déjà Dup ships pre-installed (it's the GNOME "Backups" app, and modern versions use the same restic engine under the hood). Plug in your external disk first, then:
- Open Backups (search "Backups" in the overview).
- Storage Location → Local Folder → pick a folder on your external disk. (The backup is encrypted by Déjà Dup itself, so the disk can be any filesystem — it doesn't need to be encrypted.)
- Folders to Back Up → leave it as Home (
~). We subtract the heavy stuff in the next step rather than hand-picking includes — that way a new app's settings get caught automatically. - Folders to Ignore → add the skip list (next section). Déjà Dup already ignores
~/.cacheand the Trash by default; you're adding the big app-data folders. - Turn on Back Up Automatically and set a frequency (daily is fine — incrementals are small and deduplicated).
- Set Keep to Forever or At least 6 months — restic deduplicates, so history is cheap.
- Click Back Up Now. On the first run it asks for an encryption password — pick a strong one and store it in your password manager. Without it the backup cannot be restored.
The "Folders to Ignore" list for Margine
Paste these into Folders to Ignore (adjust if you don't use Steam/Lutris/VMs):
~/scratch
~/.npm
~/.local/share/Trash
~/.local/share/Steam/steamapps/common
~/.local/share/Steam/steamapps/shadercache
~/.local/share/Steam/steamapps/downloading
~/.local/share/libvirt
~/.local/share/containers
That typically drops tens of gigabytes (on a gaming machine, 50 GB+) while keeping the backup to the part that actually matters.
The one trap: don't exclude compatdata
It's tempting to ignore all of ~/.local/share/Steam/steamapps to skip the big common folder. Don't. Right next to the binaries is compatdata/ — the Proton/Wine prefixes that hold the saved games for every Windows title you play. For games without Steam Cloud, that folder is the only copy of your progress. Exclude common, shadercache and downloading by name; leave compatdata and userdata in.
About ~/dev
It's optional. Your repos are on GitHub, so the committed history is safe without a backup. Keep ~/dev in the backup if you want uncommitted/unpushed work protected too (usually small). If a repo has a bloated node_modules, target/, or .venv, add just that path to Folders to Ignore — it rebuilds from the lockfile.
Restore
Open Backups → Restore, pick a date, and choose where to put the files (over the originals, or into a folder to cherry-pick). You'll need the encryption password.
For a full machine rebuild the order is: reinstall Margine from the ISO → log in (the data/dev/scratch layout is recreated automatically) → Déjà Dup Restore your ~/data, settings and saves → reinstall games (Steam re-downloads the binaries; your saves are already back from compatdata/userdata). The OS and apps come from the image; only your data comes from the backup.
Verify it actually works
A backup you've never restored is a hope, not a backup. After the first run, do a one-file test: Restore a single document into a throwaway folder and confirm it opens. Re-check after any change to the ignore list.