Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: How many root files can be rollbacked by Snapper?

  1. #1

    Default How many root files can be rollbacked by Snapper?

    I installed openSUSE 15.2 on a luks2 lvm btrfs, Snapper is enabled by default. After some root operations I tried to rollback the system to the earlier snapshot. I remember which softwares did not exist in the snapshot, but after rollback the unwanted softwares are not removed by Snappper.

    Can't Snapper remove the files in running? What files can/can't be removed by Snapper?

  2. #2
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    26,912

    Default Re: How many root files can be rollbacked by Snapper?

    I wonder what your ideas are about Btrfs and snapper.

    I seems you think that snapshots are taken whenever a bit changes in a file on a Btrfs subvolume.
    This is not the case. Snapshots must be made. And yes, when you use zypper/YaST to install software, snapshots are made. But when you e.g. change a character in a configuration file in /etc, a snapshot is not created automagicaly.
    Henk van Velden

  3. #3

    Default Re: How many root files can be rollbacked by Snapper?

    Quote Originally Posted by hcvv View Post
    I wonder what your ideas are about Btrfs and snapper. I seems you think that snapshots are taken whenever a bit changes in a file on a Btrfs subvolume. This is not the case. Snapshots must be made. And yes, when you use zypper/YaST to install software, snapshots are made. But when you e.g. change a character in a configuration file in /etc, a snapshot is not created automagicaly.
    The snapshot of subvolume I am referring to is made automatically every one hour by Snapper with default configuration, which can be seen in Snapper window. Do I need to boot into live USB for the rollback?

  4. #4
    Join Date
    Jan 2014
    Location
    Erlangen
    Posts
    1,773
    Blog Entries
    1

    Default Re: How many root files can be rollbacked by Snapper?

    Quote Originally Posted by pcxt View Post
    The snapshot of subvolume I am referring to is made automatically every one hour by Snapper with default configuration, which can be seen in Snapper window. Do I need to boot into live USB for the rollback?
    Snapshots are managed automatically, see "man snapper". Change settings at /etc/snapper/configs/root. For reverting to an older snapshot use "snapper rollback ..." and reboot.
    AMD Athlon 4850e (2009), openSUSE 13.1, KDE 4, Intel i3-4130 (2014), i7-6700K (2016), i5-8250U (2018), AMD Ryzen 5 3400G (2020), openSUSE Tumbleweed, KDE Plasma 5

  5. #5
    Join Date
    Sep 2012
    Posts
    5,853

    Default Re: How many root files can be rollbacked by Snapper?

    Quote Originally Posted by pcxt View Post
    I remember which softwares did not exist in the snapshot, but after rollback the unwanted softwares are not removed by Snappper.
    You need to explain how you check for the software existence (specific file or its content? RPM package? something else?) Copy-paste exact commands and their output you used to check for software and to perform rollback.

    Otherwise any response will be just guesswork.

  6. #6

    Default Re: How many root files can be rollbacked by Snapper?

    Quote Originally Posted by karlmistelberger View Post
    Snapshots are managed automatically, see "man snapper". Change settings at /etc/snapper/configs/root. For reverting to an older snapshot use "snapper rollback ..." and reboot.
    Never find "snapper rollback ..." option in Snapper interface...In fact, I select the snapshot, click show changes, then select all files, restore them all. is that the "rollback"?

  7. #7

    Default Re: How many root files can be rollbacked by Snapper?

    Quote Originally Posted by arvidjaar View Post
    You need to explain how you check for the software existence (specific file or its content? RPM package? something else?) Copy-paste exact commands and their output you used to check for software and to perform rollback. Otherwise any response will be just guesswork.
    Sorry I reinstalled openSUSE then. By the way, what is differences between "restore all files in Snapper" and "rollback"?

  8. #8
    Join Date
    Mar 2020
    Location
    São Leopoldo, RS, Brazil
    Posts
    231

    Default Re: How many root files can be rollbacked by Snapper?

    Quote Originally Posted by pcxt View Post
    Sorry I reinstalled openSUSE then. By the way, what is differences between "restore all files in Snapper" and "rollback"?
    A btrfs file system consists of subvolumes and snapshots (readonly or read/write), one of which is mounted to / by default when a subvolid isn't specified. Rollback simply sets a new default subvolume, which will be one of those readonly snapshot taken sometime before. Actually a new read/write snapshot is made from that readonly snapshot, and set as default subvolume. The state is reverted as one atomic operation. This is a btrfs basic feature.

    Find the current default rootfs:

    Code:
    btrfs subvolume get-default /
    "Restore selected files", as the label implies, lets you pick which files are restored, which means they need to be restored one by one. This is done by snapper itself.
    openSUSE Tumbleweed

  9. #9

    Default Re: How many root files can be rollbacked by Snapper?

    Quote Originally Posted by awerlang View Post
    A btrfs file system consists of subvolumes and snapshots (readonly or read/write), one of which is mounted to / by default when a subvolid isn't specified. Rollback simply sets a new default subvolume, which will be one of those readonly snapshot taken sometime before. Actually a new read/write snapshot is made from that readonly snapshot, and set as default subvolume. The state is reverted as one atomic operation. This is a btrfs basic feature. Find the current default rootfs:
    Code:
    btrfs subvolume get-default /
    "Restore selected files", as the label implies, lets you pick which files are restored, which means they need to be restored one by one. This is done by snapper itself.
    openSUSE installer defaultly presets some subvolumes with COW disable for performance reason, and both /boot and /boot/efi are not btrfs, only change the rootfs default subvolume is enough to the whole / (except /home)? Last year I changed the default subvolume to the snapshot made by Snapper then made errors on Snapper.

  10. #10
    Join Date
    Jan 2014
    Location
    Erlangen
    Posts
    1,773
    Blog Entries
    1

    Default Re: How many root files can be rollbacked by Snapper?

    Quote Originally Posted by pcxt View Post
    Never find "snapper rollback ..." option in Snapper interface...In fact, I select the snapshot, click show changes, then select all files, restore them all. is that the "rollback"?
    There is "yast2 snapper" and there is "snapper". From "snapper --help":

    Code:
      Rollback:
            snapper rollback [number]
    
        Options for 'rollback' command:
            --print-number, -p              Print number of second created snapshot.
            --description, -d <description> Description for snapshots.
            --cleanup-algorithm, -c <algo>  Cleanup algorithm for snapshots.
            --userdata, -u <userdata>       Userdata for snapshots.
    You may rollback to any of the known snaphots:

    Code:
    erlangen:~ # snapper list
        # | Type   | Pre # | Date                     | User | Used Space | Cleanup | Description            | Userdata     
    ------+--------+-------+--------------------------+------+------------+---------+------------------------+--------------
       0  | single |       |                          | root |            |         | current                |              
    1629* | single |       | Wed Jul 29 04:45:52 2020 | root | 176.00 KiB |         | writable copy of #1623 |              
    1630  | pre    |       | Thu Jul 30 05:58:23 2020 | root | 311.16 MiB | number  | zypp(zypper)           | important=no 
    1631  | post   |  1630 | Thu Jul 30 05:59:00 2020 | root |  13.02 MiB | number  |                        | important=no 
    1632  | pre    |       | Fri Jul 31 05:24:28 2020 | root |  15.33 MiB | number  | zypp(zypper)           | important=no 
    1633  | post   |  1632 | Fri Jul 31 05:26:45 2020 | root |   7.34 MiB | number  |                        | important=no 
    1634  | pre    |       | Fri Jul 31 20:32:05 2020 | root |   6.52 MiB | number  | zypp(zypper)           | important=yes
    1635  | post   |  1634 | Fri Jul 31 20:33:27 2020 | root |  11.77 MiB | number  |                        | important=yes
    1636  | pre    |       | Sat Aug  1 05:43:10 2020 | root |   1.12 MiB | number  | zypp(zypper)           | important=no 
    1637  | post   |  1636 | Sat Aug  1 05:43:26 2020 | root |   1.69 MiB | number  |                        | important=no 
    1638  | pre    |       | Sun Aug  2 06:16:02 2020 | root |   9.20 MiB | number  | zypp(zypper)           | important=yes
    1639  | post   |  1638 | Sun Aug  2 06:18:16 2020 | root |   2.28 MiB | number  |                        | important=yes
    1640  | pre    |       | Sun Aug  2 07:10:47 2020 | root | 512.00 KiB | number  | yast snapper           |              
    1641  | post   |  1640 | Sun Aug  2 07:12:21 2020 | root | 144.00 KiB | number  |                        |              
    erlangen:~ #
    AMD Athlon 4850e (2009), openSUSE 13.1, KDE 4, Intel i3-4130 (2014), i7-6700K (2016), i5-8250U (2018), AMD Ryzen 5 3400G (2020), openSUSE Tumbleweed, KDE Plasma 5

Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •