Difference between revisions of "MailStore Server Management Shell"
[unchecked revision] | [unchecked revision] |
Line 43: | Line 43: | ||
= Command Overview = | = Command Overview = | ||
− | + | backup --target=<targetdirectory> [--nosync] [--skipreadonly] [--filegroups=1,2,...,4] | |
+ | |||
+ | Create a backup of the archive. | ||
+ | |||
+ | {| width=80% | | ||
+ | |- | ||
+ | | <code>--target</code> | ||
+ | | directory where to create the backup | ||
+ | |- | ||
+ | | <code>--nosync</code> | ||
+ | | copy all files; not only new or modified ones | ||
+ | |- | ||
+ | | <code>--skipreadonly</code> | ||
+ | | skip file groups marked as read only | ||
+ | |- | ||
+ | | <code>--filegroups=1,2,...,4</code> | ||
+ | | make backup of given file groups only | ||
+ | |} | ||
+ | |||
+ | clear | ||
Clears the texts currently displayed improving visibility. | Clears the texts currently displayed improving visibility. | ||
− | help | + | debug-console, debuglog-browse, debuglog-disable, debuglog-enable |
+ | |||
+ | Activates, displays or deactivates the global debug protocol (within computer scope). | ||
+ | |||
+ | export-execute [--name=<profilename>] [--id=<profileid>] [--verbose] | ||
+ | |||
+ | Executes the export profile with the name or the ID specified (only one of these parameters is required). The parameter --verbose activates a detailed status display on the console. | ||
+ | |||
+ | export-list | ||
+ | |||
+ | Displays a list of all existing export profiles (ID and profile name). | ||
+ | |||
+ | help | ||
Displays a list of all available commands and their parameters. | Displays a list of all available commands and their parameters. | ||
− | + | filegroup-attach --directory=<directory> | |
+ | |||
+ | With this command a file group, which has been removed from MailStore using filegroup-detach, can be reattached to MailStore. | ||
+ | |||
+ | filegroup-create --directory=<directory> | ||
+ | |||
+ | Create a new file group at the location given as <directory> | ||
+ | |||
+ | filegroup-detach --gid=<filegroupid> | ||
− | + | In Administrative Tools under Storage Locations, the status of a file group can be set to inactivate. The file group (along with the emails it contains) is no longer available until it is reactivated but remains in the list of existing file groups. By using the command filegroup-detach, a file group is completely removed from MailStore but physically remains on the hard drive. | |
− | + | filegroup-upgrade --gid=<filegroupid> | |
− | + | Upgrade file group with ID <filegroupid> to latest database version. | |
− | + | filegroup-verify --gid=<filegroupid> | |
− | + | Start a verification of the file group with ID <filegroupid>. | |
− | + | index-rebuild [--folder=<userfolder>] --gid=<filegroupid> | |
− | + | Rebuild full text index for file group with ID <filegroupid>. Rebuild can be limited to one folder only by supplying the --folder parameter. | |
− | + | import-execute [--name=<profilename>] [--id=<profileid>] [--verbose] [--user=<username>] | |
Executes the archiving profile with the name or the ID specified (only one of these parameters is required). The parameter --verbose activates a detailed status display on the console. | Executes the archiving profile with the name or the ID specified (only one of these parameters is required). The parameter --verbose activates a detailed status display on the console. | ||
− | + | import-list [--user=<username>] | |
− | + | Displays a list of all existing archiving profiles (ID and profile name). | |
− | + | maintain-db [--gid=<filegroupid>] --command=[backup-restore|sweep] | |
− | + | Information about this commands can be found in the chapter [[Maintenance_and_Repair|Maintenance and Repair]]. | |
− | + | process-info | |
Provides information about the MailStore-Windows process. | Provides information about the MailStore-Windows process. | ||
− | + | rpc-info | |
Provides information about the connection with the MailStore Server process. | Provides information about the connection with the MailStore Server process. | ||
− | + | session-logout | |
+ | |||
+ | |||
+ | statistics-refresh | ||
Recalculates all statistics. | Recalculates all statistics. | ||
+ | store-getprop --name=<propertyname> | ||
+ | |||
+ | store-setprop --name=<propertyname> [--value=<value>] | ||
+ | |||
+ | |||
+ | user-add --name=<username> --pwd=<password> | ||
+ | |||
+ | Add a new user MailStore integrated user and set password | ||
+ | |||
+ | user-info [--name=<username>] | ||
+ | |||
+ | Get information about currently logged in user or <username> if supplied. | ||
+ | |||
+ | user-list | ||
+ | |||
+ | Display list of users. | ||
+ | |||
+ | user-set-folder-access [--name=<username>] --folder=<folder> [--access=rwd] | ||
+ | |||
+ | Set folder access permissions <username> to <folder>. Value of --access parameter can be one ore more of these: read (r), write(w) and delete (d). | ||
+ | |||
+ | user-set-password [--name=<username>] --pwd=<password> | ||
+ | |||
+ | Set password of <username> to <password>. | ||
+ | |||
+ | user-set-rights [--name=<username>] [--rights=alcimend] | ||
+ | |||
+ | Set rights of <username>. Value of --rights parameter can be set to one of these: | ||
+ | : <code>a</code> - administrator (unlimited access rights) | ||
+ | : <code>l</code> - login | ||
+ | : <code>c</code> - change password | ||
+ | : <code>i</code> - execute import profiles (archive emails) | ||
+ | : <code>m</code> - modify existing import profiles | ||
+ | : <code>e</code> - execute export profiles | ||
+ | : <code>n</code> - modify export profiles | ||
+ | : <code>d</code> - delete emails | ||
+ | |||
maintain-db [--gid=<filegroupid>] --command=[backup-restore|sweep] | maintain-db [--gid=<filegroupid>] --command=[backup-restore|sweep] | ||
Revision as of 10:43, 7 June 2011
Many instructions available in the graphical user interface of MailStore Client can also be executed using MailStore's management shell, a command line client which is automatically included when installing MailStore Server and MailStore Client.
The management shell is useful when no graphical user interface is available (e.g. if using telnet or ssh) or for the integration of scripts (e.g. batch files) that are executed either manually or automatically.
Option 1: Starting the Management Shell in MailStore Client
The management shell can be started directly from MailStore: Log on to MailStore Client as administrator and click on Administrative Tools > Miscellaneous and then on Management Shell.
Option 2: Starting the Management Shell with MailStoreCmd.exe
The command line client can be started in interactive mode by executing MailStoreCmd.exe
without any parameters. After successful login, MailStore is ready to receive commands. Enter exit to log off and close the management shell.
Using MailStoreCmd.exe in Non-Interactive Mode
In non-interactive mode, the management shell logs on with the access data passed, executes the command passed, and automatically terminates upon execution. If the login and the execution of the command were successful, the exit code (ERRORLEVEL) of the process is set to 0 (zero), otherwise it is set to any value other than 0.
To use the non-interactive mode, pass the parameters as follows:
MailStoreCmd.exe --h="localhost" --pkv3="23:18:06:3f:24:7d:f3:83" --u="admin" --p="admin" -c <Actual Command and Parameter>
The following is a description of the parameters:
--h="localhost"
The machine name of the MailStore server to which MailStoreCmd.exe
is to connect.
--pkv3="..."
The (optional) Public Key Fingerprint, which guarantees the identity of MailStore Server.
--u="admin"
User name.
--p="admin"
Password.
-c
The actual command follows (non-interactive mode).
Command Overview
backup --target=<targetdirectory> [--nosync] [--skipreadonly] [--filegroups=1,2,...,4]
Create a backup of the archive.
--target
|
directory where to create the backup |
--nosync
|
copy all files; not only new or modified ones |
--skipreadonly
|
skip file groups marked as read only |
--filegroups=1,2,...,4
|
make backup of given file groups only |
clear
Clears the texts currently displayed improving visibility.
debug-console, debuglog-browse, debuglog-disable, debuglog-enable
Activates, displays or deactivates the global debug protocol (within computer scope).
export-execute [--name=<profilename>] [--id=<profileid>] [--verbose]
Executes the export profile with the name or the ID specified (only one of these parameters is required). The parameter --verbose activates a detailed status display on the console.
export-list
Displays a list of all existing export profiles (ID and profile name).
help
Displays a list of all available commands and their parameters.
filegroup-attach --directory=<directory>
With this command a file group, which has been removed from MailStore using filegroup-detach, can be reattached to MailStore.
filegroup-create --directory=<directory>
Create a new file group at the location given as <directory>
filegroup-detach --gid=<filegroupid>
In Administrative Tools under Storage Locations, the status of a file group can be set to inactivate. The file group (along with the emails it contains) is no longer available until it is reactivated but remains in the list of existing file groups. By using the command filegroup-detach, a file group is completely removed from MailStore but physically remains on the hard drive.
filegroup-upgrade --gid=<filegroupid>
Upgrade file group with ID <filegroupid> to latest database version.
filegroup-verify --gid=<filegroupid>
Start a verification of the file group with ID <filegroupid>.
index-rebuild [--folder=<userfolder>] --gid=<filegroupid>
Rebuild full text index for file group with ID <filegroupid>. Rebuild can be limited to one folder only by supplying the --folder parameter.
import-execute [--name=<profilename>] [--id=<profileid>] [--verbose] [--user=<username>]
Executes the archiving profile with the name or the ID specified (only one of these parameters is required). The parameter --verbose activates a detailed status display on the console.
import-list [--user=<username>]
Displays a list of all existing archiving profiles (ID and profile name).
maintain-db [--gid=<filegroupid>] --command=[backup-restore|sweep]
Information about this commands can be found in the chapter Maintenance and Repair.
process-info
Provides information about the MailStore-Windows process.
rpc-info
Provides information about the connection with the MailStore Server process.
session-logout
statistics-refresh
Recalculates all statistics.
store-getprop --name=<propertyname>
store-setprop --name=<propertyname> [--value=<value>]
user-add --name=<username> --pwd=<password>
Add a new user MailStore integrated user and set password
user-info [--name=<username>]
Get information about currently logged in user or <username> if supplied.
user-list
Display list of users.
user-set-folder-access [--name=<username>] --folder=<folder> [--access=rwd]
Set folder access permissions <username> to <folder>. Value of --access parameter can be one ore more of these: read (r), write(w) and delete (d).
user-set-password [--name=<username>] --pwd=<password>
Set password of <username> to <password>.
user-set-rights [--name=<username>] [--rights=alcimend]
Set rights of <username>. Value of --rights parameter can be set to one of these:
a
- administrator (unlimited access rights)l
- loginc
- change passwordi
- execute import profiles (archive emails)m
- modify existing import profilese
- execute export profilesn
- modify export profilesd
- delete emails
maintain-db [--gid=<filegroupid>] --command=[backup-restore|sweep]
maintain-ix --gid=<filegroupid> --command=[list|optimize|reload|verify|] [--ixid=<indexid>]
folder-reindex [--folder=<userfolder>] --gid=<filegroupid>
filegroup-verify --gid=<filegroupid>
Information about these commands can be found in the chapter Maintenance and Repair.