Schnapps - basic questions on

Hi there,

I’ve checked the online documentation for Schnapps but could not find the following information:

  1. After using Schnapps to rollback to a snapshot from a few days ago, will Turris Omnia’s auto updater automatically reinstall updates that had occurred in the last few days (as evidenced by the pre and post update snapshots indicated when running Schnapps list)?

  2. If yes to above, how and when will the auto updater run?

  3. Can I safely delete for example, /mnt/snapshot-@31 that was created when i run Schnapps mount 31, after I have done what I needed to do? For example, after getting Schnapps to restore to 31?

Thank you!

Regards from Perth AU

Yes, that if no changes are being made, as to which packages to be installed/uninstalled, after the rollback.

The interval of checking for updates does not seem to be mentioned in the documentation, probably needs looking into the source code. Would expect some checking every 24 or 12 hours.

As for the how there is user control Turris Documentation

schnapps mount does not create snapshots. It only mounts an existing snapshot.

Not clear what you mean by

safely delete

schnapps delete will the delete specified snapshot #. Once done it cannot be restored to - if that is what you are asking.

Else, the edited/modified snapshot that been mounted can be manually demounted (umount), if that is what you mean instead.

1 Like

Updater runs six times a day. But precise times are randomized (inside 2-hour windows) to prevent server overload. See /etc/cron.d/updater and updater-supervisor --help for more info.

1 Like

There are system “cron” jobs in /etc/cron.d/ there is “schnapps” and “updater”. Updater is running schnapps before and after updating the system. Schnapps cron runs in parallel and makes extra snapshots. So you always have pre/post snapshots for easy rollback in case you don’t like correspond update/upgrade.

You can keep any snapshot you like, you can rollback to any snapshot you like. You can have 40 and rollback to 30 (which will create actually 41 as clone of 30) later you can choose to go back to 31 and you will get 42 as clone of 31. and again you can rollback from 42 to 41 creating 43 :slight_smile: and so on …

It is good practice to housekeep the schnapps time to time. Once you are fine with actual state of your TOS, call schnapps :slight_smile: , once you have stable ‘single/full’ snapshots, you can safely remove any other (pre/post/cron) in between stable ones.

note: any rollback take some time(10-30mins), any interruption of rollback and manual “via button” rollback one or two snapshots back take even longer time (over 40 minutes , depending on your setup), so be patient when waiting for blue/green led lights indicating finished bootup. Once i have to wait over hour (i was so nervous :)) …

EDIT: ad_delete: direct removal/delete of files/folder with schnapps data might cause some damage(and you might loose the option to rollback via “button” which is quite essential), i would not touch any files related to schnapps unless you know what you are doing. Use schnapps instead.

Rollback taking about half an hour? That’s a typo, right? I haven’t done many, but they were quite fast IIRC.

it happened to me twice in a row during TOS 3.9 to 3.10 update …if i remember correctly. sure normally it is pretty fast, those rare long rollback kind of teach me to be more patient,

Thanks for the response @anon50890781.

Sorry, let me explain my question again. If i run the command schnapps mount 31, this directory called /mnt/snapshot-@31 is created, which like you said mounts a the snapshot in /mnt. Can I "rm -rf /mnt/snapshot-@31* when I’ve finished doing what I needed to do?


No, you want schnapps delete 31. (Maybe you have to unmount it first, or it gets collected after unmounting; I don’t know.)

You certainly may do so for neat housekeeping but it needs to be clear what happens in what order.

If you do not umount the snapshot first and run rm -rf then the content of /mnt/snapshot-@X will be deleted but not the directory /mnt/snapshot-@ itself (since being mounted to).

In order to preserve the (snapshot) content you would need first to manually umount -v /mnt/snapshot-@X the (snapshot) content. Then you may remove the directory /mnt/snapshot-@X