To make a Backup:
sudo openhab-cli backup --full
Move the backup zip file to PC or other device.
To restore the backup:
Place the backup zip file into the backups folder and stop OH,
sudo systemctl stop openhab2
To restore the backup use:
openhab-cli restore /path/to/zipped/backup (var/lib/openhab2/backups)
After that start up OH:
sudo systemctl start openhab2
This will backup
This way, the information about installed addons is backuped, but not the addons itself, so when installing openhab2 new, the actual version of the bindings will be installed.
The only things to backup in addition, are the manually installed addons.