GIS Cloud layers can be periodically exported locally on the computer. The only supported format is Shapefile.
The script for setting up the automatic backup of your data from GIS Cloud can be found here and the instructions are below. The first step is to download and unzip the script.
Generate new API key
API key is unique for each user and is used to identify the user and to check if the user has export permission on the layer.
- Open My Account in Map Editor.
- Open API Access tab.
- Type in a new name for the key in New API key description and click Add key.
Note: Copy the created key as you will need it later for the setup!
Find layer ID
Note that you can backup only layers for which you have the export permission.
- Open the map in which the layer is added.
- Go to the Layer Properties (Layers tab – Edit layer).
- Under General tab click More info button.
- Copy the layer ID as you will need it later in the setup!
Create a new task in Task Scheduler for Windows
In this example we will use the Task Scheduler to create the task for daily backup.
Task Scheduler is located in Control Panel – System and Security – Administrative Tools – Task Scheduler.
- Define the name of the backup task in the General tab.
- Create the trigger for initialization of the backup process.
- Create the action for the trigger.
- In the Program/script enter “wscript”
- In the Add arguments box copy the path to the script, API key, layer ID and path to the location in which data will be stored:
To create an action we will need an API key, layer ID, path to the script and path to the location in which data will be stored (more details can be found in “readme.txt” file).
e.g. “C:\Users\tihana\Desktop\GIS-Cloud-data-backup\GIS Cloud data backup\gc-export-shape.wsf” /layer:2224304 /apikey:3c01edddff7c5b913bcec1204c3dfd98 /dest:C:\Users\tihana\Desktop\streetlights_backup
- The path to the exported layer (/dest:C:\Users…) shouldn’t have any spaces as it causes the error when executing the script.
- Check if you copied all the quotes, all necessary spaces.
These steps will ensure that your backup is done by the defined parameters.
Test the script by clicking Run in Task Scheduler. In log.txt you can if the layer is sucessfuly downloaded.
The layer should be stored to the defined folder.
Note:It is necessary that the computer is turned on at the time of the backup.