InfluxDB 2.x: Backup and Restore: Unterschied zwischen den Versionen

Aus Wiki-WebPerfect
Wechseln zu: Navigation, Suche
(Die Seite wurde neu angelegt: „== Backup == <source lang="bash"> #Change user sudo su influxdb #Export environment variables export INFLUX_TOKEN=<INFLUXDB_ADMIN_TOKEN> export INFLUX_CONFIGS…“)
 
Zeile 2: Zeile 2:
 
<source lang="bash">
 
<source lang="bash">
 
#Change user
 
#Change user
sudo su influxdb
+
sudo su - influxdb
  
 
#Export environment variables
 
#Export environment variables

Version vom 16. März 2021, 15:35 Uhr

Backup

#Change user
sudo su - influxdb
 
#Export environment variables
export INFLUX_TOKEN=<INFLUXDB_ADMIN_TOKEN>
export INFLUX_CONFIGS_PATH=~/profile
export TIME=$(date + "%Y%m%d%H%M%S")
export BKR_DEST=/var/lib/influxdb/backup
 
#Check InfluxDB connection
influx config ls
 
#Start Backup
influx backup $BKR_DEST/bkr_full_$TIME


Compress & move Backup

Restore

Prepare archive for restore

Restore the Backup