This episode runs your first backup: `restic backup` with tags and exclude patterns so the backed-up data stays clean and organized. You will also learn to read the backup results through `restic snapshots`, `restic stats`, and `restic ls` to make sure the data is truly stored.

Your repository came to life in episode 3. Now comes the moment you have been waiting for: the first backup. In this episode you will not just run commands, but also learn to compose a clean backup — tags for organization, excludes to avoid junk, and verification that the snapshot is really stored.
The basic command is simple:
restic backup /home/user --tag dailyrepository 2223e26e6b opened (repository version 2)
no parent snapshot found, will read all files
files: 1234 new, 0 changed, 0 unmodified
dirs: 345 new, 0 changed, 0 unmodified
added to the repository: 1.234 GiB (790.456 MiB stored)
snapshot 8b0a7f2e savedNote the last line: the snapshot ID 8b0a7f2e is the identity used for every subsequent operation (restore, forget, etc.).
The line no parent snapshot found means this is the first backup with nothing to reference. The next backup uses the last snapshot as its parent, so restic can compare and only read the files that changed — this is what makes the second backup fast.
Tags are the main way to group snapshots, for example daily, weekly, or pre-deploy:
restic backup /var/www /etc/nginx --tag web --tag predeployTags are used for filtering in restic snapshots and for the restic forget policy (episode 8). Plan your tag taxonomy from the start: env, freq, data-type — for example --tag prod --tag daily --tag db.
Junk that gets backed up wastes storage and slows everything down. Use --exclude for small patterns:
restic backup /home/user \
--exclude="*.tmp" \
--exclude="/home/user/.cache" \
--exclude="/home/user/node_modules"For many patterns, store them in a file — easier to maintain and can be shared across backups:
*.tmp
*.log
.cache/
node_modules/
/var/cache/*restic backup /home/user --exclude-file=/etc/restic/excludes.txtExclude patterns follow Go's filepath.Match rules. Use a trailing slash (cache/) to make sure only directories are matched.
Tip
Don't back up /tmp or runtime directories that constantly change — the snapshot will grow without adding value. Decide your inclusions first (what must be saved), then exclude the rest.
restic snapshotsID Time Host Tags Paths
-------------------------------------------
8b0a7f2e 2026-08-13 09:00:00 web01 daily /home/userCombine it with tag and host filters: restic snapshots --tag daily, restic snapshots --host web01.
restic stats calculates data size from different points of view:
restic stats latestMain modes: --mode restore-size (total size if restored) and --mode raw-data (physical blob size in the repository) — the difference between them is dedup, which is covered in episode 6.
restic ls 8b0a7f2e
restic ls 8b0a7f2e --path /home/user/Documentsrestic ls shows every path in the snapshot; use --path to narrow it down. This is a quick way to verify that a specific file was really backed up.
After a backup, get into the habit of checking two things: the snapshot shows up in restic snapshots, and the size of the backed-up data makes sense. Full integrity verification (with data re-reading) is covered in episode 11 — but this quick check already saves many cases of "turned out the folder was never backed up".
restic backup <path> --tag <tag> stores a new snapshot; the snapshot ID is its identity.daily, prod, db) and filtering.--exclude inline or --exclude-file for many patterns.restic snapshots, restic stats, and restic ls are your daily verification lenses.In the next episode, episode 5, we learn the reverse: restore & file extract — restoring an entire snapshot into a target directory with restic restore, pulling a single file with restic dump, and partial restores with --include/--exclude. Backing up is only half the story; restoring is the real test.