Resend historical data to influxdb

I need to move my influxdb to a new server to start fresh. From this post you mentioned:

Dropping the database and recreating should give you a clean slate. When you restart the IoTaWatt, did you have the upload history from set prior to 17/03/2019?

You also provided the following steps:

  1. Click STOP in the influx tab of the status display.
  2. Wait for the status to change to stopped.
  3. In the IoTaWatt influx configuration:
    Set “upload history from” to 03/17/2019.
    Add a tag of “id” with value “iotawatt” to the tag set.
  4. Click START in the influx tab of the status display.

So what actually triggers the resending of historical data? Can I just set the “upload history from” date to 1/12/2021 which is prior to my History log start? Or is the step of “Add a tag of “id” with value “iotawatt” to the tag set” that triggers the resend of all the historical data? I’m currently not using tags. Or is there a simpler way of doing this? Thanks.

First, don’t overlook the ability to backup your current database and restore it to the new instance.

When starting the uploader, there are three dates to be aware of:

  1. The upload from date if you specified one.
  2. The beginning date/time of your current log.
  3. The date/time of the latest measurement that matches one of your specified upload measurements.
  • IoTaWatt will start posting after the latest of those three dates.

  • The History log is not used because it only has 1 minute data and most users upload shorter intervals.

  • When looking for the most recent measurements it queries the fully qualified measurements, including any and all keys associated with the measurements. You don’t need keys, but I recommend associating a unique key with all of the measurements from the IoTaWatt to disambiguate from any similarly named measurements from another IoTaWatt or any other source.

I cannot use DB backups as I had to restore my server a few times due to some stupid things I did!

Given my situation where my “upload from date” and “beginning date of current log” are both 1/13/2021 and I stopped the upload on 2/24/2021, IotaWatt will start posting as of 2/24/2021, correct?

So how do I get IoTaWatt to resend all my data from 1/13/2021 to the new influxdb server? Do I just add a new Tag key so it has a new set of fully qualified measurements? Is this the best way to trigger a resend? Will deleting the influxdb service in IotaWatt and re-creating it with the same measurements work as well? Thanks.

If I understand you correctly, you stopped uploading to the old server on 2/24 and have not uploaded to the new. So IoTaWatt will query the new server and find no prior data. Upload should then start at 1/31.