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 restore IOT database

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

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

Script to restore from a mounted NAS directory

#!/bin/bash
set -x
#
# (c) DL2SBA 21.10.2018
#
# Restore a 1.4. InfluxDB
#
# Mount the network share
#
MOUNT_SOURCE="//192.168.2.242/backup"
MOUNT_TARGET="/mnt/backup"
MOUNT_USER=<user>
MOUNT_PASSWD=<pass>
umount -v /mnt/backup
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
TARGETDIR=$MOUNT_TARGET/INFLUX/' date +%Y%m%d_%H%M%S'
#
# backup to restore
#
TARGET_VERSION="20181021_050001"
influxd restore -metadir /influx-db/influxdb/meta /mnt/backup/$TARGET_VERSION
influxd restore -database iot -datadir /influx-db/influxdb/data /mnt/backup/INFLUX/$TARGET_VERSION
#
# unmount network share
#
umount -v /mnt/backup
#
# cleanup permissions
chown -R influxdb:influxdb /influx-db/influxdb

(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