Difference between revisions of "Zimbra Next Generation Modules/CLI"

m (1 revision imported: Zimbra NG)
m (Redirected page to Zimbra NG Modules/CLI)
 
Line 1: Line 1:
<div class="col-md-12"><br></div>
+
#REDIRECT [[Zimbra_NG_Modules/CLI]]
<div class="col-md-12"><br></div>
 
<ol class="breadcrumb">
 
  <li>[[Main Page|Zimbra Wiki]]</li>
 
  <li>[[Zimbra_Next_Generation_Modules]]</li>
 
  <li>CLI</li>
 
</ol>
 
__NOTOC__
 
<div class="col-md-12"><br /></div>
 
<div class="col-md-9">
 
    <h2 class="title-header" style="padding-bottom: 9px; border-bottom: 4px solid #0087c3;">Zimbra Next Generation Modules - CLI</h2>
 
    <div class="col-md-12">
 
        <div class="ibox-content">
 
            <div class="post animated fadeInLeft animation-delay-8" style="padding-top:5px">
 
                <div class="panel panel-default">
 
                    <div class="panel-body">
 
                        <h5 class="post-title">Zimbra Next Generation Modules - CLI</h5>
 
                        <div class="row">
 
 
 
= ''zxsuite'' - Zimbra Next Generation Modules Command-Line Interface =
 
Zimbra Next Generation Modules comes with a CLI feature allowing administrators to perform quick operations directly from the command line of a server. This feature is also very useful for those who need to insert Zimbra Next Generation Modules operations in a script.
 
 
 
<div class="col-md-8">
 
    <div class="alert alert-warning fade in"> <p> <i class="fa  fa-warning"></i> <strong>warning</strong> </p>
 
    <p class="text-justify">This is just a quick-reference command list. For a full description and usage example, please run '''`zxsuite help  {module} [command]`'''</p>
 
    </div>
 
</div>
 
<div class="clearfix"></div>
 
 
 
==Basic Usage==
 
Every module of Zimbra Next Generation Modules, including the core, has its own set of ''zxsuite'' commands. All ''zxsuite'' commands are invoked with the following syntax:
 
 
 
: ''zxsuite [--host|--offline] [--json] [--progress] {module} {action} [options]''
 
 
 
'''Available switches:'''
 
* --host [hostname|ip] - Specify a target host for the command. Leave blank for localhost. Use all_servers to broadcast the command to all Zimbra Next Generation Modules-enabled Zimbra servers.
 
* --offline - Use if Zimbra is not started. Some commands will not work
 
* --json - The output of the command will be presented in JSON format. Good for scripting.
 
* --progress - Prints the operation's feedback directly to STDOUT. Press Ctrl+C to interrupt the output. The operation itself won't be interrupted.
 
 
 
'''Online Help:'''
 
An Online Help for every command is available through ''zxsuite help {module} [command]''. Omitting the command will display the full list of available commands.
 
 
 
==Core CLI==
 
Basic Usage:
 
 
 
zxsuite core {action} [options]
 
 
 
===Core Commands===
 
:  getVersion              - Display Zimbra Next Generation Modules version
 
zxsuite core getVersion
 
:  getProperty              - Get configuration properties
 
zxsuite core getProperty [attr1 value1 [attr2 value2...]]
 
:  setProperty              - Set configuration property
 
zxsuite core setProperty {property_name} {property_value}
 
:  getLicenseInfo          - Display Zimbra Next Generation Modules license informations
 
zxsuite core getLicenseInfo core getLicenseInfo
 
:  doUploadLicense          - Upload a Zimbra Next Generation Modules license
 
zxsuite core doUploadLicense {license_path}
 
:  doLicenseChecks          - Force Zimbra Next Generation Modules license checks
 
zxsuite core doLicenseChecks
 
:  getAccountStats          - Show statistic informations about provided account name or ID
 
zxsuite core getAccountStats {account}
 
:  getNotification          - Shows Zimbra Next Generation Modules notifications
 
zxsuite core getNotification [attr1 value1 [attr2 value2...]]
 
:  doDeleteAllDelegatedRights - This command deletes both Zimbra NG Admin and Zimbra's own Admin Delegation settings
 
zxsuite core doDeleteAllDelegatedRights {confirmation string}
 
 
 
==Update CLI==
 
Basic Usage:
 
 
 
zxsuite update {action} [options]
 
 
 
===Update Commands===
 
:doCheckUpdate            - Ask to Zimbra Next Generation Modules update server update informations for Zimbra Next Generation Modules
 
zxsuite update doCheckUpdate
 
 
 
:doStartService          - start a given service
 
zxsuite update doStartService {service_name}
 
 
 
:doStopService            - stop a given service
 
zxsuite update doStopService {service_name}
 
 
 
:download                - [BETA] Update Zimbra Next Generation Modules with the latest update available, the version will be loaded on the next mailboxd restart
 
zxsuite update download
 
 
 
:enable                  - [BETA] Enable Zimbra Next Generation Modules automatic update capabilities
 
zxsuite update enable
 
 
 
:getServices              - show current status of all services for this module
 
zxsuite update getServices
 
 
 
:info                    - Info on Zimbra Next Generation Modules updates
 
zxsuite update info
 
 
 
:start                    - [BETA] Load a new Zimbra Next Generation Modules version
 
zxsuite update start [attr1 value1 [attr2 value2...]]
 
 
 
==Zimbra NG Backup CLI==
 
Basic Usage:
 
 
 
zxsuite backup {action} [options]
 
 
 
===Zimbra NG Backup Commands===
 
 
 
:  getProperty              - Get configuration properties
 
zxsuite backup getProperty [attr1 value1 [attr2 value2...]]
 
:  setProperty              - Set configuration property
 
zxsuite backup setProperty {property_name} {property_value}
 
:  doFullScan              - Perform a Full Scan
 
zxsuite backup doFullScan [attr1 value1 [attr2 value2...]]
 
:  doSmartScan              - Perform a Smart Scan
 
zxsuite backup doSmartScan [attr1 value1 [attr2 value2...]]
 
:  doAccountScan            - Perform a Full Scan on a single account
 
zxsuite backup doAccountScan {account} [attr1 value1 [attr2 value2...]]
 
:  doExport                - Perform an Export limited by domains
 
zxsuite backup doExport {destination_path} [attr1 value1 [attr2 value2...]]
 
:  doRestoreOnNewAccount    - Perform a Restore on New Account
 
zxsuite backup doRestoreOnNewAccount {source_account} {destination_account} {"dd/MM/yyyy HH:mm:ss"|last} [attr1 value1 [attr2 value2...]]
 
:  doEnableDisableCOS      - Enable or disable the backup for a specific COS
 
zxsuite backup doEnableDisableCOS {cos_name} {enable|disable}
 
:  doUndelete              - Perform an Undelete Restore
 
zxsuite backup doUndelete {account} {"dd/MM/yyyy HH:mm:ss"|first} {"dd/MM/yyyy HH:mm:ss"|last} [attr1 value1 [attr2 value2...]]
 
:  doItemSearch            - Search for an item
 
zxsuite backup doItemSearch {account} [attr1 value1 [attr2 value2...]]
 
:  doItemRestore            - Restores a single item
 
zxsuite backup doItemRestore {account_name} {item_id}
 
:  doExternalRestore        - Perform an External Restore
 
zxsuite backup doExternalRestore {source_path} [attr1 value1 [attr2 value2...]]
 
:  doStopOperation          - Stop a single running operation
 
zxsuite backup doStopOperation {operation_uuid}
 
:  doStopAllOperations      - Stops all running operations and empties the operations queue
 
zxsuite backup doStopAllOperations
 
:  doCheckShares            - Check all shares on local accounts
 
zxsuite backup doCheckShares
 
:  doFixShares              - Try to fix all shares on local accounts
 
zxsuite backup doFixShares {import_idmap_file}
 
:  doFixOrphans            - Delete orphan digest files
 
zxsuite backup doFixOrphans [attr1 value1 [attr2 value2...]]
 
:  doCoherencyCheck        - Check backup coherency
 
zxsuite backup doCoherencyCheck {backup_path} [attr1 value1 [attr2 value2...]]
 
:  getAccountInfo          - Shows an account's information
 
zxsuite backup getAccountInfo {account} [attr1 value1 [attr2 value2...]]
 
:  getBackupInfo            - Displays informations about the backup system
 
zxsuite backup getBackupInfo [attr1 value1 [attr2 value2...]]
 
:  getMap                  - Show binary Map<String, String> object as human readable table
 
zxsuite backup getMap {file_path}
 
:  getItem                  - Display an item in a human-readable format.
 
zxsuite backup getItem {account} {item} [attr1 value1 [attr2 value2...]]
 
:  getAvailableAccounts    - Displays all accounts available for restore
 
zxsuite backup getAvailableAccounts [attr1 value1 [attr2 value2...]]
 
:  getAvailableDomains      - Displays all domains available for restore
 
zxsuite backup getAvailableDomains {dd/MM/yyyy HH:mm:ss|"last"} {backup_path}
 
:  getServerConfig          - Provides a list of stored server configs
 
zxsuite backup getServerConfig {"dd/MM/yyyy HH:mm:ss"|"last"|"all"} {standard|customizations} [attr1 value1 [attr2 value2...]]
 
:  getCOSBackupStatus      - Displays the backup status of all COS
 
zxsuite backup getCOSBackupStatus [attr1 value1 [attr2 value2...]]
 
:  getAllOperations        - Displays all running and queued operations
 
zxsuite backup getAllOperations
 
:  monitor                  - Monitor a running operation
 
zxsuite backup monitor {operation_uuid} [attr1 value1 [attr2 value2...]]
 
 
 
==Zimbra NG Mobile CLI==
 
Basic Usage:
 
 
 
zxsuite mobile {action} [options]
 
 
 
===Zimbra NG Mobile Commands===
 
:  getProperty              - Get configuration properties
 
zxsuite mobile getProperty [attr1 value1 [attr2 value2...]]
 
:  setProperty              - Set configuration property
 
zxsuite mobile setProperty {property_name} {property_value}
 
:  getDeviceList            - Display all devices for the provided account
 
zxsuite mobile getDeviceList {account}
 
:  getDeviceInfo            - Display information about the provided device
 
zxsuite mobile getDeviceInfo {account} {device_id}
 
:  doResetAccount          - Reset ALL device states for the provided account
 
zxsuite mobile doResetAccount {account}
 
:  doResetDevice            - Resets the device's SyncState for a single account
 
zxsuite mobile doResetDevice {account} [attr1 value1 [attr2 value2...]]
 
:  getAllSessions          - Returns informations about all stored mobile sessions
 
zxsuite mobile getAllSessions
 
:  getActiveSessions        - Returns all active mobile sessions
 
zxsuite mobile getActiveSessions
 
:  doRemoveDevice          - Removes all the device's SyncState and history from the server
 
zxsuite mobile doRemoveDevice {account} {device_id}
 
:  getAccountLoggers        - Returns informations about all account loggers
 
zxsuite mobile getAccountLoggers
 
:  doRemoveLogger          - Removes an account logger
 
zxsuite mobile doRemoveLogger {logger_id|"all_loggers"}
 
:  doAddAccountLogger      - Add an account logger
 
zxsuite mobile doAddAccountLogger {account} {debug|info|warn|err|crit} {log_file}
 
 
 
==Zimbra NG HSM CLI==
 
Basic Usage:
 
 
 
zxsuite powerstore {action} [options]
 
 
 
===Zimbra NG HSM Commands===
 
:  getProperty              - Get configuration properties
 
zxsuite powerstore getProperty [attr1 value1 [attr2 value2...]]
 
:  setProperty              - Set configuration property
 
zxsuite powerstore setProperty {property_name} {property_value}
 
:  getAllVolumes            - Prints all the volumes present in the server
 
zxsuite powerstore getAllVolumes
 
:  getHsmPolicy            - Prints all the policies
 
zxsuite powerstore getHsmPolicy
 
:  setHsmPolicy            - Set the default HSM policy
 
zxsuite powerstore setHsmPolicy {hsm_policy}
 
:  +setHsmPolicy            - Add an additional policy to HSM.
 
zxsuite powerstore +setHsmPolicy {hsm_policy}
 
:  doCreateVolume          - Create a volume on the server
 
zxsuite powerstore doCreateVolume {primary|secondary|index} {volume_name} {volume_path} [attr1 value1 [attr2 value2...]]
 
:  doUpdateVolume          - Update a spcific volume on the server
 
zxsuite powerstore doUpdateVolume {volume_id} [attr1 value1 [attr2 value2...]]
 
:  doDeleteVolume          - Delete a specific volume on the server
 
zxsuite powerstore doDeleteVolume {volume_id}
 
:  doMoveBlobs              - Start the doMoveBlob operation.
 
zxsuite powerstore doMoveBlobs [attr1 value1 [attr2 value2...]]
 
:  doDeduplicate            - Start a deduplication operation.
 
zxsuite powerstore doDeduplicate {volume_name} [attr1 value1 [attr2 value2...]]
 
:  doVolumeToVolumeMove    - Start the doMoveVolumeBlobs operation.
 
zxsuite powerstore doVolumeToVolumeMove {source_volume_name} {destination_volume_name}
 
:  getAllOperations        - Displays all running and queued operations
 
zxsuite powerstore getAllOperations
 
:  monitor                  - Monitor a running operation
 
zxsuite powerstore monitor {operation_uuid} [attr1 value1 [attr2 value2...]]
 
:  doStopAllOperations      - Stops all running operations and empties the operations queue
 
zxsuite powerstore doStopAllOperations
 
:  getVolumeStats          - Show space occupation, number of items and blobs contained in a volume
 
zxsuite powerstore getVolumeStats {volume_id} [attr1 value1 [attr2 value2...]]
 
 
 
==Zimbra NG Admin CLI==
 
Basic Usage:
 
 
 
zxsuite admin {action} [options]
 
 
 
===Zimbra NG Admin Commands===
 
:  getDelegationSettings    - Shows delegated admins with their domains of competency, the viewMail attribute and the admin-assignable quota
 
zxsuite admin getDelegationSettings [attr1 value1 [attr2 value2...]]
 
:  doEditDelegationSettings -
 
zxsuite admin doEditDelegationSettings {account} {domain} [attr1 value1 [attr2 value2...]]
 
:  doAddDelegationSettings  -
 
zxsuite admin doAddDelegationSettings {account} {domain} [attr1 value1 [attr2 value2...]]
 
:  doRemoveDelegationSettings -
 
zxsuite admin doRemoveDelegationSettings {account} {domain}
 
:  getDomainSettings        - Shows all domains' name, account number limit, and max account quota
 
zxsuite admin getDomainSettings
 
:  setDomainSettings        - Sets domain max account quota and account limit
 
zxsuite admin setDomainSettings {domain} [attr1 value1 [attr2 value2...]]
 
:  resetDomainSettings      - Resets global account limit, account limit per cos, and domain account quota for the selected domain
 
zxsuite admin resetDomainSettings {domain}
 
:  doShowAdminActivity      - Shows all recorded admin activity
 
zxsuite admin doShowAdminActivity [attr1 value1 [attr2 value2...]]
 
:  doEnableDisableAdminLogging - Enables or disables the logging of admin activities
 
zxsuite admin doEnableDisableAdminLogging {enable|disable}
 
:  setProperty              - Set configuration property
 
zxsuite admin setProperty {property_name} {property_value}
 
:  getProperty              - Get configuration properties
 
zxsuite admin getProperty [attr1 value1 [attr2 value2...]]
 
:  doMonthlyReport          - Generate a report of admin activity in the specified month
 
zxsuite admin doMonthlyReport [attr1 value1 [attr2 value2...]]
 
:  getMonthlyReport        - Shows a report of admin activity in the specified month
 
zxsuite admin getMonthlyReport [attr1 value1 [attr2 value2...]]
 
:  doSetZimletRights        - Fixes the Zimbra Next Generation Modules zimlet rights for all delegated admins.
 
zxsuite admin doSetZimletRights
 
:  getAllOperations        - Displays all running and queued operations
 
zxsuite admin getAllOperations
 
:  doStopAllOperations      - Stops all running operations and empties the operations queue
 
zxsuite admin doStopAllOperations
 
:  doStopOperation          - Stop a single running operation
 
zxsuite admin doStopOperation {operation_uuid}
 
:  monitor                  - Monitor a running operation
 
zxsuite admin monitor {operation_uuid} [attr1 value1 [attr2 value2...]]
 
 
 
== Zimbra Next Generation Modules Migration CLI ==
 
Coming soon
 
 
 
==Zimbra Next Generation Modules CLI Video Tutorials==
 
'''Zimbra NG Backup - Undelete Restore '''
 
Coming soon
 
 
 
 
 
'''Zimbra NG Backup - Restore on New Account '''
 
Coming soon
 
                        </div>
 
                    </div>
 
                    <div class="col-md-9">
 
                        <div class="panel-footer">
 
                            <p><i class="fa fa-clock-o"></i> Aug 25, 2016 - [https://www.zimbra.com/email-server-software/ Know more »]</p>
 
                        </div>
 
                    </div>
 
                </div>
 
            </div>
 
        </div>
 
    </div>
 
</div>
 
<div class="col-md-3"><br /></div>
 
<div class="col-md-3">
 
    <div class="panel panel-zimbrared-light-border">
 
        <div class="panel-heading">
 
            <h3 class="panel-title"><i class="fa fa-gear pull-left"></i> Zimbra Next Generation Modules</h3>
 
        </div>
 
        <div class="panel-body">
 
            {{ZNG}}
 
        </div>
 
    </div>
 
</div>
 
<div class="col-md-3">
 
    <div class="panel panel-primary-light-border">
 
        <div class="panel-heading">
 
            <h3 class="panel-title"><i class="fa fa-info-circle pull-left"></i> Zimbra Next Generation Modules Resources</h3>
 
        </div>
 
        <div class="panel-body">
 
            {{ZNGL}}
 
        </div>
 
    </div>
 
</div>
 
<div class="clearfix"></div>
 
<div class="col-md-12"><br></div>
 
{{FH}}
 

Latest revision as of 12:14, 29 November 2017

Jump to: navigation, search