Code42 console command-line interface reference
Who is this article for?
Instructor, no.
Incydr Professional, Enterprise, Gov F2, and Horizon, no.
Incydr Basic, Advanced, and Gov F1, no.
CrashPlan Cloud, no.
Retired product plans, yes.
CrashPlan for Small Business, no.
Overview
You can interact with your Code42 environment through a command-line interface (CLI) as well as the regular graphical interface of the Code42 console. This article describes the CLI commands available and their uses.
To access the command-line interface, double click the logo in the header of the console.
Before you begin
If you have any questions about command usage or best practices, contact our Customer Champions for support.
Some of these commands have the potential to interfere with backups, disconnect devices, or potentially destroy data. Some commands cannot be undone.
Because of this destructive potential, take care when modifying your Code42 environment on the command line.
Command parameters in this article
This article uses several standard conventions to describe command parameters and options.
Arrow brackets
Text in arrow brackets should be replaced with text specific to your environment. Do not include the arrow brackets in your command.
Example instruction: command <exampleEmail>
Correct commands:
command john.doe@code42.com
Square brackets
Text in square brackets indicates an optional command. Do not include the square brackets in your command.
Example instruction: command [option]
Correct commands:
command
command option
Curly braces
Text in curly braces separated by pipes indicates mutually exclusive arguments. Do not include the curly braces in your command.
Example instruction: command
{abc | def | ghi}
Incorrect command:
command abc def
Correct commands:
command abc
command ghi
Access the command-line interface
To interact with your Code42 environment through the command-line interface, open the CLI from the Code42 console.
- Double-click the logo in the upper-left corner of the Code42 console.
The command-line interface appears in the Code42 console. - Enter commands at the top of the command-line interface.
- Review the output below.
Commands
Admin.backup.alerter
Send each org manager an alert email listing computers that have been offline or have incomplete backups.
Usage:
admin.backup.alerter
Admin.backup.reporter
Send each org manager one email report of the backup status for each of their organizations.
Usage:
admin.backup.reporter
Alertconnected
Print an alert message at the top of the Backup page on all currently connected clients.
Usage:
alertConnected <title> <message>
Argument | Function |
---|---|
<title> |
Title of the alert message. |
<message> |
Body text of the alert message. |
Example (using the 4.x Code42 app):
alertConnected "Testing" "This is a test message"
would display for all clients currently connected:
Analyze.database
Reindex and optimize database tables. This process is run automatically as part of the daily services. Does not apply to a server using a PostgreSQL database.
Usage:
analyze.database
Applog
Print the current configuration information to the application log.
Usage:
applog
Archive.records
Create a new statistics record for organizations, users, and store points, and move the previous entries into the history record. This service runs automatically at the time specified under Settings > Server (default: 2:01 am).
Usage:
archive.records
Balance.calculate
Print the current data balancing information (sources, targets, and matchups) to the application log.
Usage:
balance.calculate
Balance.data
Immediately perform data balancing operations.
Usage:
balance.data
Clientcommand
Send a command, enclosed in quotation marks, to a client. If the client is not currently online, the command will fail and no action will be taken.
Usage:
clientCommand "<command>" <guid>
Alias:
cc "<command>" <guid>
Argument | Function |
---|---|
<command> |
Command to pass to the client device. |
<guid> |
GUID of the client device. |
Example:
clientcommand "java option Xmx 1024m" 123456789012345678
Computer
Return user ID, name, address, and other information fields for a specific computer.
Usage:
computer <guid> [deauth]
Argument | Function |
---|---|
<guid> |
GUID of the client device. |
[deauth] |
(Optional) Returns deauthorization information. Only applicable for GUIDs that have been deauthorized. |
Crypto
Cryptographic utility.
Usage:
crypto {status | encrypt <string> | decrypt <string> | keystore enable-automatic CONFIRM | keystore enable <password> <retype password> | keystore change-password <current password> <new password> <retype new password>}
Argument | Function |
---|---|
status |
Returns the current state of the secure keystore mode. |
encrypt <string> |
Encrypt a given string using RSA. Encrypt requires secure keystore mode to be enabled. |
decrypt <string> |
Decrypt a given RSA encrypted string. Decrypt requires secure keystore mode to be enabled. |
keystore enable-automatic CONFIRM |
Contact our Customer Champions
This command has a major effect on functionality in your Code42 environment and cannot be reversed. We recommend that you contact our Customer Champions for support before enabling this functionality. Enable Automatic Secure Keystore, which securely encrypts all archive, transport, and encryption keys. CONFIRM is case-sensitive. |
keystore enable <password> <retype password> |
Contact our Customer Champions
This command has a major effect on functionality in your Code42 environment and cannot be reversed. We recommend that you contact our Customer Champions for support before enabling this functionality. Enable secure keystore mode: all archive, transport, and encryption keys will be encrypted. Secure keystore mode will require a password to be entered by the administrator on every server startup. We recommend using the Warning: Secure keystore mode cannot be disabled. |
keystore change-password <current password> <new password> <retype new password> |
Unlock the Secure KeyStore with the given password. This is only available when the Secure KeyStore is enabled, unlocked, and in manual mode. |
Daily.services
Manually initiate all services that run daily, and update usage statistics displayed by the Code42 console. Services include:
- BulkStatsBroadcast
- LicenseNotificationService
- UsageUpdaterService
- ConnectionAlerter
- DatabaseDump (Does not apply to a Code42 server using a PostgreSQL database.)
- StorageNodeSyncJob
- ProviderSyncJob
- ArchiveRecordService
- BackupReporter
- AnalyzeDatabase (Does not apply to a Code42 server using a PostgreSQL database.)
- RepositoryDiskVacuumer
Usage:
daily.services
Db.server
Start or stop a connection to the database server, or learn the current state of the authority server's database.
Usage:
db.server {start | stop | status}
Argument | Function |
---|---|
start |
Start the connection to the authority server's H2 database server.
We recommend that if you start the connection to the database server with this command that you stop the connection when you are done working. If you do not stop the connection within 8 hours, the connection is automatically stopped to avoid unintentional and prolonged remote access.
Contact our Customer Champions for support before you use this command. This command enables remote access to the database and starts a web application to execute queries against the database. Modifications to the database may affect the integrity of the system.
|
stop |
Stop the connection to the authority server's H2 database.
|
status |
Report the state and location of an H2 database: Stopped https://172.16.76.130:4284 jdbc:h2:/opt/proserver/db/proserver.h2.db Or report the use of a PostgreSQL database: Your system is configured for PostgreSQL |
Directory.sync
Compare the local user directory with an external user directory, such as LDAP, and update the local directory if needed. Your Code42 environment can only read from the external directory, never write to it.
Usage:
directory.sync [simulate]
Argument | Function |
---|---|
[simulate] |
(Optional) Return directory information without updating the local directory. |
Disconnect
Disconnect all devices, or a single device if given a GUID, from all cloud (non-provider) destinations. Does not deauthorize the device.
Usage:
disconnect [<guid>]
Argument | Function |
---|---|
[<guid>] |
(Optional) GUID of the device you want to disconnect from all cloud destinations. If guid is not specified, disconnect disconnects all devices from all cloud destinations. |
Diskspace.alerter
Check the available space on each store point for this Code42 server, and send an email at the thresholds defined in Settings > Server > Alerts.
Usage:
diskspace.alerter
Dump
Send (or "dump") system properties, backup properties, stack traces, disk, and network information to the log file.
Usage:
dump {all | app | env | backup | manifest | memory | netstat | ifconfig | peer | threads | vss | disk | files}
Argument | Function |
---|---|
all |
Dump all system properties. |
app |
Dump application information. |
env |
Dump environment information. |
backup |
Dump backup information. |
manifest |
Dump manifest information. |
memory |
Dump memory information. |
netstat |
Dump network statistics information. |
ifconfig |
Dump IP configuration information. |
peer |
Dump peering information. |
threads |
Dump threading information. |
vss |
Dump Volume Shadow Service information (Windows only). |
disk |
Dump disk information. |
files |
Dump file information. |
Send an email.
Usage:
email send <sender> <recipient> <subject> [<body>] [count=<n>]
Argument | Function |
---|---|
send |
Send an email using your authority server's email service. |
<sender> |
The sender of your email. Used only for the send argument. |
<recipient> |
The recipient of your email. Used only for the send argument. |
<subject> |
The subject line of your email. Used only for the send argument. |
<body> |
(Optional) The body text of your email. Used only for the send argument. |
[count=<n>] |
(Optional) The number of emails to send. Used only for the send argument. |
The
online
, offline
, and log
arguments for the email
command are for Code42 use only.Export.database
Manually run the export database process, which exports the database to the dumps folder in your installation directory and the root of each store point of this Code42 server. Does not apply to server using a PostgreSQL database.
Usage:
export.database
Export.sanitized.database
Manually run the export sanitized database process, which removes sensitive information from the database and exports it to the log folder of your Code42 server. Does not apply to server using a PostgreSQL database.
Usage:
export.sanitized.database
Failed.sync.cache
Clear or view the contents of the failed sync cache.
The failed sync cache tracks devices that failed to sync with a storage server.
Storage servers use this cache to reduce unnecessary network traffic. By default, the failed sync cache retains information for 60 minutes so that a sync for a particular device is not blocked indefinitely.
Usage:
failed.sync.cache <clear | dump [<limit>]>
Argument | Function |
---|---|
clear |
Clears the failed sync cache. |
dump |
Dumps the failed sync cache to the dumps folder in your installation directory. |
[<limit>] |
(Optional) Specifies a number indicating the upper limit for the entries to be printed. |
Getlogs
Generate a copy of all server logs in a a zip file in the log directory.
Usage:
getLogs
Hierarchy.sync
Synchronize hierarchy and business objects, including information on orgs, store points, and storage servers.
Usage:
hierarchy.sync
Example:
Use hierarchy.sync
to update your Code42 environment if you have added an org and want to immediately update that information to all storage servers.
License.alerter
Compare the number of available subscriptions and send an email 30 days (by default) before a subscription expires.
Usage:
license.alerter
Log
Control logging levels.
Usage:
log [<category>] [<level>]
Argument | Function |
---|---|
[<category>] |
(Optional) Specify the category of logs to modify. Common options:
Contact our Customer Champions for support to get the complete list of options. |
[<level>] |
(Optional) Specify the level of logging. Options, listed from most severe to least severe:
|
Examples:
log com.code42.core.ldap DEBUG
- Enable debug-level logging for LDAP
log com.code42.email.Emailer TRACE
- Enable trace-level logging for e-mail system logs
log com.code42.ssoauth TRACE
- Enable trace-level logging for all SSO authorization modules
Login.monitor
Information and operations pertaining to the login attempt monitor.
Usage:
login.monitor {info | disable | enable | maxRetries <number> | lockoutTime <minutes> }
Argument | Function |
---|---|
info |
Print the status of the login monitor, the maximum number of retries, and the lockout duration for failed login attempts. |
disable |
Disable login attempt monitoring. |
enable |
Enable login attempt monitoring. |
maxRetries <number> |
Change the number of retries allowed before a user is locked out. |
lockoutTime {<minutes> | forever} |
Change the lockout period to minutes . Specifying forever instead of minutes will permanently lock out users who fail to log in correctly, until an administrator unlocks their accounts. |
Login.monitor.reset
Reset a given user's login attempt status.
Usage:
login.monitor.reset <username>
Argument | Function |
---|---|
<username> |
Specify the user whose login attempt status you want to reset. |
Manage.certificates
Renew (authority server) or fetch (storage server) the self-signed certificates for Realm and IDP authentication tokens.
Usage:
manage.certificate {renew|fetch} [force= true|false]
Argument | Function |
---|---|
renew |
Renews the self-signed certificates on the authority server if it is within the 6-month renewal period. This command can only be run on the authority server. |
fetch |
Syncs the certificates on the storage server with the certificates on the authority server if it is within the 6-month renewal period. This command can only be run on a storage server. |
[force=true|false] |
(Optional) If If not specified, |
Node.restart
Instruct a node to restart.
Usage:
node.restart [<guid>]
Argument | Function |
---|---|
[<guid>] |
(Optional) GUID of the Code42 server to restart. If <guid> is not specified, node.restart will restart the active Code42 server. |
Node.sync
Synchronize a storage server with the authority server
Usage:
node.sync [guid=<guid>] [force=true|false]
Argument | Function |
---|---|
[guid=<guid>] |
(Optional) GUID of the storage server to sync with the authority server. If guid is not specified, node.sync will sync the active storage server with the authority server. |
[force=true|false] |
(Optional) If force is set to true, the sync operation is restarted even if the node is already syncing. |
Node.upgrade
Run the storage node automatic upgrade process.
Usage:
node.upgrade [guid=<guid>|my]
Argument | Function |
---|---|
[guid=<guid>|my] |
GUID of the storage server to upgrade. Specify my to upgrade the active storage server. If guid is not specified, node.upgrade will upgrade the active storage server. |
Org.destination.manage
Restart a failed job for organization destination (OrgDestination) management.
When access to a destination is offered (or removed) from an organization, the Code42 authority server must create (or delete) the relationships between the destination and all the devices and users in the organization. Because this potentially represents a very long running and heavy load on the Code42 server, several background jobs are scheduled. If one of these jobs fails, a log message is written with instructions on how to restart the failed jobs. Use the org.destination.manage
command to restart the failed jobs. Because the log message of the failed job displays all the correct values for the job, use those values for the command arguments.
Because restarting failed jobs can be complex, we recommend that you contact our Customer Champions for support to assist you with this process.
Usage:
org.destination.manage <orgId> <desinationGuid> <offered> <job> [<limit>]
Argument | Function |
---|---|
<orgId> |
Specify the ID of the organization for which you want to restart the job. |
<destinationGuid> |
Specify the GUID of the destination. |
<offered> |
Specify whether the destination is offered for backup (true or false ). |
<job> |
Indicate the job to restart. The possible values are CONFIG , PLAN , and USER . |
[<limit>] |
(Optional) Set the maximum number of objects to process. |
Examples:
org.destination.manage 99999 888777666555444333 true CONFIG
org.destination.manage 99999 888777666555444333 false USER
org.destination.manage 99999 888777666555444333 true PLAN
org.destination.manage 99999 888777666555444333 true PLAN 100
Org.destination.script.validate
Validate an organization's destination assignment script.
Usage:
org.destination.script.validate <orgId>
Argument | Function |
---|---|
<orgId> |
GUID of the organization to validate. |
Prop.remove
Remove a system property. System properties are case-sensitive.
Usage:
prop.remove <name>
Argument | Function |
---|---|
<name> |
Name of the system property to remove. |
Prop.set
Set system property. System properties are case-sensitive.
Usage:
prop.set <name> <value> [save] [{none|all|destination <guid>}]
Argument | Function |
---|---|
<name> |
Name of the system property to set. |
<value> |
Value to assign to the system property. |
[save] |
(Optional) Cause the property setting to persist after reboot. If save is not specified, the property setting will revert to its previous setting after reboot. |
none |
Apply the property setting to no Code42 server. |
all |
Apply the property setting to all Code42 servers in your Code42 environment. Code42 servers must be currently online. |
destination <guid> |
Apply the property setting to a specific destination, given by the destination's GUID. Destination must be currently online. |
If none , all , or destination <guid> are not specified, prop.set will set the system property on the local Code42 server. |
Prop.show
Show system properties.
Usage:
prop.show [all] [<filter_string>]
Argument | Function |
---|---|
[all] |
(Optional) List all system properties. |
[<filter_string>] |
Filter the list of system properties with a given string. |
Provider.sync
Synchronizes all data in local server database with data in other authority servers for which this server is the provider.
Usage:
provider.sync [<hostedOrgId>]
Argument | Function |
---|---|
[<hostedOrgId>] |
(Optional) Specify to sync the database with a specific hosted org, given by the org's GUID. If hostedOrgID is not specified, provider.sync will sync all data in the database with other authority servers for which this server is the provider. |
Reconnect
Reconnect all or the given computer to its assigned cloud destination.
Usage:
reconnect [<guid>]
Argument | Function |
---|---|
[<guid>] |
(Optional) GUID of the computer to reconnect. If guid is not specified, reconnect will reconnect all computers to their assigned cloud destinations. |
Relation.sync
Synchronize store points between servers. Code42 prefers the use of node.sync
.
Usage:
relation.sync
Repository.vacuumer
Run the Repository Disk Vacuumer service to purge archives that have passed the cold storage retention limit.
Usage:
repository.vacuumer
Alias:
rdv
Sendauthorize
Automatically authorize deactivated devices. If a device is offline, then it will automatically authorize when it connects.
Usage:
sendAuthorize <guids> [config] [show]
- colon separated.
Argument | Function |
---|---|
<guids> |
GUIDs of the devices you want to authorize. Separate multiple GUIDs with colons. |
[config] |
(Optional) Authorize the given devices, and force the configuration stored on the Code42 server to overwrite the configuration on the target devices. |
[show] |
(Optional) Show the authorization queue. |
Example:
sendAuthorize 111111111111111111:222222222222222222:333333333333333333 config
- Authorize the three devices with the GUIDs 111111111111111111, 222222222222222222, and 333333333333333333 and overwrite their local configuration files with the configuration file from the Code42 server
Shutdown
Shut down the Code42 server service.
Usage:
shutdown
Alias:
stop
exit
Space.show
Show the map names, keys in a map, or the value of a key.
Usage:
space.show {maps|<mapName>} [<keyPrefix>] [<limit>]
Argument | Function |
---|---|
maps |
Show the names of all maps in use. |
<mapName> |
Show all keys in the mapName map. |
[<keyPrefix>] |
(Optional) Filter the keys to only those that begin with keyPrefix . |
[<limit>] |
(Optional) Show only the first limit number of keys. |
Examples:
space.show maps
- shows the names of all maps in use
space.show default
- shows all keys in the 'default' map (the default limit is 100 keys)
space.show default /st/so/ 50
- shows the first 50 keys starting with '/st/so/' in the 'default' map
space.show default /st/so/destguid=42
- shows the object stored in map 'default' at key '/st/so/destguid=42'
System.alert
List, test, or clear system alerts.
Usage:
system.alert {list|test|clear [<type>]|info}
Argument | Function |
---|---|
list |
List all system alerts. |
test |
Generate a test alert for each type of alert. |
clear [<type>] |
Clear alerts. If the optional argument type is included, clear alerts of type type . If type is not included, clear all alerts on the Code42 server.Note: This command only clears alerts from the Code42 server on which you run the command. To clear all alerts in your Code42 environment, sign in to each server and run the command. |
info |
Show information on the types of alerts available. |
Test.email
Send one sample email or a set of sample emails.
Usage:
test.email <username> {customizable|code42|<templateKeyword>|<templatePath>}
For example:
test.email admin@example.com customizable
test.email admin@example.com code42
test.email admin@example.com backup_alerts
test.email admin@example.com /emails/templated/admin_initiated_password_reset.eml
Argument | Function |
---|---|
<username> |
Recipient of the sample email, given by a Code42 username. |
customizable |
Send emails that can be customized. |
code42 |
Send all Code42 emails. |
<templateKeyword> |
Send a specific email. Valid values are:
|
<templatePath> |
Send an email defined by a template stored in your Code42 server email templates path.
Following are some examples:
|
Usage.updater
Update the archiveBytes value with actual usage data from this Code42 server.
Usage:
usage.updater
Version
Print the version date/time string given a long version number.
Usage:
version [<number>]
Web
Control configuration of web server redirects on the Code42 server.
Usage:
web redirect {enable|disable|show|reload}
Argument | Function |
---|---|
enable |
Enable redirection of web server subfolders. |
disable |
Disable redirection of web server subfolders. All currently active Code42 console sessions are logged out and the Code42 for Enterprise web service restarts. |
show |
Show the full list of web server redirections. |
reload |
Reload the list of redirections from the configuration file stored on the Code42 server. |