Upgrade your geodatabases to take advantage of new functionality and improvements implemented in the geodatabase. To upgrade an enterprise geodatabase in PostgreSQL on Amazon Web Services (AWS), do one of the following:
- Update the ArcGIS software on the existing Amazon Elastic Compute Cloud (EC2) instance and upgrade the geodatabase.
If the geodatabase is in a PostgreSQL database cluster on AWS, be sure the existing PostgreSQL version is compatible with the latest version of ArcGIS software. If it is not, you also must upgrade the PostgreSQL database cluster.
If the geodatabase is already in Amazon Relational Database Service (RDS) for PostgreSQL, Amazon automatically updates the PostgreSQL version; therefore, you only need to upgrade the geodatabase after upgrading your ArcGIS software.
- Migrate content to a new geodatabase in an Amazon relational database service instance.
This method is more time consuming, but you must use this method if you are upgrading from an ArcGIS 10 instance, because there is no direct upgrade path from 10 to 11.1. You can also use this method if you want to migrate your data from an existing PostgreSQL database cluster or Microsoft SQL Server instance to Amazon RDS for PostgreSQL or Amazon Aurora (PostgreSQL-compatible edition) to take advantage of the automatic updates Amazon applies to these instances.
The following sections describe methods for getting the geodatabase to the latest possible state.
Update the ArcGIS software on your existing AWS instance and upgrade the geodatabase
You can upgrade ArcGIS Server on your existing EC2 instance, upgrade the geodatabase in PostgreSQL, and continue using your existing data and services. Be aware, though, that this means the operating system and all other software on the instance remain at the version they were when you created your instance. For example, if you created the instance from an ArcGIS Server 10.2.2 for Amazon Machine Image, you will continue to use a PostgreSQL 9.2.4 database on an Ubuntu 12.04 operating system. Depending on the version of ArcGIS Server you upgrade to, those versions of PostgreSQL and operating system may not be compatible with the upgraded version of ArcGIS Server.
If the existing PostgreSQL version on your instance is not compatible with the new version of ArcGIS Server, you must also upgrade PostgreSQL to a supported version. For example, if you launched an ArcGIS 10.8 instance and want to upgrade to ArcGIS Server 11.1 on that instance, you must also upgrade PostgreSQL to a supported version. See the PostgreSQL documentation for information on upgrading PostgreSQL.
If the operating system version is not supported with the new version of PostgreSQL or ArcGIS Server, you also must update the operating system version, or move data to a new instance and republish services.
How you upgrade ArcGIS Server on AWS depends on how you created the ArcGIS Server site. See ArcGIS upgrades on Amazon Web Services for information on how to upgrade ArcGIS Server on AWS. After you upgrade ArcGIS Server, follow the instructions to upgrade the geodatabase in Amazon RDS for PostgreSQL.
If you used ArcGIS Server Cloud Builder on Amazon Web Services 10.6.1 or an earlier release to create the ArcGIS Server site and geodatabases, see the instructions appropriate to the PostgreSQL location: either on the SITEHOST instance or EGDBHOST instance.
Upgrade geodatabases in Amazon RDS for PostgreSQL
After you upgrade an ArcGIS Server site on AWS, follow these steps to upgrade geodatabases in Amazon RDS for PostgreSQL.
- Be sure you have a current, reliable backup of the database in Amazon RDS for PostgreSQL.
- Connect to Amazon RDS for PostgreSQL and confirm that the sde user has the privileges required to upgrade.
- Sign in to one of the ArcGIS Server EC2 instances as the arcgis user.
- Open a text editor to create a Python script to upgrade the geodatabase.
For example:
vi upgrade.py
- Copy the following script into a text editor.
Alter the script to use information specific to your site, including the instance name, sde password, connection file name and location, and database name.
#Import arcpy module import arcpy # Create connection file arcpy.CreateDatabaseConnection_management("/tmp","egdbrds_connection.sde","POSTGRESQL","my_db_instance_identifier.awsregion_id.rds.amazonaws.com","DATABASE_AUTH", "sde", "E$ri3774", "SAVE_USERNAME", "egdb") # Upgrade geodatabase arcpy.UpgradeGDB_management("/tmp/egdbrds_connection.sde", "PREREQUISITE_CHECK", "UPGRADE")
See Create Database Connection and Upgrade Geodatabase for more information on tool syntax.
- Save the file and close the text editor.
- Use stopserver.sh to stop ArcGIS Server.
- Run the upgrade script in Python.
/arcgis/server/tools/python <path to the file>/upgrade.py
If the upgrade fails, information is written to the GDBUpgrade.log in /arcgis/server/framework/runtime/.wine/drive_c/users/arcgis/LocalAppData/ESRI/Server<#>.
- To be sure that the geodatabase is upgraded, open a Python command window and run the following, replacing /tmp/egdbrds_connection.sde with your connection file location and name.
First, open an arcpy prompt.
cd /arcgis/server/tools ./python
Use isCurrent to determine if the geodatabase is upgraded to the current release.
import arcpy isCurrent = arcpy.Describe('/tmp/egdbrds_connection.sde').currentRelease print isCurrent
If print isCurrent returns True, your geodatabase is upgraded.
- To exit the arcpy prompt, type quit().
- Alter the upgrade.py script and run it again for each geodatabase you need to upgrade.
Upgrade geodatabases on SITEHOST
If you created the ArcGIS Server site and geodatabases using ArcGIS Server Cloud Builder on Amazon Web Services, follow the steps in this section to upgrade geodatabases in a PostgreSQL database cluster that reside on the same instance as the ArcGIS Server SITEHOST.
Note:
You cannot directly upgrade ArcGIS Server 10.6.1 and earlier to 11.1. You must upgrade to an intermediate version first and then upgrade to 11.1.
Also note that any geodatabase in PostgreSQL that was initially created using ArcGIS Server Cloud Builder on Amazon Web Services 10.6.1 will require that you upgrade PostgreSQL to a supported version and upgrade the Ubuntu operating system to a supported version. You will likely have to upgrade each of these to an intermediate version as well. For example, if you are upgrading an ArcGIS Server 10.5.1 site with a geodatabase in PostgreSQL, upgrade ArcGIS Server to 10.7.1 and upgrade the operating system and PostgreSQL to versions that were supported with 10.7.1.
Always create backups of the database and site before upgrading. Test the intermediate upgrade before you proceed with upgrading to 11.1.
How you upgrade PostgreSQL depends on the PostgreSQL versions you are upgrading from and to. See PostgreSQL documentation for instructions.
After you upgrade PostgreSQL and Ubuntu to supported versions, upgrade ArcGIS Server, download the new st_geometry.so file from My Esri, place the file in the PostgreSQL lib directory, stop ArcGIS Server, run a Python script to upgrade each geodatabase, and restart ArcGIS Server.
- Install the new version of ArcGIS Server on the EC2 instance and upgrade as you would an on-premises ArcGIS Server site.
See the ArcGIS Server installation guide for upgrade instructions.
- Before you upgrade the geodatabases, make backup copies of them.
One way to backup the geodatabase is to make a snapshot of the EBS volume that contains your data. See Amazon Web Services documentation for instructions.
- Also, before upgrading, download the st_geometry.so file from My Esri and replace the file in /usr/lib/postgresql/<postgresql version>/lib.
- The st_geometry.so file is owned by root; therefore, after connecting to the Amazon Web Services SITEHOST instance as ubuntu, switch users to root:
sudo su -
Note:
Be aware that you cannot connect as the arcgis user and switch to the root user.
- Before you place the new file, rename the old one.
mv /usr/lib/postgresql/<postgresql version>/lib/st_geometry.so /usr/lib/postgresql/<postgresql version>/lib/st_geometryOLD.so
- Copy the new st_geometry.so file from the directory to which you downloaded it.
cp /usr/downloads/st_geometry.so /usr/lib/postgresql/<postgresql version>/lib
- Change permissions on the st_geometry.so file to allow other users to read and run it.
chmod 755 /usr/lib/postgresql/<postgresql version>/lib/st_geometry.so
- The st_geometry.so file is owned by root; therefore, after connecting to the Amazon Web Services SITEHOST instance as ubuntu, switch users to root:
- Switch to the arcgis user.
su - arcgis
- Open a text editor to create the upgrade Python script.
vi upgrade.py
- Copy the following script into a text editor.
Alter the script to use information specific to your site, including the instance name, sde password, connection file name and location, and database name.
#Import arcpy module import arcpy # Create connection file arcpy.CreateDatabaseConnection_management("/tmp","egdb_connection.sde","POSTGRESQL","ec2-123-456-789-100.compute-1.amazonaws.com","DATABASE_AUTH", "sde", "E$ri3774", "SAVE_USERNAME", "egdb") # Upgrade geodatabase arcpy.UpgradeGDB_management("/tmp/egdb_connection.sde", "PREREQUISITE_CHECK", "UPGRADE")
See Create Database Connection and Upgrade Geodatabase for more information on tool syntax.
- Save the file and close the text editor.
- Use stopserver.sh to stop ArcGIS Server.
- Run the upgrade script in Python.
/arcgis/server/tools/python <path to the file>/upgrade.py
You will likely see multiple notices about type references. You can ignore these; they do not indicate the upgrade failed.
Information is written to the GDBUpgrade.log in /arcgis/server/framework/runtime/.wine/drive_c/users/arcgis/LocalAppData/ESRI/Server<#> if the upgrade does fail.
- Run the following in Python to be sure your geodatabase is upgraded. Replace /tmp/egdb_connection.sde with your connection file location and name.
First, open an arcpy prompt.
cd /arcgis/server/tools ./python
Use isCurrent to determine if the geodatabase is upgraded to the current release.
import arcpy isCurrent = arcpy.Describe('/tmp/egdb_connection.sde').currentRelease print isCurrent
If print isCurrent returns True, the geodatabase is upgraded.
- To exit the arcpy prompt, type quit().
- Alter the script and run it for each geodatabase that you need to upgrade.
- Once all geodatabases are upgraded, use startserver.sh to restart ArcGIS Server.
Upgrade geodatabases on EGDBHOST
If you created the ArcGIS Server site and geodatabases using ArcGIS Server Cloud Builder on Amazon Web Services, follow the steps in this section to upgrade geodatabases in PostgreSQL that are on their own, dedicated AWS instance (EGDBHOST).
Note:
You cannot directly upgrade ArcGIS Server 10.6.1 and earlier to 11.1. You must upgrade to an intermediate version first and then upgrade to 11.1.
Any geodatabase in PostgreSQL that was initially created using ArcGIS Server Cloud Builder on Amazon Web Services 10.6.1 or earlier will require that you upgrade PostgreSQL to a supported version and upgrade the Ubuntu operating system to a supported version. You will likely have to upgrade each of these to an intermediate version as well. For example, if you are upgrading an ArcGIS Server 10.5.1 site with a geodatabase in PostgreSQL, upgrade ArcGIS Server to 10.7.1 and upgrade the operating system and PostgreSQL to versions that were supported with 10.7.1.
Always create a back up of the database and site before you upgrade. Test the intermediate upgrade before you proceed with upgrading to 11.1.
How you upgrade PostgreSQL depends on the PostgreSQL versions you are upgrading from and to. See PostgreSQL documentation for instructions.
After you upgrade PostgreSQL and Ubuntu, upgrade ArcGIS Server on the SITEHOST, download the new st_geometry.so file from My Esri and place it in the PostgreSQL lib directory on EGDBHOST, stop ArcGIS Server, run a Python script from SITEHOST to upgrade each geodatabase, and restart ArcGIS Server.
- Install the new version of ArcGIS Server on the EC2 instance and upgrade as you would an on-premises ArcGIS Server site.
See the ArcGIS Server installation guide for upgrade instructions.
- Before you upgrade the geodatabases, make backup copies of them.
One way to backup the geodatabase is to make a snapshot of the EBS volume that contains your data. See Amazon Web Services documentation for instructions on making a snapshot of an EBS volume.
- Also, before upgrading, download the st_geometry.so file from My Esri and place it in /usr/lib/postgresql/<postgresql version>/lib.
- Before you place the new file, rename the old one on EGDBHOST. Because the st_geometry.so file is owned by the root user, sign in to EGDBHOST as ubuntu and switch to the root user.
sudo su - mv /usr/lib/postgresql/<postgresql version>/lib/st_geometry.so /usr/lib/postgresql/<postgresql version>/lib/st_geometryOLD.so
- Copy the st_geometry.so file from the directory where you downloaded it.
cp /gisdata/st_geometry.so /usr/lib/postgresql/<postgresql version>/lib/st_geometry.so
- Change permissions on the st_geometry.so file to allow other users to read and run it.
chmod 755 /usr/lib/postgresql/<postgresql version>/lib/st_geometry.so
- Before you place the new file, rename the old one on EGDBHOST. Because the st_geometry.so file is owned by the root user, sign in to EGDBHOST as ubuntu and switch to the root user.
- Sign in to SITEHOST as the arcgis user.
- Open a text editor to create the upgrade Python script.
For example:
vi upgrade.py
- Copy the following script into a text editor.
Alter the script to use information specific to your site, including the instance name, sde password, connection file name and location, and database name.
#Import arcpy module import arcpy # Create connection file arcpy.CreateDatabaseConnection_management("/tmp","egdb_connection.sde","POSTGRESQL","ec2-123-456-789-100.compute-1.amazonaws.com","DATABASE_AUTH", "sde", "E$ri3774", "SAVE_USERNAME", "egdb") # Upgrade geodatabase arcpy.UpgradeGDB_management("/tmp/egdb_connection.sde", "PREREQUISITE_CHECK", "UPGRADE")
See Create Database Connection and Upgrade Geodatabase for more information on tool syntax.
- Save the file and close the text editor.
- Use stopserver.sh to stop ArcGIS Server.
- Run the upgrade script in Python.
/arcgis/server/tools/python <path to the file>/upgrade.py
You will likely see several notices about type references. You can ignore those messages.
If the upgrade fails, information is written to the GDBUpgrade.log in /arcgis/server/framework/runtime/.wine/drive_c/users/arcgis/LocalAppData/ESRI/Server<#>.
- To be sure the geodatabase is upgraded, open Python and run the following, replacing /tmp/egdb_connection.sde with your connection file location and name.
First, open an arcpy prompt.
cd /arcgis/server/tools ./python
Use isCurrent to determine if the geodatabase is upgraded to the current release.
import arcpy isCurrent = arcpy.Describe('/tmp/egdb_connection.sde').currentRelease print isCurrent
If print isCurrent returns True, your geodatabase is upgraded.
- To exit the arcpy prompt, type quit().
- Alter the upgrade.py script and run it again for each geodatabase you need to upgrade.
- Once all geodatabases are upgraded, use startserver.sh to restart ArcGIS Server.
Migrate content to a 11.1 geodatabase in an Amazon database service instance
If you are upgrading from ArcGIS 10 on AWS, or if you want to avoid having to upgrade and maintain PostgreSQL and the operating system, move your content to an Amazon Relational Database Service (RDS) instance and republish services. The following is a summary of this migration:
- Create a geodatabase in an Amazon RDS for PostgreSQL or Amazon Aurora (PostgreSQL-compatible edition) instance and register it with your upgraded (or new) ArcGIS Server 11.1 site.
- Move existing data to the new geodatabase.
- Republish services.
See the ArcGIS Server help for information on publishing services.
- Update apps to use the new services.
How you do this depends on how the app was created. For custom apps that consume the service directly, update the service URL. For apps created using an ArcGIS Enterprise portal or ArcGIS Online item, you must update the layer in the map or scene used in the app.