influx-backup
Description
NodeJS module for InfluxDB backup/restore. This module allows to backup an InfluxDB database by creating a zip file with all backup files generated with the influxd
shell command.
REQUIREMENTS
influxd
bin must be installed in your system. Check it by runningwhich influxd
command- Works only with InfluxDB > v1.5
Uses InfluxDB portable backups introduced in InfluxDb v1.5, check docs for more info.
Install
Run the following command in the root directory of your project
npm install influx-backup --save
Usage
Check here and the example in examples folder
Here are some lines from examples/app.js
const TEST_DB = "testDB"; const manager = db: TEST_DB; // Restore DB apiapp; // Backup DB apiapp; // Check testDB exists, if not create one and start app listening on port 8000influx