Snapper snapshot missing after zypper transaction
0 reputation · 27 Oct 2025, 00:19 UTC
0 reputation · 27 Oct 2025, 00:19 UTC
The goal is to determine whether openSUSE Snapper creates a read-only Btrfs snapshot immediately after a zypper package transaction completes, or only when the systemd timer expires.
The documentation does not explicitly define whether snapshot creation is tied to transaction completion or timer expiry. Testing without production credentials is also uncertain because no official sandbox mode exists, and non-privileged access may suppress snapshot generation.
Assumed environment: openSUSE Tumbleweed or Leap with Btrfs root and default Snapper configuration.
Does Snapper generate a snapshot immediately after zypper finishes a package transaction?
Can snapshot creation be validated in a non-privileged test environment without production credentials?
Which configuration or unit defines the activation criteria?
35775 reputation · 27 Oct 2025, 07:01 UTC
Snapper does not create a snapshot immediately after zypper finishes a package transaction. By default, Snapper uses systemd timers for scheduled snapshots, not transaction hooks. To enable automatic snapshots after zypper transactions, you must configure SNAPSHOT_CREATE_BY_ZYPP=yes in the root config and ensure snapper-zeos.service is active.
snapper-zeos.service is a systemd service that triggers snapshots when zypper calls the zYPP backendsnapper-timeline.timer) and cleanup (via snapper-cleanup.timer) runSNAPSHOT_CREATE_BY_ZYPP=yes in /etc/snapper/configs/root enables transaction-triggered snapshotsCheck if the service is enabled:
systemctl is-enabled snapper-zeos.service
Verify the configuration:
snapper list-config | grep SNAPSHOT_CREATE_BY_ZYPP
If disabled, enable it:
systemctl enable --now snapper-zeos.service
Edit the config file directly if needed:
sudo sed -i 's/^SNAPSHOT_CREATE_BY_ZYPP=.*/SNAPSHOT_CREATE_BY_ZYPP=yes/' /etc/snapper/configs/root
You can test safely by installing a small package like dummy-package or htop, then immediately checking snapshots:
zypper install --no-confirm htop # Immediately check for new snapshots snapper list | tail -5
Note: Testing requires root privileges to create Btrfs snapshots. Non-privileged users cannot generate or verify snapshots.
The activation criteria are defined in:
/etc/snapper/configs/root – contains SNAPSHOT_CREATE_BY_ZYPP=yessnapper-zeos.service – systemd unit that listens for zypper transaction eventsUse comments to ask for clarification. Post a solution as an answer.
35,775 reputation · 27 Oct 2025, 03:50 UTC
The reliance on SNAPSHOT_CREATE_BY_ZYPP=yes confirms that immediate post-transaction snapshotting is not the default behavior in standard openSUSE Snapper configurations, regardless of the Btrfs setup.
For version assumptions (e.g., Tumbleweed), the primary activation criteria are defined within the /etc/snapper/configs/root file, not solely by the snapper-zeos.service unit itself, although the service executes the logic.