-
Notifications
You must be signed in to change notification settings - Fork 1
Home
There are two config files that contain Storj network and InfluxDB connection information. The tool is designed so you can specify a config file as part of your tooling/workflow.
Inside the ./config
directory there is a db_property.json
file, with following information about your InfluxDB instance:
-
hostName
- Host Name connect to InfluxDB -
port
- Port connect to InfluxDB -
username
- User Name of InfluxDB -
password
- Password of InfluxDB -
database
- InfluxDB Database Name -
influxdExeutablePath
- Path to the influxd executable including the executble name
Inside the ./config
directory a storj_config.json
file, with Storj network configuration information in JSON format:
-
apiKey
- API Key created in Storj Satellite GUI -
satelliteURL
- Storj Satellite URL -
encryptionPassphrase
- Storj Encryption Passphrase. -
bucketName
- Name of the bucket to upload data into. -
uploadPath
- Path on Storj Bucket to store data (optional) or "/" -
serializedAccess
- Serialized access shared while uploading data used to access bucket without API Key -
allowDownload
- Set true to create serialized access with restricted download -
allowUpload
- Set true to create serialized access with restricted upload -
allowList
- Set true to create serialized access with restricted list access -
allowDelete
- Set true to create serialized access with restricted delete -
notBefore
- Set time that is always before notAfter -
notAfter
- Set time that is always after notBefore
Backups are iterated through and upload in 32KB chunks to the Storj network.
The following flags can be used with the store
command:
-
accesskey
- Connects to the Storj network using a serialized access key instead of an API key, satellite url and encryption passphrase . -
shared
- Generates a restricted shareable serialized access with the restrictions specified in the Storj configuration file. -
debug
- Download the uploaded backup files to local disk inside project_folder/debug folder.
Once you have built the project you can run the following:
$ ./connector-influxdb --help
$ ./connector-influxdb --version
$ ./connector-influxdb store --influx <path_to_influx_config_file> --storj <path_to_storj_config_file>
$ ./connector-influxdb store --accesskey
Create backup files from InfluxDB and upload them to Storj and generate a Shareable Access Key based on restrictions in storj_config.json
.
$ ./connector-influxdb store --share
$ ./connector-influxdb store --debug --influx <path_to_influx_config_file> --storj <path_to_storj_config_file>
NOTE: To restore database from the downloaded backup files after running
store
command with--debug
flag, you can run the following command:
influxd restore -portable -db <old-database-name> -newdb <new-database-name> -host localhost:8088 <path_to_downloaded_backup_files>
The project has been tested on the following operating systems:
* Windows
* Version: 10 Pro
* Processor: Intel(R) Core(TM) i3-5005U CPU @ 2.00GHz 2.00GHz
* InfluxDB version: v1.8.2
* macOS Catalina
* Version: 10.15.4
* Processor: 2.5 GHz Dual-Core Intel Core i5
* InfluxDB version: v1.8.2
* ubuntu
* Version: 16.04 LTS
* Processor: AMD A6-7310 APU with AMD Radeon R4 Graphics × 4
* InfluxDB version: v1.8.2