Browse Source

sysmocom-backup: Allow to back-up more files than the initial config

Creating a new file in /etc/sysmocom/backup.d/ that ends with .backup
will be read during the backup and then be restored. This way we can
easily extend the files to backup.
hfreyther/master-next
Holger Hans Peter Freyther 7 years ago
parent
commit
2045245f3a
  1. 11
      recipes-apps/sysmocom-backup/files/sysmocom-backup
  2. 2
      recipes-apps/sysmocom-backup/sysmocom-backup_1.0.bb

11
recipes-apps/sysmocom-backup/files/sysmocom-backup

@ -23,7 +23,18 @@ FILES="\
var/lib/osmocom/hlr.sqlite3 \
etc/lcr \
etc/udhcpd.conf \
etc/sysmocom/backup.d \
"
# Pick some extra files
if [ -e /etc/sysmocom/backup.d/ ]; then
for extra in `ls /etc/sysmocom/backup.d/*.backup`;
do
echo "Add extras from $extra."
FILES="$FILES `cat $extra`"
done
fi
DATE=`date +%Y%m%d`

2
recipes-apps/sysmocom-backup/sysmocom-backup_1.0.bb

@ -1,7 +1,7 @@
DESCRIPTION = "sysmocom config backup and restore scripts"
LICENSE = "GPLv3+"
LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58"
PR = "r11"
PR = "r12"
SRC_URI = "file://sysmocom-backup file://sysmocom-restore"
RDEPENDS_${PN} = "tar"

Loading…
Cancel
Save