Snapper only making "pre" snapshots

Hi,

How do I configure snapper to take pre AND post snapshots?

Sometime ago I reinstalled Tumbleweed on my computer. For some reason the new install didn’t make any snapshots. Once I set it to make automatic snapshots, I’ve noticed that it only makes “pre” snapshots, in contrast to my old system where it would make pre and post snapshots everytime I ran zypper dup.

Any advice on what I need to do?

If it is of any help, this is how my /etc/snapper/configs/root file looks like:


# subvolume to snapshot
SUBVOLUME="/"

# filesystem type
FSTYPE="btrfs"


# btrfs qgroup for space aware cleanup algorithms
QGROUP=""


# fraction of the filesystems space the snapshots may use
SPACE_LIMIT="0.5"

# fraction of the filesystems space that should be free
FREE_LIMIT="0.2"


# users and groups allowed to work with config
ALLOW_USERS=""
ALLOW_GROUPS=""

# sync users and groups from ALLOW_USERS and ALLOW_GROUPS to .snapshots
# directory
SYNC_ACL="no"


# start comparing pre- and post-snapshot in background after creating
# post-snapshot
BACKGROUND_COMPARISON="yes"


# run daily number cleanup
NUMBER_CLEANUP="yes"

# limit for number cleanup
NUMBER_MIN_AGE="1800"
NUMBER_LIMIT="50"
NUMBER_LIMIT_IMPORTANT="10"


# create hourly snapshots
TIMELINE_CREATE="no"

# cleanup hourly snapshots after some time
TIMELINE_CLEANUP="yes"

# limits for timeline cleanup
TIMELINE_MIN_AGE="1800"
TIMELINE_LIMIT_HOURLY="10"
TIMELINE_LIMIT_DAILY="10"
TIMELINE_LIMIT_WEEKLY="0"
TIMELINE_LIMIT_MONTHLY="10"
TIMELINE_LIMIT_YEARLY="10"


# cleanup empty pre-post-pairs
EMPTY_PRE_POST_CLEANUP="yes"

# limits for empty pre-post-pair cleanup
EMPTY_PRE_POST_MIN_AGE="1800"


There was a bug which resulted in snapper creating pre snapshots only. This is fixed in 20200205.

erlangen:~ # snapper list
   # | Type   | Pre # | Date                     | User | Used Space | Cleanup | Description           | Userdata     
-----+--------+-------+--------------------------+------+------------+---------+-----------------------+--------------
  0  | single |       |                          | root |            |         | current               |              
590  | single |       | Tue Feb  4 14:01:28 2020 | root |   1.97 MiB |         | writable copy of #567 |              
591  | single |       | Fri Feb  7 21:48:16 2020 | root |  79.34 MiB | number  | rollback backup       | important=yes
592* | single |       | Fri Feb  7 21:48:16 2020 | root |  11.88 MiB |         | writable copy of #590 |              
593  | pre    |       | Sat Feb  8 10:59:16 2020 | root | 992.00 KiB | number  | zypp(zypper)          | important=no 
594  | post   |   593 | Sat Feb  8 10:59:17 2020 | root |  96.00 KiB | number  |                       | important=no 
595  | pre    |       | Sat Feb  8 12:10:38 2020 | root | 160.00 KiB | number  | zypp(zypper)          | important=no 
596  | post   |   595 | Sat Feb  8 12:10:46 2020 | root | 880.00 KiB | number  |                       | important=no 
erlangen:~ # 

That explains it.

I just did an upgrade after reading your post, and snapper has created a pre and post snapshot without me having changed any configurations.

Problem solved :slight_smile: