From: Cheng-Ling Lai Date: Thu, 23 Apr 2026 08:26:15 +0000 (+0800) Subject: Update snbk documentation for snapper-sync X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6a9ab4ea6be1376bbc4c3c56b688a00db9745bb1;p=thirdparty%2Fsnapper.git Update snbk documentation for snapper-sync --- diff --git a/doc/snbk.xml.in b/doc/snbk.xml.in index 93c63288..bb384f0f 100644 --- a/doc/snbk.xml.in +++ b/doc/snbk.xml.in @@ -2,13 +2,13 @@ - 2026-01-16 + 2026-04-23 snbk 8 - 2026-01-16 + 2026-04-23 @VERSION@ Filesystem Snapshot Management @@ -140,6 +140,67 @@ + + Highest Snapshot Number Synchronization + + To avoid reusing snapshot numbers, 'snapperd' keeps the highest snapshot + folder (whether it is an empty snapshot or not) in .snapshots + directory, ensuring snapshot numbers remain unique at all times. + However, when performing a restore using various methods, the state of the highest + snapshot number may vary: + + + + Synchronized: The latest backed-up snapshot is restored to + .snapshots using `snbk restore` or manual Btrfs + send-receive. + In this case, the highest snapshot number is synchronized. + 'snapperd' creates snapshots with numbers greater than the restored snapshot, + preventing snapshot number collisions. + + + + Legacy: A restore is made with a previous but not the latest backed-up + snapshot. + In this case, the state of the highest snapshot number is not valid. + 'snapperd' would create snapshots with numbers lower than the latest backed-up + snapshot. + This could invalidate the backed-up snapshots created later than the restored + snapshot, and these invalid backed-up snapshots might be removed during the + automatic Snapper backup process. + + + + Legacy: When using a virtualization platform and the system is restored + from a virtual machine backup. + In this case, depending on the timing of the VM backup creation, the state of + the highest snapshot number might not be synchronized. + Snapshot number collisions might occur when 'snapperd' creates snapshots after + the VM boots up. + + + + + + To avoid snapshot number collisions, The Snapper Backup package provides a + 'snapper-sync' script, which can be triggered by `snapper-sync.service`, to + synchronize the highest snapshot number across the source and backup target devices. + Please consider enabling `snapper-sync.service` if any scenario related to 'Legacy' + might occur in your environment. + + If any custom systemd timer or service is configured, please consider adding + the following directives: + + +[Unit] +After=snapper-sync.service + + + This ensures systemd schedules the custom unit to run after the highest snapshot + number synchronization. + + +