How to change the backup location?


i have configured a daily backup with this command:

openhab-cli backup

now i woult like to change the location where the backup-files are stored.

i already tried it with this command:

openhab-cli backup /folder1/folder2/

but the result is, that the backup-file is stored at this path: /folder1/
of course, i could change the command to:

openhab-cli backup /folder1/folder2/

but in this case i lose the timestamp at the zip-file.

Could you please help me to change the backup-location in a way i still get the timestamp at the backup-file?


Try this command:
openhab-cli backup /folder1/folder2/openhab2-backup-$(date +"%y_%m_%d-%H_%M_%S").zip

This will make the filename appear like the default filename, at your own folder.
See also “man date”, for other formatting options.



thanks for the trick ! ::wink: