{% extends "layout.html" %} {% set active_page = "export" %} {% set help_page = ["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_='form-control btn btn-default')}}

Export InfluxDB Database and Metastore as ZIP

This will create a ZIP file containing the InfluxDB meatastore and database containing all measurement data.

{{form_export_influxdb.csrf_token}}
{{form_export_influxdb.export_influxdb_zip(class_='form-control btn btn-default')}}

Import InfluxDB Database and Metastore from ZIP

This will allow a ZIP file containing the InfluxDB meatastore and database to be uploaded and overwirite the current Influxdb database of measurements. Again, all data will be replaced (i.e. destroyed) by the imported backup. It is advised to export your current data before importing a previous backup if you don't want to lose this data. In the future, there will be an option to combine imported data with the current data. InfluxDB and the Mycodo daemon (backend) will be stopped momentarily while the import takes place.

{{form_import_influxdb.csrf_token}}
{{form_import_influxdb.influxdb_import_upload(class_='form-control btn btn-default')}}

Export Mycodo Settings Data as ZIP

This will create a ZIP file containing the Mycodo settings database containing the Mycodo configuration and user information.

{{form_export_settings.csrf_token}}
{{form_export_settings.export_settings_zip(class_='form-control btn btn-default')}}

Import Mycodo Settings Data from ZIP

This will allow a ZIP file containing the Mycodo settings database to be uploaded and replace the current settings. Note: This will override all settings and user accounts and log you out from the web UI. A backup of the current database will be created in the database directory (~/Mycodo/databases/mycodo.db.backup_DATE_TIME).

{{form_import_settings.csrf_token}}
{{form_import_settings.settings_import_upload(class_='form-control btn btn-default')}}
{% endblock %}