This is the new version of my old website. You can find the old website here: old.dl2sba.com. If you miss any information or you find bugs, please let me know by E-Mail

Simple full backup IOT database

*** This applies for 1 1.4 version influxDB ***

see https://docs.influxdata.com/influxdb/v1.4/administration/backup_and_restore/

Script for backup to mounted NAS directory

#!/bin/bash
set -x
#
# (c) DL2SBA 25.08.2018
#
# Unmount the shar
#
umount -v /mnt/backup
#
# Mount the network share
#
MOUNT_SOURCE="//<ipadr>/backup"
MOUNT_TARGET="/mnt/backup"
MOUNT_USER="<user>"
MOUNT_PASSWD="<pass>"
mount -v -t cifs -o user=$MOUNT_USER,password=$MOUNT_PASSWD,rw,file_mode=0777,dir_mode=0777,uid=$MOUNT_USER,gid=users $MOUNT_SOURCE $MOUNT_TARGET

#
# backup the influx database IOT
#
TARGETDIR=$MOUNT_TARGET/INFLUX/` date +%Y%m%d_%H%M%S`
influxd backup $TARGETDIR
influxd backup -database "iot" $TARGETDIR

#
# Unmount the network share
#
umount -v /mnt/backup

Daily backup

Add this line to the crontab of root

0 5 * * * /home/dietmar/bin/backupInflux.sh  | /usr/bin/logger -t influxbackup

 

 

 

(c) Dietmar Krause, DL2SBA 2026 Impressum Datenschutz
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Marketing
Set of techniques which have for object the commercial strategy and in particular the market study.
Quantcast
Save