How to restore or rebuild Openhabian and loose as little as possible

Thanks for the reply.

Result:

sudo openhab-cli stop
[sudo] password for openhabian:

A systemd service configuration exists...
Use 'sudo /bin/systemctl stop openhab2.service' to stop an openHAB service
Stopping any instance of openHAB...
/var/lib/openhab2/tmp/port shutdown port file doesn't exist. The container is not running.

No messages.

Result:

sudo openhab-cli start

A systemd service configuration exists...
Use 'sudo /bin/systemctl start openhab2.service' to start an openHAB service
Launching an instance in this terminal..
Launching the openHAB runtime...

                          __  _____    ____
  ____  ____  ___  ____  / / / /   |  / __ )
 / __ \/ __ \/ _ \/ __ \/ /_/ / /| | / __  |
/ /_/ / /_/ /  __/ / / / __  / ___ |/ /_/ /
\____/ .___/\___/_/ /_/_/ /_/_/  |_/_____/
    /_/                        2.5.0-SNAPSHOT
                               Build #1566

Hit '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown openHAB.

Error in initialization script: /var/lib/openhab2/etc/shell.init.script: session is closed
Error in initialization script: /var/lib/openhab2/etc/scripts/shell.completion.script: session is closed
Error in initialization script: /var/lib/openhab2/etc/scripts/shell.colors.script: session is closed

(it now reports 2.5 because the last thing I did was use openhab-config to select snapshot.)