From the latest stable version of openHAB (2.2) it would be easier for apt/yum/openHABian user to use the command:
sudo openhab-cli backup
Which places a file in /var/lib/openhab2/backups
, which can then be restored using:
sudo openhab-cli restore /var/lib/openhab2/backups/filename.zip
This backs up both text config from /etc/openhab
and PaperUI config from /var/lib/openhab/