BackupManager

Backup manager instance.

new BackupManager(config: Object)
Parameters
config (Object) Manager object configuration.
Name Description
config.db string The name of the database
config.username string? InfluxDB user username
config.password string? InfluxDB user password
config.host string (default localhost) Host url where influxdb is running.
config.port number (default 8086) InfluxDB port.
config.tmp_folder string (default .tmp) Temporary folder path.
config.suffix string (default _bak) Backup database suffix.
config.retation string (default autogen) InfluxDB retation policy to backup.
config.port number (default 8088) InfluxDB backup port.
Instance Members
init()
createDir()
deleteDir(path)
backup(options?)
loadBackup()
restore(restore_path, fileName)
dropDatabase(name)

influxd

Creates a queue for influxd commands.

influxd(path: string, args: Array): Promise<boolean>
Parameters
path (string) The cwd path of influxd command (the directory where the command will be executed).
args (Array) Array of args to pass to the influxd command.
Returns
Promise<boolean>: a promise object that resolves once the influxd command has finished.

spawnProcess

Spawn an influxd process and calls resolve once ended.

spawnProcess(path: string, args: Array, resolve: Function, reject: Function)
Parameters
path (string) The cwd path of influxd command (the directory where the command will be executed).
args (Array) Array of args to pass to the influxd command.
resolve (Function) Function to call once the command has finished.
reject (Function) Function to call in case of errors.