Sidehistorik
...
Kodeblok | ||
---|---|---|
| ||
#!/bin/bash now=`date +"%Y_%d_%m"` /etc/init.d/openhab2 stop cd /etc/openhab2/ tar -cvzf /home/bnp/openhab-etc-$now.tgz /etc/openhab2/* cd /usr/share/openhab2/ tar -cvzf /home/bnp/openhab-usr-share-$now.tgz /usr/share/openhab2/* /etc/init.d/openhab2 start |
This simply dumps all files under /etc/openhab2 and /usr/share/openhab2 into 2 tar files with the current date, for easy recovery:
...