By default, upgrading AMS from 1.0.x to 1.x automatically backs up any existing AMS H2 database to the data directory. The backup process accomplishes this by backing up the database's mv.db
and trace.db
files and copying them with a timestamp annotation (useful, for example, to preserve a backup or to later downgrade AMS).
You can disable the auto-backup using the ams-server --nobackup command.
The following shows the AMS console output during upgrade. Note: lines below wrap to the next for clarity.
017-02-08 11.55.46.293 INFO com.tibco.ep.ams.conf.Configuration.84 - AMS configuration file: '/opt/tibco/sb-cep/10.1/ams/conf/AMS.conf' 2017-02-08 11.55.46.347 INFO com.tibco.ep.ams.conf.Configuration.93 - D atabase file path: '/[Your site-specific location]/x/data/ams-h2-persistence' 2017-02-08 11.55.46.348 INFO com.tibco.ep.ams.conf.Configuration.102 - Authentication realms: [LocalAuthenticationRealm] 2017-02-08 11.55.46.543 INFO com.tibco.ep.ams.DBMigrationUtil.302 - Making a backup of the existing H2 database files 2017-02-08 11.55.46.548 INFO com.tibco.ep.ams.DBMigrationUtil.308 - /[Your site-specific location
]/x/data/ams-h2-persistence.mv.db -> /[Your site-specific location
]/x/data/ams-h2-persistence.mv.db.2017- 02-08.11.55.46.bak0 2017-02-08 11.55.46.548 INFO com.tibco.ep.ams.DBMigrationUtil:308 - /[Your site-specific location
]/x/data/ams-h2-persistence.trace.db -> /[Your site-specific location
]/x/data/ams-h2-persistence.trace.db.2017- 02-08.11.55.46.bak0 2017-02-08 11.55.46.548 INFO com.tibco.ep.ams.AMSServer.176 - Running the AMS server 2017-02-08 11.55.46.574 INFO com.tibco.ep.ams.DBMigrationUtil.150 - Creating migration table, db_migration 2017-02-08 11.55.46.576 INFO com.tibco.ep.ams.DBMigrationUtil.179 - Writing version 1.0 record to migration table, db_migration 2017-02-08 11.55.46.992 INFO org.avaje.dbmigration.MigrationRunner.93 - local migrations:1 existing migrations:1 2017-02-08 11.55.50.247 INFO org.eclipse.jetty.server.ServerConnector.270 - Started ServerConnector@58606c91{HTTP/1.1,[http/1.1]}{0.0.0.0:8080}
Data directory example after the auto-backup completes:
[Your site-specific information
]:~/Desktop/x > ls -1 data
ams-h2-persistence.mv.db
ams-h2-persistence.mv.db.2017-02-08.11.55.46.bak0
ams-h2-persistence.trace.db
ams-h2-persistence.trace.db.2017-02-08.11.55.46.bak0