{% extends "layout.html" %} {% set active_page = "export" %} {% set help_page = ["https://kizniche.github.io/Mycodo/Export-Import/", _('Export Import')] %} {% block title %} - {{_('Export Import')}}{% endblock %} {% block head %} {% endblock %} {% block body %}
{% include 'flash_messages.html' %}

{{_('Export Import')}}

Export Measurement Data as CSV

This will export all measurements found within the date/time range in comma-separated value (CSV) format (as timestamp, measurement).

Note 1: Requesting large data sets may take a long time to process.

Note 2: Dates and times are stored in influxdb as UTC, therefore you will need to adjust to your time zone for the local time.

{{form_export_measurements.csrf_token}}
{{form_export_measurements.measurement.label(class_='control-label')}}
{{form_export_measurements.date_range.label(class_='control-label')}}
{{form_export_measurements.export_data_csv(class_='btn btn-primary')}}

Export InfluxDB Database and Metastore as ZIP

This will create a ZIP file containing the InfluxDB backup files containing all measurement data. These files are created with the "influxd backup -portable" command for version 1.x and the "influx backup" command for version 2.x. To restore a backup, refer to the InfluxDB documentation.

{{form_export_influxdb.csrf_token}}
{{form_export_influxdb.export_influxdb_zip(class_='btn btn-primary')}}

Export Mycodo Settings Data as ZIP

This will create a ZIP file containing the Mycodo settings database containing the Mycodo configuration and user information. It will also include any custom functions, inputs, outputs, and widgets.

{{form_export_settings.csrf_token}}
{{form_export_settings.export_settings_zip(class_='btn btn-primary')}}

Import Mycodo Settings Data from ZIP

WARNING: MAKE A MYCODO BACKUP BEFORE ATTEMPTING A SETTINGS IMPORT!

This will allow a ZIP file containing the Mycodo settings database and custom functions/inputs/outputs/widgets to be uploaded and replace the current settings. Only databases from Mycodo versions equal or prior to the current Mycodo version should be imported. There is no check for this, but if you attempt to import a database from a version higher than the current Mycodo version, there will likely be issues. There may also be issues if the custom controllers are incompatible with the Mycodo version you're importing in to.

Note 1: This will override all settings, user accounts, and custom functions/inputs/outputs/widgets, and log you out from the web UI. A backup of the current database will be created in the database directory (/opt/Mycodo/databases/mycodo.db.backup_DATE_TIME).

Note 2: During this process, the new database will be upgraded to the current Mycodo version and all unmet dependencies will be installed. This process can take a while to complete if there are a significant number of dependencies to install, so be patient.

{{form_import_settings.csrf_token}}
{{form_import_settings.settings_import_upload(class_='btn btn-primary')}}
{% endblock %}