Backup and restore InfluxDB database - lucoenergia/conluz GitHub Wiki
Backing up and restoring a database in InfluxDB 1.8 involves the following steps.
Backup a database
-
Make sure the InfluxDB service is running.
-
Run the following command to backup the database into an archive:
influxd backup -portable -database conluz_db /path/to/your/backup/directory/
Note: Replace '/path/to/your/backup/directory/' with your desired backup directory.
This command will create a set of '.tar.gz' files in the backup directory. These files represent your backup.
Restoring the database
-
Stop the InfluxDB service.
-
Use the following command to restore the database from the backup file:
influxd restore -portable -db conluz_db /path/to/your/backup/directory/
Note: Replace '/path/to/your/backup/directory/' with the directory where your backup files reside.
-
Start the InfluxDB service.
-
Verify the restoration by logging in to the InfluxDB and checking the restored data.
Check the official documentation for more specific details -> https://docs.influxdata.com/influxdb/v1/administration/backup_and_restore/#restore-a-specific-database