upgrade_event_repository.py

The upgrade_event_repository.py script adds the indexes to the Event Repository that are required by the Event Repository purge utility.

Syntax

upgrade_event_repository.py --host serverName|ipAddress --port portNumber [-u username] [--expireTraceRecordsAfterDays expireAfterDays] [--uri=full_MongoDB_Atlas_uri] [--eventDatabase TenantDatabaseName] [--authDatabase AuthenticationDatabaseName] [-h] 

Options

The upgrade_event_repository.py script has the following options:

--host=serverName|ipAddress
The MongoDB server to connect to. This option specifies the host name or IP address of a machine on which one of the mongod instances in your replica set is running. Connecting to a machine on which your primary mongod is running is recommended. The default is 127.0.0.1.
--port
The MongoDB server port to connect to. Specify only if the port is not the default (27017).
-u username, --user=username
Specify the MongoDB user to log in as.
--expireTraceRecordsAfterDays=expireAfterDays
Specifies the expiration time in days for LoaderTraceCollection records. The default is 30.
Note: Recover missing events within the specified expiration time (default 30 days). Otherwise, the loaded MATRIXX Event File (MEF) information is purged and the Global Transaction Counter (GTC) gaps are difficult to identify. Use the print_event_repository_loader_trace.py script to generate a list of missing GTC gaps of loaded MEFs that might require recovery.
--uri
The full URI for the MongoDB or MongoDB Atlas database. If the username or password has any special characters, they must be URI-encoded, for example, if the password has an @ character, it must be in the URI as %40. If the URI has an ampersand (&), the & must be escaped (preceded by a backslash (\&)) or the full URI must be inside quotes, for example:
uri=mongodb+srv://cluster0.8n9ep.mongodb.net/MtxEventDatabase?retryWrites=true\&option=value

uri="http://host/path?var1=val1&var2=val2"
Note: When entering the URI in create_config.py, if the URI has an &, it must be escaped (\&) to prevent the configuration file from becoming invalid. This option is needed only if there are other MongoDB driver parameters (like LDAP) that are not handled by the other options. If you specify a URI, and the event database is not MtxEventDatabase, you must also specify the --eventDatabase option.
--srv
If this parameter is specified, an SRV-based URI is generated for a MongoDB Atlas database. If this parameter is not specified, a regular MongoDB database URI is generated.
--eventDatabase
(Optional) The name of the tenant database. Specify this option as needed for tenant repository queries. The default value is MtxEventDatabase. If you specify a URI, and the event database is not MtxEventDatabase, you must specify the --eventDatabase option.
--authDatabase
(Optional) The name of the database to be used for the authentication in the MongoDB URI. The default value is admin.
-h, --help
Show help about the script options.