A backup service that runs every night leaves a long trail in the journal, and the lines of tonight’s run sit right next to those of last night. Picking the right window with --since works, but it’s guesswork. Since systemd 257 journalctl can filter by invocation, and I find that a lot tidier.
Every time systemd starts a unit it gives that run its own invocation ID, and journalctl stores it with each line. -I shows the lines of the latest invocation only. With --invocation= you go back further: 0 is the latest, -1 the run before it, and so on. --list-invocations prints the runs it knows, with their IDs and the times of the first and last message:
journalctl -u backup.service -I
journalctl -u backup.service --invocation=-1
journalctl -u backup.service --list-invocations
The first command is my answer to “what did the last backup say?”, without scrolling past a week of older output. The second is for comparing it with the run before, when tonight failed and yesterday didn’t. Combine it with -b and the search stays inside that boot.
The caveat is the version. -I and --list-invocations arrived in systemd 257, so Debian 13 has them and Ubuntu 24.04 LTS, with systemd 255, does not. Run journalctl --version to check. An offset also needs a unit, so always pass -u (or --user-unit=) with it.
Further reading: journalctl(1) manual page