Using a disconnected replica
As mentioned in Replication to an Amazon EC2 instance using geodata services, there are several types of files to which you can replicate from your on-premises geodatabase. These files can be moved to your ArcGIS Server instance on Amazon, then loaded into your geodatabase in the cloud.
This workflow explains how to create a one-way replica file from an on-premises ArcSDE geodatabase, move the file to your ArcGIS Server instance, load your data into a geodatabase on Amazon EC2, publish a geodata service, then synchronize changes from the parent (the on-premises geodatabase) to the geodatabase on Amazon EC2.
Prepare on-premises data for replication
Before you can replicate data, it must meet specific requirements:
- All spatial data must be stored in a high-precision spatial reference.
- You can use an ArcGIS 9.3 or 9.3.1 geodatabase for the parent and an ArcGIS 10 geodatabase to host the child. However, if you use two-way replication, be sure you do not add data or make any edits that introduce functionality to the child replica that is not supported in the parent replica's geodatabase.
- The owner of the data to be replicated must perform the following steps:
- Grant write access on the data to the user who will create the replica.
- Register as versioned the data to be included in the replica. Note:
The data must be fully versioned; it cannot be versioned with the option to move edits to base.
- Add a global ID column to each dataset that will be part of the replica.
Create a replica file locally
Replicate the data from your on-premises ArcSDE geodatabase to either a zipped XML document, a transport file geodatabase, or an on-premises ArcSDE geodatabase for PostgreSQL.
Start an ArcGIS Server instance on Amazon EC2
If you have not done so already, launch an instance of ArcGIS Server. See Activating ArcGIS Server on Amazon for instructions.
Set up your geodatabase on Amazon EC2
If you are using ArcGIS Server Enterprise on Amazon and have not done so already, launch an enterprise geodatabase (EGDB) instance. See Launching an EGDB instance for instructions. You will use this geodatabase as the child geodatabase. Be sure to also create an elastic IP and associate that with your EGDB instance.
If you are using ArcGIS Server Workgroup on Amazon, create a geodatabase on your database server to be used as the child geodatabase. Follow steps 2 through 8 in Workgroup geodatabases in the cloud to do this.
Connect to your geodatabase
Use Remote Desktop to connect to your ArcGIS Server instance and connect to your geodatabase from ArcCatalog.
If you are using ArcGIS Server Workgroup, you connected to the geodatabase in the last section. Skip step 1 in the following set of steps.
By default, the ArcSDE connection file is stored in the ArcCatalog folder in the profile directory of the Windows login used when creating the file. For example, a connection file named egdb1.sde would be found in C:\Users\yousir\AppData\Roaming\ESRI\Desktop 10.0\ArcCatalog.
The ArcGIS SOC account must have access to the ArcSDE connection file. Therefore, you should copy the sde connection file to a location where the SOC account can access it.
- From ArcCatalog on your ArcGIS Server instance, create a connection to your EGDB.
See Connecting from an ArcGIS Server instance to an EGDB instance for instructions.
- Open Windows Explorer and navigate to the directory where the .sde file is stored.
For example: C:\Users\Administrator\AppData\Roaming\ESRI\Desktop 10.0\ArcCatalog\Connection to egdb.sde
- Copy the .sde file and paste it in a location on the server to which the ArcGIS SOC account has access.
For example, D:\GIS Data\GIS Data
- Add a folder connection to the new location in ArcCatalog.
- Right-click Catalog in the Catalog tree and click Connect Folder.
- Navigate to the folder to which you copied the .sde file and click OK.
The folder appears in the Catalog tree.
- Open the folder and double-click the .sde connection file to connect to the geodatabase.
Create a replica from your on-premises geodatabase
You can replicate to an XML document, an ArcSDE geodatabase in PostgreSQL, or a transport file geodatabase.
- Start ArcMap and add to the map the data you want to replicate.
- Save the map. You will use it for editing and synchronizing later in the workflow.
- Create a one-way (or two-way) replica.
- If you are replicating to an XML document or ArcSDE geodatabase in PostgreSQL, see Creating a one-way or two-way replica for instructions on using the Create Replica wizard to create a replica.
- If you are replicating to a transport file geodatabase, either download, install, and use the Replicate to Transport File GDB from the ArcGIS Resource Center or alter the ArcObjects code in How to create a replica in a disconnected environment to work with your data.
- If you replicated to an ArcSDE geodatabase in PostreSQL, create a backup of the database. See PostgreSQL backups and Using a backup file to move a geodatabase to an EGDB instance for more information.
- If you replicated to an XML document, you may need to compress the file before transferring it. Keep in mind any file size limitations imposed by the method you will use to transfer your file or files in the next section. You may need to use an application that allows you to split the file into multiple, smaller compressed files to allow you to transfer it to your ArcGIS Server instance.
Transfer your replica file to your ArcGIS Server instance
The file (or files) you created in the last section must now be moved to your ArcGIS Server Amazon EC2 instance. See Strategies for data transfer to Amazon for information on the options available to move files to Amazon EC2.
Load data from the replica file into the geodatabase on Amazon EC2
How you load your data into your geodatabase on Amazon EC2 depends on what type of replica file you created.
XML document
If you generated an XML document from the Create Replica wizard, use the Import XML Workspace Document tool to import the data.
- Make a remote desktop connection to your ArcGIS Server instance on Amazon EC2.
- Uncompress your file if necessary.
- Start ArcCatalog.
- Connect to the geodatabase to which you want to transfer the data.
- Right-click the geodatabase, point to Import, and click XML Workspace Document.
The replicated data is present in your geodatabase on Amazon EC2.
PostgreSQL backup file
You can restore the backup file to the PostgreSQL database cluster. See Using a backup file to move a geodatabase to an EGDB instance for instructions. The restored geodatabase already contains the replicated data.
Transport file geodatabase
Use copy and paste to transfer the data from the transport file geodatabase to your geodatabase on Amazon EC2.
- Make a remote desktop connection to your ArcGIS Server instance.
- If you used the ArcGIS Desktop Replicate to Transport File Geodatabase add-in to generate the file, you must first uncompress the file.
- Start ArcCatalog and add a connection to the folder where you placed the transport file geodatabase.
- Click the Connect To Folder button .
- Browse to the location of the transport file geodatabase and click OK.
- Copy the data from the transport file geodatabase.
- Connect to your target geodatabase on Amazon EC2.
- Paste the data into the target geodatabase.
The replicated data is present in your geodatabase on Amazon EC2.
Synchronization
The easiest way to synchronize edits in your on-premises geodatabase with your geodatabase on Amazon EC2 is to publish a geodata service from the geodatabase on Amazon EC2, add the service to your on-premises ArcGIS Desktop, and synchronize to the service. This is connected synchronization over the Web. With this scenario, though, the amount of changes you synchronize must be less than 4 MB. If you synchronize more frequently, the updategrams you send through the service will likely stay under the 4 MB limit.
If you cannot keep your updategrams to under 4 MB, you must manually export changes from the on-premises parent geodatabase, move the resultant file to your ArcGIS Server instance on Amazon EC2, import the changes to the child geodatabase, export an acknowledgment file from the child geodatabase, move it to your on-premises server, and import it to the parent geodatabase.
Synchronize through a geodata service
If your updategrams are smaller than 4 MB, you can use the following workflow to synchronize changes from the parent geodatabase to the child:
Publish a geodata service
Publish a geodata service from your geodatabase on Amazon EC2.
Geodata services can be published from ArcCatalog or ArcGIS Server Manager. These instructions use ArcCatalog.
- Right-click the geodatabase connection and click Publish to ArcGIS Server.
- Choose the server to which you want to publish the geodata service.
- Type a name for the service.
- Choose the location on the server in which the service will reside.
- Click Next.
- Keep Geodata Service checked. Additionally, you can choose other capabilities you want for the service.
See Geodata service capabilities and allowed operations for information on capabilities for geodata services.
- Review the information you specified for the service. Be sure to note the service's URL.
You cannot enter this URL in a browser directly, but you can enter the URL and append ?wsdl to see the Web service definition and verify that the service is working correctly.
The service is listed under the GIS Servers node in the Catalog tree.
Set the geodata service for replication
You must set the service to allow replication so you can synchronize data through the service.
The service must be stopped for you to change its properties.
- Right-click the geodata service under the GIS Servers node in ArcCatalog and click Stop.
- Right-click the geodata service and click Service Properties.
The ArcGIS Server - GeoData Service Properties dialog box opens.
- Click the Capabilities tab.
- Click Replication under Operations allowed.
- Click OK.
- Right-click your geodata service and click Start.
Add your geodata service to an on-premises ArcGIS Desktop client
To synchronize through the geodata service, you must add your geodata service to the GIS Servers list in the Catalog tree of your on-premises Desktop client.
- Open ArcCatalog on an on-premises computer.
- Expand the GIS Servers node in the Catalog tree.
- Double-click Add ArcGIS Server.
The Add ArcGIS Server dialog box opens.
- Choose Use GIS Services and click Next.
- Type the server URL for the geodata service.
This is the URL you noted when you published the geodata service.
- Click Finish.
Edit on-premises geodatabase and synchronize with the geodata service
You can edit your replicated data in your on-premises geodatabase from ArcMap. When you finish a set of edits you want to synchronize, use the Synchronize Changes wizard in ArcMap to synchronize the on-premises geodatabase with the geodata service you added in the last section. See the topics in the Synchronizing connected replicas section of the ArcGIS Server help for information on using the Synchronize Changes wizard. Be sure the target for the synchronization is the geodata service.
Manually export and import change messages
If your updategrams are larger than 4 MB, you must use disconnected synchronization to do the following:
- Export a data change file from the on-premises (parent) geodatabase.
- Move the data change file to your ArcGIS Server instance. See Strategies for data transfer to Amazon for options to move these files.
- Import the data change file to the child geodatabase on Amazon EC2.
- Export an acknowledgment message from the child geodatabase.
- Move the acknowledgment message to your on-premises server.
- Import the acknowledgment message to your on-premises geodatabase.
See the topics in the Synchronizing disconnected replicas ArcGIS Server for instructions.