Is it possible to update the Android version 7.1.2 on my galaxi s7 edge to, for example, android 8? This is because of an application that should run on at least version Android 8 in a few months?
you are talking about upgrade, not update.
as you already have TWRP installed, only point (8) is necessary for you.
… further detail Install /e/ on a Samsung Galaxy S7 Edge - “hero2lte”
Custom recovery (not required if you already have it running on your phone)
/e/OS build : Oreo dev
/e/OS build : Nougat stable
To understand the difference between /e/OS builds check this guide
Just to be clear. I now have E/OS 7 and would like to go to E/OS 8, this process is clear.
However, I absolutely do not want to lose my data. How can I secure a backup of my data and restore it after upgrading to E/OS 8?
Which tool should I use? Unfortunately, I have no knowledge of the Android system.
Device tree will be different, so restoring a TWRP /Data partition (exclude device storage) backup could fail to restore your apps and data in-apps
There is a workaround :
In revanche, the content of your device storage (your files) is easy to copy to your computer and re-paste into the device after upgrading.