command:configuration
configurationExport
configurationExport [--directivesBlacklist=] [--snapshotName=] [--target=] [--zsurl=] [--zskey=] [--zssecret=] [--zsversion=] [--http=] [--output-format=]
Export the current server/cluster configuration into a file.
- --directivesBlacklist
Added in v1.3. Allows passing an array of blacklist directives which will not be exported. If the parameter is not passed, the list of blacklist directives is taken from <ZendGuiDir>/config/autoload/global.config.php. - --snapshotName
Added in v1.3. If this argument is passed, then a a snapshot will be created from the exported configuration. If such a snapshot already exists, then the command will fail. - --output-format
Output format. Default is "xml", but you can use "json", or "kv" for key-value.
Example:
configurationExport --directivesBlacklist="zend_optimizerplus.blacklist_filename,pgsql.auto_reset_persistent"
configurationImport
configurationImport --configFile= [--ignoreSystemMismatch=] [--target=] [--zsurl=] [--zskey=] [--zssecret=] [--zsversion=] [--http=] [--output-format=]
Import a saved configuration snapshot into the server.
- --configFile
The configuration snapshot file to import. - --ignoreSystemMismatch
If set to TRUE, configuration must be applied even if it was exported from a different system (other major PHP version, Zend Server version or operating system). The default value is FALSE. - --output-format
Output format. Default is "xml", but you can use "json", or "kv" for key-value.
configurationGetServerData
configurationGetServerData [--target=] [--zsurl=] [--zskey=] [--zssecret=] [--zsversion=] [--http=] [--output-format=]
Get the server data - all the available data about the server - its status, basic configuration, and useful information.
- --output-format
Output format. Default is "xml", but you can use "json", or "kv" for key-value.
configurationGetMonitoringSettings
configurationGetMonitoringSettings [--target=] [--zsurl=] [--zskey=] [--zssecret=] [--zsversion=] [--http=] [--output-format=]
Get monitoring settings values - like monitoring, statistics and URL insight components status (enabled / disabled) and other relavent directives - check the response example. The API is used in monitoring settings page.
- --output-format
Output format. Default is "xml", but you can use "json", or "kv" for key-value.
emailSend
emailSend --to= [--toName=] --from= [--fromName=] --subject= --templateName= [--templateParams=] [--headers=] [--html=] [--target=] [--zsurl=] [--zskey=] [--zssecret=] [--zsversion=] [--http=] [--output-format=]
Send email, for example, to warn the admin of an error.
- --to
Valid email address of a recipient. - --toName
Name the recipient. - --from
Valid email address from your domain. - --fromName=
This is name appended to the from email field. - --subject
The subject of your email. - --templateName
The template name without an extension .phtml. - --templateParams
Parameters that will be assigned to your template. - --headers
Add a raw header line, either in name1=value1&name2=value2 (valid query string format). - --html
The content type: ‘true’ for html, ‘false’ for plain text. Default is true. - --output-format
Output format. Default is "xml", but you can use "json", or "kv" for key-value.
Example:
emailSend --to=xyz@zend.com --from=admin@test.com --subject="Failed test" --templateName="failed" --templateParams="user=Peter&type=error" --headers="X-Importance=High&Return-To=admin@test.com"
configurationExtensionsOn
configurationExtensionsOn --extensions= [--target=] [--zsurl=] [--zskey=] [--zssecret=] [--zsversion=] [--http=] [--output-format=]
Activate an extension by loading it. This action requires a restart be performed on the server to apply the change.
- --extensions
Comma separated list of extensions to activate. - --output-format
Output format. Default is "xml", but you can use "json", or "kv" for key-value.
Example:
configurationExtensionsOn --extensions="mysql,gd,ftp"
configurationExtensionsOff
configurationExtensionsOff --extensions= [--target=] [--zsurl=] [--zskey=] [--zssecret=] [--zsversion=] [--http=] [--output-format=]
Deactivate an extension by unloading it. This action requires a restart be performed on the server to apply the change.
- --extensions
Comma separated list of extensions to deactivate. Example: configurationExtensionsOff --extensions="mysql,gd,ftp" - --output-format
Output format. Default is "xml", but you can use "json", or "kv" for key-value.
configurationValidateDirectives
configurationValidateDirectives --directives= [--target=] [--zsurl=] [--zskey=] [--zssecret=] [--zsversion=] [--http=] [--output-format=]
Validate and list directives and their corresponding values. Directives are validated according to their type and a predefined validation scheme. This action does not make any configuration changes.
- --directives
HTTP query string representing associative array of directive names and values to be validated - --output-format
Output format. Default is "xml", but you can use "json", or "kv" for key-value.
Example:
configurationValidateDirectives --directives="date.timezone=Europe/Berlin&allow_url_include=Off"
configurationStoreDirectives
configurationStoreDirectives --directives= [--target=] [--zsurl=] [--zskey=] [--zssecret=] [--zsversion=] [--http=] [--output-format=]
Validate and store a list of directives and their corresponding values in the server’s configuration. Directives are validated according to their type and a predefined validation scheme.
- --directives
HTTP query string representing associative array of directive names and values to be validated - --output-format
Output format. Default is "xml", but you can use "json", or "kv" for key-value.
Example:
configurationStoreDirectives --directives="date.timezone=Europe/Berlin&allow_url_include=Off"
configurationSearch
configurationSearch --query= [--filter=] [--target=] [--zsurl=] [--zskey=] [--zssecret=] [--zsversion=] [--http=] [--output-format=]
Retrieve a list of extension and directive names that correspond to a search executed on a filter.
- --query
Search keyword - --filter
String - --output-format
Output format. Default is "xml", but you can use "json", or "kv" for key-value.
Example:
configurationSearch --query="gob" --filter="All Extensions"
configurationExtensionsList
configurationExtensionsList [--type=] [--order=] [--direction=] [--filter=] [--target=] [--zsurl=] [--zskey=] [--zssecret=] [--zsversion=] [--http=] [--output-format=]
Retrieve a list of extensions and associated information. This list can be filtered by extension type (PHP Extension and Zend Extension). This list of extensions contains only meta and operation information about the extension, and does not include directives and internal state.
- --type
Retrieve only extensions of a specific type (one of “all”, ”zend”, “php”). Default: All - --order
Column to sort the result by (name, status). Default: (extension) name - --direction
Sorting direction: ASC or DESC. Default: ASC - --filter
Apply a certain case-insensitive string filter to the extensions returnedExample:
configurationExtensionsList --type=php --order=name --direction=ASC
- --output-format
Output format. Default is "xml", but you can use "json", or "kv" for key-value.
configurationDirectivesList
configurationDirectivesList [--extension=] [--daemon=] [--filter=] [--target=] [--zsurl=] [--zskey=] [--zssecret=] [--zsversion=] [--http=] [--output-format=]
Retrieve a filtered list of directives and associated information. This list can be filtered by extension name, however if an invalid or non-existing extension is passed, an valid empty result will be returned.
- --extension
Retrieve only directives of a specific extension. Default: Retrieve all known directives regardless of extensions. If no extension name is provided, the output will be modified so that the extension element is empty - --daemon
Retrieve only directives of a specific zend daemon. Note that both extension and daemon parameters cannot be passed. - --filter
Filter out the directives returned according to a certain text. - --output-format
Output format. Default is "xml", but you can use "json", or "kv" for key-value.
Example:
configurationDirectivesList --extension="mysql"
configurationComponentsList
configurationComponentsList [--filter=] [--target=] [--zsurl=] [--zskey=] [--zssecret=] [--zsversion=] [--http=] [--output-format=]
Retrieve a list of zend components and associated information. Each component holds information both on it’s extension and it’s daemon (service). If the component does not have a daemon, then daemon status returned is ‘None’.
- --filter
Apply a certain case-insensitive string filter to the components returned. - --output-format
Output format. Default is "xml", but you can use "json", or "kv" for key-value.
Example:
configurationComponentsList --filter="zend_opti"
configurationRevertChanges
configurationRevertChanges --serverId= [--doRestart=] [--target=] [--zsurl=] [--zskey=] [--zssecret=] [--zsversion=] [--http=] [--output-format=]
Revert the configuration on a given server to their default settings.
- --serverId
ID of the server that needed to be reverted to blueprint - --doRestart
Whether to restart after the changes were reverted. - --output-format
Output format. Default is "xml", but you can use "json", or "kv" for key-value.
configurationApplyChanges
configurationApplyChanges --serverId= [--target=] [--zsurl=] [--zskey=] [--zssecret=] [--zsversion=] [--http=] [--output-format=]
Apply the configuration changes on a given server to the blueprint. In a cluster environment, this will apply the changes to all servers in the cluster.
- --serverId
ID of the server that needed to be reverted to blueprint - --output-format
Output format. Default is "xml", but you can use "json", or "kv" for key-value.
configurationReset
configurationReset --configFile= [--ignoreSystemMismatch=] [--target=] [--zsurl=] [--zskey=] [--zssecret=] [--zsversion=] [--http=] [--output-format=]
Import a saved configuration snapshot into the server.
- --configFile
Configuration snapshot file to import. - --ignoreSystemMismatch
If set to TRUE, configuration must be applied even if it was exported from a different system (other major PHP version, ZS version or operating system). Default is FALSE. - --output-format
Output format. Default is "xml", but you can use "json", or "kv" for key-value.