Calendar Server 7 Command-Line Utilities

Skip to end of metadata
Go to start of metadata

Calendar Server 7 Command-Line Utilities

Topics:

Overview of the Command-Line Utilities

Calendar Server provides a number of command-line utilities for administering the server. These utilities run under the umbrella command, davadmin, which is a simple shell script. The davadmin utility is installed in the cal-svr-base/sbin directory with user or group bin/bin permissions.

Note
The davadmin command-line utilities administer aspects of the server and do not affect any LDAP entries.

davadmin Security Enhancements

The davadmin command requires you to authenticate with a user name and password to be able to communicate with the server or database. You can use the davadmin passfile operation to store the necessary passwords in an encrypted wallet for use by subsequent davadmin commands. If you do not store passwords in the wallet, then you must enter them by using a no-echo prompt on the command line. See passfile Operation for more information.

Syntax

The syntax of the davadmin command is the following:

You can abbreviate the operation and action command-line parameters as long as they are unique to the other operations and actions. For example, for the command davadmin calendar list, you could use davadmin cale l. In this example, you must use at least the first four letters of calendar because "cal" conflicts with calcomponent.

The default action is list, for most commands, if the action is not specified on the command line. For example, davadmin account -a user lists the account information for user.

davadmin Class of Operations

Argument Description
version Prints version of the server. The GlassFish Server is queried for the version of Calendar Server deployed.
account Performs operations that affect the entire user or resource account.
backend

This argument is available starting in Calendar Server 7 Update 2.

Adds information for an additional back-end calendar store.
cache

This argument is valid starting in Calendar Server 7 Update 3 (Patch 8).

Performs operations on various Calendar Server caches.
calendar Performs calendar collection operations, such as create a collection, modify a collection, or delete a collection.
calcomponent

The calcomponent argument replaces the calresource argument starting in Calendar Server 7 Update 1.


Performs resource operations, such as listing resources that meet a specified criteria, importing resources, or deleting resources.
calresource

This argument is valid for Calendar Server 7.


Performs resource operations, such as listing resources that meet a specified criteria, importing resources, or deleting resources.
config Performs configuration operations, such as print a particular option, set a particular option, or list all options. Some configuration operations require that you restart Calendar Server. The davadmin config modify command informs you if the change requires you to restart Calendar Server to take effect. To stop and start Calendar Server, see Stopping and Starting Calendar Server.
db Performs database related operations, like backing up and restoring the database.
ldappool

This argument is available starting in Calendar Server 7 Update 3.

Performs ldappool operations, including creating, listing, and modifying LDAP pools.
migration

This argument is available starting in Calendar Server 7 Update 1.

Performs migration of Calendar Server 6 data to Calendar Server Server 7 Update 1 and greater.
passfile

This argument is available starting in Calendar Server 7 Update 2 Patch 5.

Creates, deletes, lists (as of Calendar Server 7.0.4.14.0), or modifies passwords in the password file.
vscan

This argument is available starting in Calendar Server 7 Update 2.

Performs virus scanning operations.

Each operation supports a list of additional parameters to pass information to the server. Some common options used by all operations (except davadmin db operations) are described in the Common Options table.

Note
Any option that contains special characters needs to be enclosed in quotes ("") so that they are passed "as is" to the davadmin command.
Note
If a portion of an option that is enclosed in quotes also needs to be quoted, you must use single quotes around that portion. For example:
davadmin calendar modify -n calendar -y "displayname='A new calendar name',acl=@:r"

Common Options

The following table describes the options that are common to the davadmin operations.


Common Options

Short Option Long Option Description Required or Optional
-u adminuserid --userid MySQL Server or Oracle Database user ID for db commands, GlassFish Administrator user ID for all other commands. Required unless you provide it through a CLI file by using the -F option, or you are displaying usage by using the -h option.
-W

This option is available starting in Calendar Server 7 Update 2 Patch 5.

--usepasswordfile Get passwords from the password file. You use the The davadmin passfile command to create the password file. You can add passwords for the GlassFish Server administrative user, the migration server user, the database, and the document store.
Optional. If the password file does not exist or does not contain the needed password, you are prompted for the password.
-F file --clifile File with bootstrap information that you use to specify command-line options so that they don't have to be entered at the command line. Each line in the bootstrap file is in the form property=value. Note that some commands also have a -f, --file option, which provides additional batch input specific to those commands.

For possible properties see the Clifile Properties table.
Required unless all necessary information is provided on the command line or in the davadmin.properties file. See Options Precedence for more information on priority order of options, the clifile and the davadmin.properties file.

A path to the clifile file can also be specified by the DAVADMIN_CLIFILE environment variable.
-H host --hostname Server host name. Optional. Defaults to localhost.
-p port --port GlassFish administration port (JMX connector port) and MySQL Server or Oracle Database port for db commands. The GlassFish administration port can be found in the domain's domain.xml file or in the Administration Console (Configuration->Admin Service->system). Optional. Defaults to 3306 for db commands and 8686 for other commands.
-s path --secure Path to the truststore file used for a secure connection (HTTPS). Optional. Required if GlassFish is running in secure mode. Not applicable for db commands.
-e --detail Verbose output. Mostly used if a command returns an error.
Optional.
-q --quiet Quiet mode for scripts. Optional.
-h --help Help for that particular operation. Optional.
-V --version Lists version of davadmin utility. (Checks the local package version on disk, which could be different than what has been deployed to GlassFish Server, for example, in the case where a patch was added but the init-config command has not yet been run.) Optional. Usable only by itself and not with other options.

Each operation can have its own specific options, as the following sections show.

Clifile Properties

The following table describes the possible properties in the bootstrap file (clifile):

Clifile Properties

Property
Description
userid GlassFish Administrator user ID.
usepasswordfile

This option is available starting in Calendar Server 7 Update 2 Patch 5.

Use the password file. Unless this property is empty, 'n', 'no' or 'false', the password file is used.
hostname Server host name.
port Glassfish administration port (JMX port).
secure
Path to the truststore file used for a secure connection (HTTPS).
dbuserid MySQL Server or Oracle Database user ID.
dbhost

The dbhost property replaces the dbhostname property starting in Calendar Server 7 Update 2.

Host name where the database server resides.
dbhostname

This argument is valid for Calendar Server 7 and Calendar Server 7 Update 1.

Host name where the database server resides.
dbport Port on dbhost for access to the database.
database Specifies the name of the DAV store to be saved or updated.
docstore Specifies the document store (remote store specified as host:port or local store by fully qualified path to root of document store)
migrationadminuser Administrative user to authenticate to Calendar Server 6 host.
migrationserverport Server and port information to connect to the Calendar Server 6 host from which data needs to be migrated. The format is host:port.

Options Precedence

You can provide options to the davadmin command by:

  • Using the command line
  • Using the clifile
  • Including them in davadmin.properties file

Any user can create a clifile. Only the root user can use the davadmin.properties file. The davadmin.properties file is installed in the config directory of the installation (default location is cal-srv-base/config).

When you run the davadmin command, any option that you include on the command line takes precedence over any like option in the clifile or the davadmin.properties file. Use of the clifile or the davadmin.properties file is mutually exclusive. If you use the clifile, use it for any option that is not on the command line. If you run the davadmin command as root and do not supply a clifile, the davadmin.properties file is used for any option that is not on the command line.

The davadmin.properties file usually contains options for userid, hostname, port, secure, dbhost, dbport, and dbuserid.

version Example

  • To display the current Calendar Server version (starting with Calendar Server 7 Update 2, you are prompted to enter the administrative password):

account Operation

The davadmin account command can be followed by one of the following actions.

Actions for account Operation

Command Description
create

This command is available starting in Calendar Server 7 Update 2.

Creates an account for user who has been provisioned in the LDAP Directory Server. The user must have an email address.
delcomponents

This command is available starting in Calendar Server 7 Update 2.

Deletes components from all of the calendars belonging to an account or a set of accounts. Use the -d option to specify deletion of all components older than this number of days.
delete Deletes an account.
list Lists properties of an account. Starting with Calendar Server 7 Update 2 Patch 5, list displays managed calendars for an account. These are all the calendars for which the account is the owner or has "all" rights. Also, list displays the users' subscribed calendars list. list is the default action, if it is not included on the command line, for most commands.

Starting with Calendar Server 7 Update 3, you can use the davadmin account list command without the -a option to list all current users in the Calendar Server database. You can get either a simple list, which contains one user per line, or a detailed list, which contains complete information about the user's account. The options affected by this change are -a, -f, and -B, and the new option in Calendar Server 7 Update 3, -v.
modify Modifies an account.
repair

This action is available starting in Calendar Server 7 Update 2.

Repairs the user's email address in the database entries after an LDAP email change occurs. When used with the -o option, repair updates the owner lists of all accounts.
subscribe

This action is available starting in Calendar Server 7.0.4.14.0.

Subscribe to a calendar belonging to another user. That other user must grant the requesting user access before this can be done.
unsubscribe

This action is available starting in Calendar Server 7.0.4.14.0.

Remove a calendar from a user's subscription list.

The account operation is followed by these parameters.

Options for account Operation

Short Option Long Option Description
-a account --account Required. Principal account information provided as email address. You can also supply the account information with the DAVADMIN_ACCOUNT environment variable.
-y property --property Comma-separated list of all property=value options for the specified calendar.
Possible properties include:
acl - The scheduling privileges set on the account. For more information about ACLs, see Administering Calendar Server Access. set-ace (available starting in Calendar Server 7.0.4.14.0) - Sets one or more individual ACEs in the ACL. semi-colon separated list of ACEs.
remove-ace (available starting in Calendar Server 7.0.4.14.0) - Removes one or more individual ACEs from the ACL. Semi-colon separated list of ACE principals. ACE principals are in the form: @, @domain,group@domain, or user@domain.
notifemail - Email notification enable flag. 0 = disabled, 1 = enabled
notifrecipients - Recipients of email notifications. Multiple values are separated by a space.
delegate_notifaddr - Accounts that are delegates for this account. Multiple values are separated by a space.
owner - The new owner of the resource. This option is not available for user owned accounts. Starting with Calendar Server 7 Update 2 Patch 5, owner updates the owner lists of the old owner and the new owner with the right list of resource accounts they own.
attendanceflag - Flag controlling behavior on invitation. Possible values are:
   0 - no autoaccept, no booking conflict check, no recurrence check on invitations.
   1 - autoaccept invitations
   2 - autodecline if invitation results in booking conflict.
   3 - autoaccept invitation and autodecline on booking conflict.
   4 - autodecline recurring meeting invitations.
   5 - autoaccept invitations and autodecline recurring meeting invitations
   6 - autodecline recurring invitations and invitations that cause a booking conflict.
   7 - autoaccept invitations, autodecline recurring invitations and invitations that cause a booking conflict.
-f --file
Local input file with one line for each account, for batch operation. Each line has the format user}:properties, where properties is a comma-separated list of property settings as specified in the -y option.
-B
--ldapbaseuri
Base URI in LDAP.
-R
--ldapfilter
User search filter in LDAP. Default is (objectClass=icsCalendarUser)
-r
--force
Force the operation (do not prompt for confirmation).
-h --help Displays davadmin account usage help.
-c

This option is available starting in Calendar Server 7.0.4.14.0.

--collectionuri The full path of a collection to be added to a user's subscription list. For example, /home/user@example.com/mycal1/. Be sure to include the / at the end of the path.
-C

This option is available starting in Calendar Server 7.0.4.14.0.

--collectionuris The full path to a file which holds full paths of collections to be added to a user's subscription list. Each line is a path. For example: /home/user2@example.com/cal1/

The delete operation is followed by these parameters.

Options for delete Operation

Short Option Long Option Description
-a account --account Required. Principal account information provided as email address. You can also supply the account information with the DAVADMIN_ACCOUNT environment variable.
-d
--days
Number of days. Delete the components older than these many number of days. Applies only to the davadmin account delcomponents command.
-g uniqueID NA The principal account described by the database uniqueID, if -a fails.

The repair operation is followed by these parameters.

Options for repair Operation

Short Option Long Option Description Default?
-m

This option is available starting in Calendar Server 7 Update 2 Patch 5.

--email Repairs the user's email address after an email change. Valid only for the repair action. Specify users with either the -a or -f options. Yes
-o

This option is available starting in Calendar Server 7 Update 2 Patch 5.

--ownerlists Updates the owner lists of all accounts. Valid only for the repair action. No

The davadmin account list command has the following options.

davadmin account list Options

Short Option Long Option Output Comments
-a --account The detailed account information for this user. If the user is not in the database, the system displays an "Unknown user:" message. The DAVADMIN_ACCOUNT environment variable, if set, is not used in place of the -a option. If -a is not supplied on the command line, a list of all users in the database will be displayed.
-f --file A list of the users in the file. The system displays an "Unknown user:" tag before the names of users in the file that are not in the database. No comments.
-B uri --ldapbaseuri Base URI in LDAP. Searches LDAP for a set of users and then displays the users from that list that exist in the database. No comments.
-v

This argument is available starting in Calendar Server 7 Update 3.

--verbose Detailed information is displayed about each of the users in the database. Used with the -f and -B options.

account Examples

  • To list the account for a user:
  • To create an account for user1@example.com:
  • To create an account for user1 under the LDAP base o=isp (the user has to be previously provisioned in LDAP):
  • To create an account for all users whose uid starts with "user1" (the users have to be previously provisioned in LDAP) and have all of their notifemail properties set to disabled:
  • To create the calendar account with default calendar for a provisioned resource:
  • To delete an account:
    Note
    This deletes the account from the calendar database. To completely remove the account from LDAP, see To Remove Calendar Users.
  • To delete a user's calendar entries, with all events and todos prior to and including today:
  • To set the scheduling rights on John Smith's account to allow Jane Doe to schedule events and all other users to just do free busy checks:
  • To clear a resource's owner field (Calendar Server 7 Update 2 Patch 5 and greater):

    After running this command, the resource then has no owner.

  • To repair the owner list for a resource account:
  • To set the value of two individual ACEs in the ACL:
  • To remove an individual ACE from the ACL:
  • To create two accounts and set their properties by using an input file (starting with Calendar Server 7.0.4.14.0):
    Input File:
    user1@example.com:notifemail=0,attendanceflag=5
    user2@example.com:notifemail=1,notifrecipients=user4@example.com;user3@example.com
    

    Command:

  • To modify the previous two accounts and set their properties by using an input file (starting with Calendar Server 7.0.4.14.0):

backend Operation

This argument is available starting in Calendar Server 7 Update 2.

The following table describes the possible actions for the backend operation.

Actions for backend Operation

Command Description
create Configures a new back-end calendar store configuration on the front end.
list Lists the back-end calendar store(s). This is the default action if not included on the command line.
purge

This argument is available starting in Calendar Server 7 Update 3.

Immediately purges calendar data marked for expiration from Calendar Server back-end database(s).

The backend operation is followed by these parameters.


Options for backend Operation

Short Option Long Option Description Required or Optional
-n --name Name of the backend. Required for create command.
-j --jndiname The jndi name of the JDBC resource of the back end. Required for create command.
-d --dbdir The path to the local document store directory. Required for create command and if document store is local.
-S --ashost The host name of the remote document store. Required for create command and if document store is remote.
-P --asport The port number of the remote document store. Required for create command and if document store is remote.

backend Examples

  • To list the back ends:
  • To create a new back end with a local document store:
  • To create a new back end with a remote document store:
Caution
The davadmin backend create command alone is not enough to completely configure a new back-end store. For more information, see Configuring Multiple Calendar Server Back-end Hosts.
  • To immediately purge calendar data that has been marked for expiration from the default back end:

cache Operation

The davadmin cache command can be followed by the following action.

Action for cache Operation

Command Description
clear

This command is available starting in Calendar Server 7 Update 3 (Patch 8).

Clears the various Calendar Server caches.

The cache operation is followed by this parameter.

Option for cache Operation

Short Option Long Option Description Required or Optional
-t --cachelist Comma-separated list of caches, possible values are:
  • acl - ACL string cache corresponding to a URI and LDAP subject entry corresponding to each calendar collection. Otherwise cleared according to the configuration options of davcore.acl.aclcachesize and davcore.acl.aclcachettl.
  • domainmap - Cache of information on domains retrieved from LDAP. Otherwise cleared according to the configuration options of base.ldapinfo.cachesize and base.ldapinfo.cachettl.
  • ldapauth - Cache of logged-in principals' login ID and passwords (encrypted). Otherwise cleared according to the configuration options of base.ldapinfo.cachesize and base.ldapinfo.cachettl.
  • uri - Cache mapping LDAP subjects and URIs. Otherwise cleared according to the configuration options of davcore.uriinfo.ldapcachesize and davcore.uriinfo.ldapcachettl.
Optional.

calendar Operation

The davadmin calendar command can be followed by one of the following actions.

Actions for calendar Operation

Command Description
create Creates a calendar collection. Autocreates the account, if it does not exist.
modify Modifies a calendar collection.
delete Deletes a calendar collection.
list Lists an account's calendars or details of a particular calendar (if the -n option is provided). This is the default action if not included on the command line.

The calendar operation is followed by these parameters.

Options for calendar Operation

Short Option Long Option Description
-a account --account Required. Principal account information provided as email address. You can also supply the account information with the DAVADMIN_ACCOUNT environment variable.
-n collection --name The unique calendar collection name that corresponds to the last part of the calendar collection URI. For the default calendar, collection it is always calendar. This name might not correspond with the calendar's display name at all times. If you are unsure of the calendar name, use the davadmin calendar list command to list all calendars and find out the calendar names.
-y property --property Comma-separated list of all property=value options for the specified calendar.
Possible properties include:
set-ace (available starting in Calendar Server 7.0.4.14.0) - Specifies a semi-colon separated list of ACEs to add or modify to the calendar permissions (ACL).
remove-ace (available starting in Calendar Server 7.0.4.14.0) - Specifies a semi-colon separated list of ACE principals that are to be removed from the calendar permissions (ACL). The ACE principal is the user, group, domain, or all portion of the ACE not including the ":" and permission.
displayname - The calendar name. Defaults to the name given with the -n option.
calendar-description - Description string. No default.
supported-calendar-component-set - Space-separated list of supported components. The default is VEVENT VTODO VFREEBUSY. This option is only available for creation of secondary calendars. It cannot be used for creation of the default calendar.

The following properties are available starting in Calendar Server 7 Update 1.


wcaptzid - The timezone tzid set on the calendar, for example, America/Los_Angeles.
acl - The access control string set on the calendar. For more information about ACLs, see Administering Calendar Server Access.
-f file --file Local commands input file for batch operation.
Each line has colon-separated entries for account information, calendar name, and property list. For example:
user1@example.com:testcal:calendar-description=user1's test cal
-h --help Displays davadmin calendar usage help.

calendar Examples

  • To create an additional calendar with the given name for the specified user account:

The name, which is a required parameter, builds the new calendar's URI and sets its display name. This is the name that would be used for the -n option for any further davadmin calendar commands. This cannot be changed. The display name can be modified later by using the davadmin calendar modify command with the -y displayname option.

  • To list a summary of the calendar specified by name:
  • To delete a calendar specified by name:
  • To set the access rights on John Smith's default calendar to give Jane Doe all rights and only read rights to everyone else:

calcomponent Operation

The calcomponent argument replaces the calresource argument starting in Calendar Server 7 Update 1.

The davadmin calcomponent command can be followed by one of the following actions.

Actions for calcomponent Operation

Command Description
list Displays a summary of all of the resources in a calendar or the specifics of one resource. This is the default action if not included on the command line.
delete Deletes a resource or all of the resources in a calendar.
import Imports resource data into a calendar.
export Exports resource data from a calendar.

The calcomponent operation is followed by these parameters.

Options for calcomponent Operation

Short Option Long Option Description
-a account --account Required. Principal account information provided as email address. You can also supply the account information with the DAVADMIN_ACCOUNT environment variable.
-n collection --name The unique calendar collection name that corresponds to the last part of the calendar collection URI. The default value used is the principal's default calendar. If you are unsure of the calendar name, use the davadmin calendar list command to list all calendars and find out the calendar names.
-y property --property Comma-separated list of all property=value options for specified calendar.
Possible properties include:
type - The component type or types. Possible values are VEVENT and/or VTODO. If you use both VEVENT and VTODO, enclose them in double quotes and separate them with a space.
start - The start of a time range used in the search. The format of this value is yyyymmddThhmmssZ. This value is in Zulu time. (The T is a separator between the day and time.)
end - The end of a time range used in the search. The format of this value is yyyymmddThhmmssZ. This value is in Zulu time. (The T is a separator between the day and time.)
-h --help Displays davadmin calcomponent usage help.
-i --uri URI of resource to request entire content.
-r --force Forces a delete operation so that you are not prompted for confirmation. This option is generally needed for scripts.
-m --import-path Path to the file on the server machine, containing data to be imported.
-x --export-path Path to the file where the exported data is to be stored.
-l --logpath Path to where the log directory is located. Starting with Calendar Server 7 Update 2 Patch 5, the davadmin calcomponent import command enables the import to continue even if an error occurs on an item being imported.

calcomponent Examples

  • To list the calendar resources in the user's default calendar:
  • To display the contents of a particular calendar resource:
  • To list only a calendar's tasks:
  • To list all calendar resources from March 3, 2009 through March 4, 2009:
  • To delete the event resources from March 3, 2009 through March 4, 2009, assuming that the local time zone is Pacific Time:
  • To delete a user's calendar entries, with some start/end date range:

config Operation

The davadmin config command can be followed by one of the following actions.

Actions for config Operation

Command Description
list

This argument is available starting in Calendar Server 7 Update 2.

Lists all configuration settings. This is the default action if not included on the command line.
modify

This argument is available starting in Calendar Server 7 Update 2.

Modifies a configuration setting.

At least one of the following options can be provided, unless you are displaying usage by using the -h option. See Calendar Server 7 Configuration Parameters for the complete list of configuration parameters.

Options for config Operation

Short Option Long Option Description
-o option --option Configuration option name. Gets the optional value if specified without -v. Sets the option value if specified with a -v.
-v value --value Configuration option value.
-f file --file Local file with list of configuration option=value entries for setting. Pay attention to backslashes included in this input file. Backslashes are treated as an escape character for the next character in the line. For a single backslash to be properly interpreted in a string, you must precede each backslash with another backslash; that is, use an additional backslash. For example, to include the string "^/principals/\z", you would use "^/principals/
z". This is due to the way that Java reads in properties files. For more information, see the load(Reader reader) method of the java.util.Properties class at http://docs.oracle.com/javase/6/docs/api/index.html.
-M

This argument is available starting in Calendar Server 7.0.4.14.0.

--modonly Lists the modified configuration properties (non-default values).
-d

This argument is available starting in Calendar Server 7.0.4.14.0.

--default Sets the value to the default when used with the modify action. Lists the default value when used with the list action.
-h --help Description of config option if specified with -o. Otherwise, usage of davadmin config.

config Examples

  • To show all configuration parameters (starting with Calendar Server 7 Update 2):
  • To show all configuration parameters (prior to Calendar Server 7 Update 2):
  • To show the current setting for the error log:
  • To set the error log to accept "finest" messages:
  • To list the default setting (starting with Calendar Server 7.0.4.14.0):
  • To modify to the default setting (starting with Calendar Server 7.0.4.14.0):

db Operation

The davadmin db command can be followed by one of the following actions.

Actions for db Operation

Command Description
backup Backs up a database.
init Completely initializes the database.
Caution
All data will be lost.

list List contents of a backup file. This is the default action if not included on the command line.
restore Restores the contents of a database.

Starting with Calendar Server 7.0.4.14.0, the davadmin db backup, list, and restore commands require that you specify the associated document store by using the -A option, or the docstore option in the clifile.

Note
If you are using a remote document store, you must set the document store password on the Calendar Server host by using the davadmin passfile command and that password must match the one set for the remote document store. This password is used whenever the backup or restore commands access the remote document store.

The db operation can be followed by these parameters in addition to the common parameters:

Options for db Operation

Short Option Long Option Description Available for Following Actions
-d --database Specifies the name of the DAV store to be saved or updated. The default is caldav. backup, restore, list
-H --dbhost Specifies the database host. The default is localhost.
All
-p --dbport Specifies the database port. The default is 3306. All
-u --dbuser Specifies the database user. All
-k --bkfile Specifies the path of the file where the database information is to be saved. Required. backup, restore, list
-b --bkfactor Specifies blocking factor used during backup. The default is 20. backup, restore, list
-T --token Specifies the incremental backup token or start time in milliseconds. backup
-D --domain Domain name for per domain backup. backup
-a --account User account email value for per user backup. backup
-i --ipath Specifies the internal path for partial list or restore. restore, list
-c --contents List the resources and header. list
-A

This option is available starting in Calendar Server 7 Update 1.

--docstore Specifies the document store (remote store specified as host:port or local store by fully qualified path to root of document store). backup, restore, list
-t

This option is available starting in Calendar Server 7 Update 2.

--dbtype Specifies the type of database, either mysql or oracle. The default is mysql. All
-O --overwrite Overwrites existing data. backup, restore
-s

This option is available starting in Calendar Server 7.0.4.14.0.

--dbsecure Supplies the path to the trustStore file that contains the SSL certificate for secure communications with the remote document store. backup

db Examples

  • To perform a full database backup:
  • To perform a full backup for a particular user:
  • To perform an incremental backup:
  • To perform a full backup for a particular domain:
  • To perform a restore from a backup file:
  • To restore from a backup file and overwrite a calendar:
  • To back up using SSL and the trustStore file (starting with Calendar Server 7.0.4.14.0):

ldappool Operation

This argument is available starting in Calendar Server 7 Update 3.

The davadmin ldappool command can be followed by one of the following actions.

Actions for ldappool Operation

Command Description
create Creates an LDAP pool and sets its configuration parameters.
modify Modifies the LDAP pool's configuration parameters.
delete Deletes an LDAP pool.
list Lists an LDAP pool's configuration, or all LDAP pools' configuration. (This is the default action.)

The ldappool operation is followed by these parameters.

Options for ldappool Operation

Short Option Long Option Description
-n poolname --name The name of the LDAP pool.
-y property --property Comma-separated list of all property=value options for the specified LDAP pool. Properties are appended to base.ldappool.name to produce the configuration parameters for the LDAP pool. Possible properties include:

ldaphost - Space-delimited list of host names. Each host name can include a trailing colon and port number.
ldapport - Port number to which to connect. Ignored for any host name which includes a colon and port number.
ldapusessl - Use SSL to connect to the LDAP host. Value can be true or false.
binddn - Distinguished name to use when authenticating.
bindpassword - Password to use when authenticating.
ldappoolsize - Maximum number of connections for this pool.
ldaptimeout - Timeout, in seconds, for all LDAP operations.
ldappoolrefreshinterval - Length of elapsed time, in minutes, until the failover Directory Server reverts back to the primary Directory Server. If set to -1, no refresh occurs.
-f file --file Local input file with one line for each account, for batch operation, containing lines in the form pool_name:property_list. The properties are the same ones available for the -y option. For delete operations, only pool_name is used.
-r --force Force the operation (do not prompt for confirmation).
-h --help Displays davadmin ldappool usage help.

ldappool Examples

  • To create an LDAP pool named myldap:
  • To update an LDAP pool by using properties from a file:
  • To delete an LDAP pool:
  • To list all existing LDAP pools:
  • To list the configuration parameters of a specific LDAP pool:

migration Operation

The following feature documented in this section is available starting in Calendar Server 7 Update 1.

For more information on migrating from Sun Java System Calendar Server 6 to Oracle Calendar Server 7, see Migrating From Sun Java System Calendar Server 6 to Calendar Server 7.

The davadmin migration command can be followed by by one of the following actions.

Actions for migration Operation

Action
Description
migrate Migrates the specified user(s).
status Gets the current status of the migration operation.

The migration option supports all davadmin common options. The default action for migration is migrate. In addition, the migration option supports the following options:

Options for migration Operation

Short Option Long Option Description Required
-a --account Principal account information of the user to be migrated, provided as email address. Required unless batch mode is used and account information provided in files, or ldapfilter used.
-X --migrationadminuser Administrative user to authenticate to Calendar Server 6 host. Required unless information is provided in clifile.
-L --migrationserverport Server and port information to connect to the Calendar Server 6 host from which data needs to be migrated. The format is server:port. Required unless information is provided in clifile.
-l log-directory --logpath Logs information about the migration status. Optional. Defaults to the Calendar Server 7 log directory.
-f --file Local input file for batch operation. Each line contains the email address for an account. Optional if using the -a option for single user migration, or an LDAP base URL is provided by using the -B option.
-S --clientssl Use SSL when making client connections. Optional.
-B --baseuri Base URL in LDAP. All users under the URL are migrated. Required if -a or -f options are not specified.
-R --ldapfilter User search filter in LDAP. Default is objectclass=icsCalendarUser.
Optional.
-T --starttime Start date for events and tasks to be migrated. The format of this value is yyyymmddThhmmssZ. This value is in Zulu time. (The T is a separator between the day and time.) Optional.
-c --capture Captures trace information and details regarding the migration.
Optional. Useful if migration fails but produces a large amount of output.
-G --tag Log tag to use to check status. This is the path to the master log file that is output when the migration command is executed.
Required for status check.
-h --help Usage of davadmin migration. Optional.

For more information, see Migration Logging.

The clifile that is provided through the -F option can be used to provide entries for migrationadminuser, migrationadminpassword (prior to Calendar Server 7 Update 2), and migrationserverport. Note that the long option for -x is --migrationadminpasswordpath (prior to Calendar Server 7 Update 2), a path to the password file, but the entry in the clifile is migrationadminpassword, because it is just a password.

migration Examples

  • To perform a migration of user1's calendar (prior to Calendar Server 7 Update 2):
  • To perform a migration of a list of users using the clifile for most of the input values (prior to Calendar Server 7 Update 2):

Where user_list contains:

user1@example.com
user2@example.com
user300@example.com

and the mig_clifile contains:

userid=admin
hostname=localhost
port=8686
secure=/admin/truststore
migrationadminuser=calmaster
migrationserverport=cs6host.example.com:8080
  • To find the users to migrate based on an LDAP base URI and an LDAP filter (uid):
  • To find the users to migrate based on an LDAP base URI and an LDAP filter (objectclass):

passfile Operation

This argument is available starting in Calendar Server 7 Update 2 Patch 5.

When running the davadmin command, instead of having to enter passwords at the no-echo prompt, you can supply passwords by using the password file. The password file is an encrypted "wallet," which holds all passwords that davadmin might use. The davadmin passfile operation is used to create, delete, or modify this password file.

The davadmin passfile command can be followed by by one of the following actions. The default action is list.

Actions for passfile Operation

Action
Description
create Creates the password file. If it already exists, modifies it.
delete Deletes passwords in the password file. For each password, you are asked if it should be removed.
list Displays all passwords in the password file.
modify Modifies passwords in the password file.

The passfile command supports the following option.

Option for passfile Operation

Option Description Available for Following Actions
-O

This option is available starting in Calendar Server 7 Update 3.

Run the passfile command in standalone mode when access to the Calendar Server is not needed. This is used when setting, deleting, and listing the document store password and SSL passwords on the remote document store host. create, delete, list, modify

passfile Examples

  • To modify the migration administrative password and add the document store password:
  • To remove the database administrative password:
  • To change the password for the remote document store on the remote host. This command must be run on the remote host:
  • To list all of the passwords:
  • To set the document store passwords used for SSL communications:

vscan Operation

This argument is available starting in Calendar Server 7 Update 2.

The davadmin vscan command takes one action, scan, which is the default.

Actions for vscan Operation

Action
Description
scan Scans calendar data for viruses.

Options for vscan Operation

Short Option Long Option Description
-u adminuserid --userid The GlassFish Server administrator's user name. Required unless you provide it through a CLI file by using the -F option, or you are displaying usage by using the -h option.
-F file --clifile File with bootstrap information that you use to specify command-line options so that they don't have to be entered at the command line. Each line in the bootstrap file is in the form property=value. For possible properties see the Clifile Properties table. Required unless all necessary information is provided on the command line or in the davadmin.properties file. See Options Precedence for more information on priority order of options, the clifile and the davadmin.properties file. A path to the clifile file can also be specified by the DAVADMIN_CLIFILE environment variable.
-H host --hostname Host name of the server. Optional, defaults to localhost.
-p port --port GlassFish administration port (JMX connector port). The GlassFish administration port can be found in the domain's domain.xml file or in the Administration Console (Configuration->Admin Service->system. Optional. Defaults to 8686.
-s path --secure Path to the truststore file used for a secure connection (HTTPS). Optional. Required if GlassFish is running in secure mode.
-a account --account The account information (email address) of the user to be scanned.
-n name --name The name of the target backendID.
-B uri --ldapbaseuri Base URI in LDAP.
-R filter --ldapfilter User search filter in LDAP. Default is (objectClass=icsCalendarUser).
-T time --starttime Scan data entered into the server after this time. Format: yyyymmddThhmmssZ"
-r --force Force delete any data found as a positive hit during the virus scan. This overrides the davcore.virusscan.clivirusaction variable. So with davcore.virusscan.clivirusaction set to empty string (no delete) viruses are listed in the scan log after a scan. Then you can add a -r to the scan to delete offending data after review, without needing to change the virus scan configuration varaiables.
-h --help Help for that particular operation. Optional.

vscan Examples

The davadmin vscan command operates through the GlassFish Server, and can thus operate on any of the back ends configured with the specific Calendar Server. (There may very well only be one.)

  • To list the back ends:

Normally you would want to scan the "defaultbackend" since that is where calendar user's events and attachements are stored.

  • To scan the entire default back end:
  • To scan a single user's data given their calendar server registered email address:
  • To use LDAP base and filter to specify one or more users to scan:

In this example, using just a uid filter might not be specific enough in the case of multiple domains. Perhaps use ldapsearch to test filters if needed.

  • To scan data at or beyond February 14th, 2011, 1am Zulu:

Specifying a -T only scans data at the specified time and later, and is a big time saver for ignoring older data already scanned. Note that in the scan log, the time just before the scan began is printed at the end of the run so it can be used with the -T option in the next scan if no new virus rules are relevant.

Note
The davadmin vscan command uses the same virus scan configuration as online virus scan, however it does not use the onlineenable variable. Thus, you can run command-line scans without needing to affect incoming data if desired.

Tool-Only Options

Two options, -V and -h, can be used without any operation specified. The -V option prints the version of the command-line utility. The -h option prints the general usage.

Exit Code

The tool exits with exit code 0 on success and 1 on failure.

JConsole

The data and operations exposed by the MXBeans in the CalDAV server are accessible and modifiable by using JConsole. All Admin Beans can be found under com.sun.comms.davserver.adminutil.

AdminAccountMXBean Operation

Provides createAccounts, deleteAccounts, listAccounts, modifyAccounts, deleteCalComponents and fixAccountMail operations.

AdminBackendMXBean Operation

Provides createBackend and getBackends operations.

AdminCalComponentMXBean Operation

Provides getCalComponentInfo, getCalComponents, deleteCalComponents, importCalComponents and exportCalComponents operations.

AdminCalendarMXBean Operation

Provides createCalcollection, modifyCalCollection, deleteCalCollection and getCalCollections operations.

AdminConfigMBean Operation

You use the getConfigParam and setConfigParam operations to get and set configuration options. The AllConfigParams operation provides a list of the configuration parameters. The value in JConsole is displayed as a "java.lang.String[]" array and double-clicking this field shows the individual parameters. The getConfigParamDescription operation is used to get a detailed description of a parameter.

AdminMigrationMXBean Operation

Provides checkStatus and migrate operations.

AdminMiscMXBean Operation

The version attribute of this MBean provides the server version.

AdminUtilMXBean

This is the super class for all Admin...MXBeans. It provides the checkConnection operation.

Notes

If GlassFish is running in a secure mode, JConsole needs to be started with the truststorepath (-Djavax.net.ssl.trustStore) and optionally truststorepassword (-Djavax.net.ssl.trustStorePassword) passed in.

Summary of davadmin Changes by Release

Topics in this section:

Changes in Calendar Server 7 Update 1

  • The calresource operation has been renamed to calcomponent.
  • The migration operation has been added for migration of data from Calendar Server 6.3 to Calendar Server 7.
  • The account operation has been added to enable listing, deletion, and properties modification of user accounts.
  • The calendar operation has been enhanced to enable setting of more calendar properties.

Changes in Calendar Server 7 Update 2

  • The davadmin command has been made more secure in Calendar Server 7 Update 2 by the removal of the capability to "pass in" passwords by using a password file. All davadmin passwords must now be entered by typing in to a no-echo prompt.
  • The backend and vscan arguments have been added.
  • The dbhost property replaces the dbhostname property.
  • The create, delcomponents, and repair actions have been added to the account operation.
  • The config -l option has been removed. Use config list now.
  • The -t option has been added to the davadmin db command.
  • The list and modify actions have been added to the davadmin config command.

Changes in Calendar Server 7 Update 2 Patch 5

  • The davadmin command has also been updated to list calendars belonging to resource accounts owned by a user.
  • To clear a resource's owner field, run the davadmin account modify -a resource -y owner="" command.
  • The repair operation has been enhanced to include the -m option, to repair the user's email address after an email change, and the -o option, to update the owner lists of all accounts.
  • The list operation displays managed calendars for an account.
  • The davadmin calcomponent import command enables the import to continue even if an error occurs on an item being imported.
  • You can create a password file for use with the davadmin command to store administrator passwords for the GlassFish Server administrative user, the migration administrative user, and the database user.

Changes in Calendar Server 7 Update 3

  • The passfile option has been updated to accommodate setting a password on the local and remote document store.
  • A new command, davadmin ldappool, has been added to support LDAP pools (which are used in configuring external Directory Server authentication).
  • The davadmin account list command now displays a list of all users in the database and their details.

Changes in Calendar Server 7.0.4.14.0

  • The -v option to davadmin account list displays the details of each account at the same time.
  • The davadmin account command takes subscribe and unsubscribe actions, so that a Calendar Server administrator can subscribe or unsubscribe calendars for a user. The subscribe and unsubscribe actions take either a single collection path on the command line, specified by -c, or a set of collection paths in a file, specified by -C.
  • The davadmin config list -M lists changed options only.
  • The davadmin config -d option sets the value to the default when used with the modify action. Additionally it lists the default value when used with the list action.
  • The davadmin account -y operation and davadmin -y calendar operation take the set-ace and remove-ace properties.
  • The davadmin db -s operation supplies the path to the trustStore file that contains the SSL certificate for secure communications with the remote document store.
  • You can now set account properties with the new account operation option by using an input file (-f option. In previous releases, the -f option used to only allow a user name per line. Now it allows a user name followed by properties for that user.
  • The davadmin account upgrade operation sets the next presence triggers for all existing events in the future. You must run davadmin account upgrade after upgrading from Calendar Server 7 Update 3 or prior releases for existing future events to have their presence triggers set.
  • The davadmin db backup, list, and restore commands now require that you specify the associated document store. You specify the document store by using the -A option, or the docstore option in the CLI file.

Deprecated Options

The following tables show the deprecated davadmin options and in what release the option was deprecated.

Deprecated Common Option

Short Option Long Option Description Required or Optional
-W passfile

Removed in Calendar Server 7 Update 2. You are now prompted to enter the administrative password.


--passwordfile File containing MySQL password for db commands, GlassFish Administrator password for all other commands. Required unless you provide the password by using the -F option or by displaying usage by using the -h option. If you don't provide this information, you are prompted for the password.

Deprecated Clifile Properties

Property
Description
userid GlassFish Administrator user ID.
password

Removed in Calendar Server 7 Update 2. You are now prompted to enter the administrative password.

GlassFish Administrator password.
dbpassword

Removed in Calendar Server 7 Update 2. You are now prompted to enter the administrative password.

MySQL database user password.
migrationadminpassword

Removed in Calendar Server 7 Update 2. You are now prompted to enter the administrative password.

The Calendar Server 6 administrative password.

Deprecated Option for config Operation

Short Option Long Option Description
-l

Removed in Calendar Server 7 Update 2. See the list action.

--list Lists all configuration options.

Deprecated Option for migration Operation

Short Option Long Option Description Required
-x

Removed in Calendar Server 7 Update 2. You are now prompted to enter the administrative password.

--migrationadminpasswordpath Path to file that contains the Calendar Server 6 administrative password.
Required unless information is provided in clifile.
Labels:
caldavserver caldavserver Delete
reference reference Delete
administering administering Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Dec 18, 2012

    The section on backend examples contains 'davadmin account' lines that hopefully won't work ;-)

    1. Dec 18, 2012

      Thanks, Jens. We'll fix them.

    2. Dec 18, 2012

      Thanks for the feedback Jens, I've corrected the examples.

      Joe

  2. Apr 10, 2013

    Hi,

    I wonder, whether for example the davadmin account modify also provides for a property (as it reads Possible properties include it's unclear to me, whether it is a exhaustive list of options or an elaborated list of examples, my preferred reading) to adjust the list of subscriptions or if there is any other command line level modification tool to do so. I know, I could do it using  wcap calls but that's a little clumsy, especially as master passwords (proxy authentication)  would be involved, too.

    Thanks in advance
    Jens

    1. Apr 10, 2013

      Hi Jens,

      The Possible Properties are all that are available, not just examples.

      Unfortunately, in the current release you cannot use the "davadmin account" command to subscribe/unsubscribe to calendars. A new action for subscribe/unsubscribe is planned for the next release. For now, you will need to use WCAP commands.

      Erwin

Sign up or Log in to add a comment or watch this page.


The individuals who post here are part of the extended Oracle community and they might not be employed or in any way formally affiliated with Oracle. The opinions expressed here are their own, are not necessarily reviewed in advance by anyone but the individual authors, and neither Oracle nor any other party necessarily agrees with them.