GIS Cloud layers can be periodically exported locally on the computer.

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.

Click here to download GIS Cloud backup 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.

    1. Open My Account in Map Editor.

 

backup1

 

    1. Open API Access tab.
    2. Type in a new name for the key in New API key description and click Add key.

 

manual1

 

Note: Copy the created key as you will need it later for the setup!

 

manual2

 

Find layer ID

Note that you can backup only layers for which you have the export permission.

    1. Open the map in which the layer is added.
    2. Go to the Layer Properties (Layers tab – Edit layer).
    3. Under General tab click More info button.

 

backup2

 

  1. 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 a daily backup.

Task Scheduler is located in Control Panel – System and Security – Administrative Tools – Task Scheduler.

    1. Define the name of the backup task in the General tab.

 

backup3

 

    1. Create the trigger for initialization of the backup process.

 

backup4

 

    1. Create an action for the trigger.

 

backup5

 

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 that you can find in gc-export folder).

  1. In the Program/script enter “wscript”
  2. In the Add arguments box copy the path to the script, API key, layer ID and a path to the location in which data will be stored:

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

3. Default export format is ESRI Shapefile, but you can add an argument to export to a different format: /format:<export format>

     Possible <export format> values are:

  • “esri shapefile”

  •  “mapinfo file”

  • “csv”

  • “dxf”

  • “kml”

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 /format:”dxf”

Notes:

  • 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 successfully downloaded.

The layer should be stored to the defined folder.

manual7

Note: It is necessary that the computer is turned on at the time of the backup.