System Rollback

Snapshot & Restore

Use the System Rollback Dashboard to create, annotate, restore, and delete system snapshots within seconds. One may also protect and compare snapshots, enable automatic snapshots, show snapshot sizes, free up disk space, and monitor partition health.

Snapshots are not are not traditional backups, but are instead coherent, “point-in-time” BTRFS images of the root and /boot filesystems and do not include the /home directory. One may, for example, take a snapshot before installing many software packages and then roll back afterwards to quickly and completely restore the prior state.

System Rollback is available on all 24.04 LTS (Noble) systems with BTRFS filesystems. It is not available for other filesystems or prior versions of Kubuntu.

Quickly restore system changes with System Rollback Dashboard.

Quickly restore system changes with System Rollback Dashboard.

Please read the disclaimer before proceeding. We review and update guided solutions regularly. If you have suggestions or requests, please write support@kfocus.org.

Launch System Rollback Dashboard

System Rollback DashboardLaunch the System Rollback Dashboard by clicking the System Rollback Dashboard icon next to the system tray, or click Start Menu > Kubuntu Focus Tools > System Rollback Dashboard. If neither of these options exist, the system does not support System Rollback.

Open the System Rollback Dashboard from the menu or icon.

Open the System Rollback Dashboard from the menu or icon.

Create Snapshots

You can always create a new snapshot using the System Rollback Dashboard. You may also enable automatic snapshots that are taken just before normal software upgrades.

Create a New Snapshot

Open the System Rollback Dashboard, and click the [ Create New Snapshot ] button under Global Actions. Confirm that you are ready to create a snapshot by clicking [ Take Snapshot ], then enter your password. Snapshot creation usually only takes a couple of seconds.

Authorize creation of a snapshot.

Authorize creation of a snapshot.

Enable Automatic Snapshots

Open the System Rollback Dashboard, and click the [ Automatic Snapshots ] switch under Global Actions, then enter your password.

Toggle automatic snapshots.

Toggle automatic snapshots.

Automatic Snapshots Pros and Cons

Pros:

Cons:

Protect a Snapshot

System Rollback keeps up to 5 unprotected snapshots, after which it will “trim” (delete) older snapshots to minimize disk use. If, however, one elects to protect a snapshot, it will not be automatically deleted.

To protect a snapshot, open the System Rollback Dashboard, and click select a snapshot from the list. Then click the [ Protect ] switch on the right side of the window. Finally, click the [ Save ] button in the lower-right corner of the window, and provide your password. A lock icon will now appear next to the snapshot to show it is protected.

Protect a snapshot to keep it from being deleted.

Protect a snapshot to keep it from being deleted.

Restore a Snapshot

Snapshot restoration returns your boot and root filesystems to their state at the time of the snapshot. This reverts all files on the system to an earlier state, except for:

While most user data is stored underneath /home, some applications, most notably database engines and web servers, will store or encourage the user to store data somewhere outside of /home. Unless this data is stored on a secondary or external drive, it will be reverted along with system files. To avoid data loss, System Rollback creates a pre-rollback snapshot immediately before restoring a snapshot. This allows you to recover up-to-date versions of reverted files if necessary.

1. Open the System Rollback Dashboard.

2. Click on the snapshot you wish to restore.

3. On the right side of the window, click [ Restore ].

4. Save all your open work, then click [ Restore ]. Enter your password when prompted, and the system will them immediately reboot. and enter your password when prompted. The system will then immediately reboot.

5. After the reboot and after you sign in, the system will show a confirmation dialog showing rollback success. Click [ OK ] to dismiss the notice, or click [ More Info ] for guidance on how to compare the system's restored state to its previous state.

Select and restore a snapshot.

Select and restore a snapshot.

Other Features

In addition to creating and restoring snapshots, System Rollback provides several functions for managing snapshots and keeping the filesystem maintained. All of these features are accessible from the System Rollback Dashboard, and are well-documented in the dashboard itself. You can access System Rollback Dashboard's internal help by clicking on the (i) buttons next to the Global Actions, Partition Health, and Snapshots headers.

Compare

Compares two snapshots to each other, or compares a snapshot with the current system state. This can be used to find files on the root filesystem that were modified, lost, or restored over time.

Delete

Deletes the selected snapshot. This is useful for purging a snapshot that is consuming excessive disk space, or for clearing out unneeded snapshots to prevent useful ones from being trimmed automatically. If a snapshot is protected, you must disable protection before you can delete it.

Edit

Unlocks the name and description text fields for editing. This is useful for storing arbitrary information about a snapshot for future reference.

Show Snapshot Sizes

Calculates the unique space taken up by each snapshot, and displays it in the user interface. This is only done on user request due to the amount of time needed to calculate the used space. Use this to find large snapshots that can be deleted to free up space.

Free Up Disk Space

Allows the user to run filesystem maintenance on the root and boot filesystems. A quick clean will reorganize data on the disks, maximizing unallocated space for future use. A deep clean will additionally delete all snapshots, reclaim unreachable space, and defragment heavily fragmented files, providing better performance and more disk space.

Run System Rollback without a GUI

If the system cannot start a graphical desktop, but allows you to log in via a virtual terminal, you may access System Rollback through the CLI. This is useful if a failed update or deleted file is preventing KDE Plasma from starting. The CLI user interface does not use the same visual layout as the System Rollback Dashboard, but it provides access to most features.

1. Switch to a virtual terminal by pressing [CTRL][ALT][F3].

2. Log in with your username and password.

3. Run /usr/lib/kfocus/bin/kfocus-rollback to launch System Rollback Dashboard.

4. Use the arrow keys and [Tab] for navigation. Select items using [Space].

Run System Rollback without a GUI.

Run System Rollback without a GUI.

Troubleshooting

Q: What is the difference between free and unallocated space?

A: BTRFS handles data in “blocks”, and it allocates empty blocks for use when data is written to the disk. When all data in a block is deleted or moved, the BTRFS de-allocates that block. All unallocated space is free, but not all free space is unallocated.

If unallocated space is exhausted, the system may not write data to the disk even if free space is still available. It is crucial, therefore, to always maintain a reasonable buffer of unallocated space. On Kubuntu Focus systems, you will receive a warning if unallocated space on either your root or boot filesystems is getting low.

Q: How do I free up unallocated space on the system?

A: To increase unallocated space on the main (/) filesystem, one can remove large software packages, data files, or database containers. On the boot (/boot) filesystem, one can purge unused kernels. You may also [ Show Snapshot Sizes ] to identify and delete snapshots that are taking up space. After deleting snapshots, a reboot can open up more file space because it clears open file handles.

To open up more space, you can use [ Free Up Disk Space ] > [ Quick Clean ] which will optimize disk usage. Finally, one may erase all snapshots and optimize the disk using [ Free Up Disk Space ] > [ Deep Clean]

Revisions

This is a partial revision history. See the git repository for all entries.

Disclaimer

We try hard to provide a useful solution validated by professionals. However, we cannot anticipate every situation, and therefore cannot guarantee this procedure will work for your needs. Always backup your data and test the solution to determine the correct procedure for you.

THIS SOLUTION IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOLUTION, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

HAVE QUESTIONS?Call 844-536-2871 or write
TellMeMore@kfocus.org   |  GET FOCUS MERCH