A node for backing up influx database using influxd backup
npm install node-red-contrib-influxdb-backupinfluxd backup.It creates a backup of the specified database in the configured folder, using portable mode.
See the Influxdb docs for influxd backup in order to understand exactly how influx backup/restore works. In particular note the section about configuring bind-address in influxdb.conf. The node has been tested using influxdb 1.8.0, at the time of writing it is unclear whether the backup command has changed for Influxdb 2.0.
If the Influx database is on a remote server then influx must also be installed on the machine running node-red, so that the influxd command is available.
Use the Node-RED Manage Palette menu option or run the following in your Node-RED user directory (typically ~/.node-red):
npm install node-red-contrib-influxdb-backup
locahost. May be configured as a string or as a message attribute.8088. May be configured as a string or as a message attribute.true then any previous backup files are deleted before the backup is run. May be configured as a boolean or provided as a message attribute (which must be boolean true or string "true", anything else is interpreted as false).true then the backup files (which are .tar.gz files) are unzipped after the backup is performed, then they are all renamed from the standard format YYYYMMDDTHHMMSSZ..tar.gz to ..tar . In addition the manifest file contents are adjusted for the modified filenames. This is useful when using a regular backup strategy that uses incremental backups or some form of deduplication such as Borg or Back In Time. Most of the files in the influx backup do not change at each backup, so the backup strategy does not need to make new copies of them (the timestamps will be different but the contents the same). It is necessary to unzip the files as the original gz files do differ each time, I imagine the gz file includes the timestamps of the embedded files, which will be different. May be configured as a boolean or provided as a message attribute (which must be boolean true or string "true", anything else is interpreted as false). gzip *.tar will suffice, then run the restore command as documented in the influx link earlier.msg.start. The string must be formatted exactly as defined in the Influxdb link above. For example "2020-06-01T12:00:00Z".msg.start is not provided then the backup will be from the earliest data in the database.msg.end. The string must be formatted exactly as defined in the Influxdb link above. For example "2020-07-01T12:00:00Z".msg.end is not provided then the backup will be up to the latest data in the database.code containing the return code. Zero implies success. This message will be sent when the operation is complete.