7. amps_upgrade

New versions of AMPS periodically change the format of the data files AMPS uses. The amps_upgrade utility upgrades datafiles from previous versions of AMPS to the current version. amps_upgrade supports upgrades from version 3.0.3 or later instances to current instances of AMPS.

For upgrading from versions or later to this release of AMPS, amps_upgrade is not necessary.

Options and Parameters

Option Description
Print additional details on each operation to stdout
Print the operations that amps_upgrade performs to stdout.

Table 7.1: Options for amps_upgrade

Option Description
The root directory of the AMPS installation being migrated. This is the directory in which you usually start the ampServer process. Any relative paths in the config file will be evaluated relative to this directory.
The xml configuration file for the AMPS server being migrated.
The working directory from which the ampServer is invoked.
The temporary directory where upgrade files are written while the upgrade process is underway. If this directory does not exist, it will be created. amps_upgrade will fail without changing any existing files if this directory already exists and contains files from a previous migration.

Table 7.2: Instance parameters for amps_upgrade

Option Description
Returns true if the instance is the same version as the amps_migrate utility, with no upgrade needed
Step through the entire upgrade process, printing activity, without making changes. Returns false if errors are encountered or upgrade is impossible.
Upgrade the instance, returning false if the upgrade is impossible or the upgrade process fails.
-h, --help
Show usage information and exit.
Show the program’s version number and exit.

Table 7.3: Actions for amps_upgrade


Simply upgrade an AMPS instance that’s executed in the /amps/server directory from another version to this version, storing temporary files in the /amps/tmp directory:

$ amps_upgrade --from=/amps --config=/amps/config.xml --work-dir=/amps/server --tmp-dir=/amps/tmp --upgrade

Try out a migration without actually committing the changes to your AMPS instance:

$ amps_upgrade --from=/amps --config=/amps/config.xml --work-dir=/amps/server --tmp-dir=/amps/tmp --dry-run

Check to see if your AMPS instance is current:

$ amps_upgrade --from=/amps --config=/amps/config.xml --work-dir=/amps/server --tmp-dir=/amps/tmp --check-current