Backup and restore SiteWise Edge gateways
This topic covers how to restore SiteWise Edge gateways and backup your metric data. If you are experiencing issues with a broken SiteWise Edge gateway on the same machine and need to troubleshoot the issue, please read the Amazon IoT SiteWise documentation Troubleshooting SiteWise Edge gateway issues.
Note
The guidance covered in this topic is for SiteWise Edge gateways installed on Amazon IoT Greengrass V2 version 2.1.0 or higher.
Daily backups of metric data
Creating a back up is important, if you would like to transfer or restore the data on a new machine. Backing up your data greatly reduces the risk of loss of operating data during a transfer or restoration process.
The influxdb folder path is as follows:
We recommend that you backup the whole folder with everything underneath it.
We recommend that you periodically backup your metric data from the 1.0 SiteWise Edge to either an external hard drive or to the Amazon cloud.
Restore a SiteWise Edge gateway
Use the following procedure to a restore a SiteWise Edge gateway:
Use the installation script downloaded when you create SiteWise Edge gateway to restore the SiteWise Edge gateway on the new machine. Read the Installing the SiteWise Edge gateway software on your local device procedure to setup the SiteWise Edge gateway.
If you lose or cannot find the installation script, please contact Amazon Customer Support
. Once the SiteWise Edge gateway has been installed, log into the Amazon IoT Greengrass console
. To redeploy the components, navigate to Manage then under Amazon IoT Greengrass devices select Core devices.
In the Amazon IoT Greengrass core devices table select the core device corresponding to your SiteWise Edge gateway.
Once on the device page, open the Deployments tab and select your Deployment ID, this will open the Deployments page with your selected ID.
Once you are on the Deployments page, in the top right press the Actions button, and select the Revise option. to initiate a new deployment. Configure the deployment. If you would like to keep the deployment as it is, skip to Review and Deploy.
Wait for the Deployment Status to become
Completed
.Note
It will also take a few minutes for all components on the SiteWise Edge to fully setup and running.
Restore Amazon IoT SiteWise data
Use the following procedure to restore data on a new machine.
Copy the
influxdb
folder to the new machine.Stop the SiteWise EdgeProcessor component, by running the following command in your terminal:
Locate the path where you backed up your data, and run the following command:
Restart the SiteWiseEdgeProcessor component:
Validate successful backups and restorations
Use this procedure validate your backed-up data and SiteWise Edge gateway restorations.
Note
This procedure requires that you have installed Amazon OpsHub for Amazon IoT SiteWise. For more information see, Managing SiteWise Edge gateways using Amazon OpsHub for Amazon IoT SiteWise.
Open Amazon OpsHub for Amazon IoT SiteWise.
On the SiteWise Edge Gateway Settings page, check the status of each component listed in the Components table. Verify that the status color is green and the readout displays RUNNING.
Validate your past data on the portal dashboard to check that the past data and the new data are both properly setup. There will be a downtime between past and new data. You should except to see a duration where no data points are collected.
If you run into issues with backing up or restoring a SiteWise Edge gateway see the following troubleshooting topics Troubleshooting an Amazon IoT SiteWise Edge gateway.