Preserving and restoring a snapshot via command line

Restore a snapshot using FreedomBox web interface:

  1. Goto System → Storage Snapshots → Manage Snapshots tab.
  2. Look the list of snapshots and choose the one that you think was in working shape. “timeline” shapshots are taken every hour, daily, weekly and monthly. “apt” snapshots are taken just before and after any package installation (this includes package upgrades and whole system upgrade such as from ).

Restore a snapshot from command line:

  1. Connect to FreedomBox terminal via SSH or Cockpit web interface. If your FreedomBox is connected to a monitor and keyboard, you can also login via terminal.
  2. Login as an user with ‘admin’ group and run sudo su - to get superuser privileges.
  3. Run snapper list to see the list of all snapshots to the root file system. The option -c root is implied in this case. You should see output something like this:
129  | single |       | Sun 11 Jun 2023 01:39:05 AM GMT | root | timeline | timeline    |         
134  | single |       | Mon 12 Jun 2023 02:36:21 AM GMT | root | timeline | timeline    |         
151  | pre    |       | Mon 12 Jun 2023 06:00:29 PM GMT | root | number   | apt         |         
152  | post   |   151 | Mon 12 Jun 2023 06:00:34 PM GMT | root | number   | apt         |         
157  | single |       | Tue 13 Jun 2023 12:00:00 AM GMT | root | timeline | timeline    |         

Each line is a snapshot. Notice the snapshot’s details and choose the snapshot you which to restore to. The number on the left most column is the snapshot’s identification number. Note that down.

  1. Run snapper --ambit classic rollback <snapshot_number>. Replace <snapshot_number> with the snapshot identification number you noted in the previous step.
1 Like