Previous Contents Index DocHome Next |
iPlanet Messaging Server 5.0 Administrator's Guide |
Chapter 10 Managing the Message Store
This chapter describes the message store and the message store administration interface. This chapter contains the following sections:
Overview
Message Store Directory Layout
Specifying Administrator Access to the Store
Configuring Message Store Quotas
Configuring Message Store Partitions
Overview
The message store contains the user mailboxes for a particular Messaging Server instance. The size of the message store increases as the number of mailboxes, folders, and log files increase. You can control the size of the store by specifying limits on the size of mailboxes (disk quotas), by specifying limits on the total number of messages allowed, and by setting aging policies for messages in the store.As you add more users to your system, your disk storage requirements increase. Depending on the number of users your server supports, the message store might require one physical disk or multiple physical disks. If you have a very large user base, you might have multiple Messaging Server instances, each responsible for a particular message store. Likewise, if you are supporting multiple hosted domains, you might want to dedicate a server instance to a single, large domain. With this configuration, you can designate a store administrator for a particular domain.
To manage the message store, iPlanet Messaging Server provides a set of command-line utilities in addition to the iPlanet Console interface. Table 10-1 describes these command-line utilities. For information about using these utilities, see Performing Maintenance and Recovery Procedures and the Messaging Server Reference Manual.
Message Store Directory Layout
Figure 10-1 shows the message store directory layout for a server instance. The message store is designed to provide fast access to mailbox contents. The store directories are described in Table 10-2.
Figure 10-1    Message Store Directory Layout
For example, a sample directory path might be:
server-root/msg-instance/store/partition/primary/=user/53/53/=mack1
How the Store Erases Message
Messages are erased from the store in three stages:
Delete. A client marks the message to be deleted. At this point, the client can restore the message by removing the "deleted" marking.
Expunge. A client, or the aging policies you have specified, expunges messages that have been marked deleted from the mailbox. Once messages are expunged, the client can no longer restore them, but they are still stored on disk. (A second client with an existing connection to the same mailbox may still be able to fetch the messages.)
Cleanup. The stored utility erases from the disk any messages that have been expunged for at least one hour.
Specifying Administrator Access to the Store
Message store administrators can view and monitor user mailboxes and specify access control for the message store. Store administrators have proxy authentication privileges to any service (POP, IMAP, HTTP, or SMTP), which means they can authenticate to any service using the privileges of any user. These privileges allow store administrators to run certain utilities for managing the store. For example, using MoveUser, store administrators can move user accounts and mailboxes from one system to another.This section discusses how to grant store privileges to the message store for your Messaging Server installation.
You can perform tasks as described in the following subsections:
You can specify administrator access to the store by using the configutil command or by using Console.
From Console, open the Messaging Server you want to configure.
Click the Configuration tab and select Message Store in the left pane.
Console. To add an administrator entry at the Console:
Click the Administrator tab.
Click the Add button beside the Administrator UID window.
In the Administrator UID field, type the user ID of the administrator you want to add.
Click OK to add the administrator ID to the list displayed in the Administrator tab.
Click Save in the Administrator tab to save the newly modified Administrator list.
Command Line. To add an administrator entry at the command line:
configutil -o store.admins -v "adminlist"
where adminlist is a comma-separated list of administrator IDs. If you specify more than one administrator, you must enclose the list in quotes.
Modifying an Administrator Entry
Console. To modify an existing entry in the message store Administrator UID list at the Console:
Click the Administrator tab.
Click the Edit button beside the Administrator UID window.
Enter your changes to the Administrator UID field.
Click OK to submit your changes and dismiss the Edit Administrator window.
Click Save in the Administrator tab to submit and preserve the modified Administrator list.
Command Line. To modify an existing entry in the message store Administrator UID list at the command line:
configutil -o store.admins -v "adminlist"
Deleting an Administrator Entry
Console. To delete an entry from the message store Administrator UID list by using the Console:
Click the Administrator tab.
Select an item in the Administrator UID list.
Click Delete to delete the item.
Click Save to submit and preserve your changes to the Administrator list.
Command Line. To delete store administrators at the command line, you can edit the administrator list as follows:
configutil -o store.admins -v "adminlist"
About Message Store Quotas
This section contains information about the following:
User Quotas
You can limit the size of the message store by specifying limits on the size of user mailboxes. You can specify the following types of quotas.
Disk quotas allow you to limit the amount of disk space allotted to each user. Disk quotas apply to the total size of all the user's messages, regardless of how many mail folders the user has or to the total number of user messages. If disk space is limited, you might want to set user disk quotas.
Quota information is stored as LDAP attributes and configuration variables. If quota enforcement is enabled, Messaging Server checks the quota cache and configuration file to ensure quotas have not been exceeded before inserting messages into the message store. If quota notification is enabled, users are sent an error message when they have reached their disk quota. You can also enable the server to send a warning message when users are nearing their quota limit.Message quotas allow you to limit the number of messages stored in a user's mailbox.
You can set default quotas for all users or set quotas for individual users. To determine if a user is over quota, Messaging Server first checks to see if a quota has been set for the individual user. If no quota has been set, Messaging Server then looks at the default quota set for all users.
If the total size or the total number of all the user's messages exceeds the specified limits set, messages destined for the user remain in the message queue until one of the following occurs: (1) The size or number of all the user's messages no longer exceeds the limit, at which time the server delivers the message to the user. (2) The undelivered message has been in the queue longer than the specified grace period and the user is still over quota, at which time the server bounces the message.
Disk space becomes available when a user deletes and expunges messages or when the server deletes messages according to the maintenance policies you have established (aging policies, for example).
Domain Quotas and Family Group Quotas
You can also set quotas for a particular domain and for family groups within a domain. These quotas are not enforced, but they are useful for reporting purposes. For more information about domain and family group quotas, see the Delegated Administrator User's Guide.
Exceptions for Telephony Application Servers
To support unified messaging requirements, Messaging Server provides the ability to override quota limitations imposed by the message store, thus guaranteeing the delivery of messages that have been accepted by certain agents, namely telephony application servers (TAS). Messages accepted by a TAS can be routed through a special MTA channel that will ensure the message is delivered to the store regardless of quota limits. For more information about configuring the TAS channel, see Chapter 8 "Configuring Channel Definitions."
Configuring Message Store Quotas
You set default quotas for all users by using iPlanet Console or by using the configutil command. You can also set quotas for individual users, family groups, and hosted domains.This document describes how to set default quotas. For more information about setting quotas for individual users, family groups, and domains, see the Delegated Administrator's User Guide.
This section describes the following tasks:
If you want to use iPlanet Console:
From iPlanet Console, open the Messaging Server you want to configure.
Click the Configuration tab and select Message Store in the left pane.
Specifying a Default User Quota
The default quota applies to users who do not already have individual quotas set for them. A quota set for an individual user overrides the default quota.
Console. To specify a default quota at the Console:
Click the Quota tab.
To specify a default user disk quota, for the "Default user disk quota" field, select one of the following options:
To specify a message number quota, in the "Default user message quota" box, type a number.
- Unlimited. Select this option if you do not want to set a default disk quota.
- Size specification. Select this option if you want to restrict the default user disk quota to a specific size. In the field beside the button, type a number, and from the drop-down list, choose Mbytes or Kbytes.
Command Line. To specify a default user disk quota for total message size:
configutil -o store.defaultmailboxquota -v [ -1 | number ]
where -1 indicates no quota; number indicates a number in bytes.
To specify a default user quota for total message number:
configutil -o store.defaultmessagequota -v [ -1 | number ]
where -1 indicates no quota; number indicates a number in bytes.
Enabling Quota Enforcement and Notification
You can enable or disable quota enforcement and quota notification. The action the server takes depends on how these configuration variables are set, as shown in Table 10-3.
Console. To enable quota enforcement at the Console:
Command Line. To enable quota enforcement at the command line:
configutil -o store.quotaenforcement -v [ yes | no]
If you specify no, quotas are not enforced.
Console. To enable quota notification at the Console:
Command Line. To enable quota notification at the command line:
configutil -o store.quotanotification -v [ yes | no ]
Defining a Quota Warning Message
You can define the message that will be sent to users who have exceeded their disk quota as follows. Messages are sent to the user's mailbox.
Console. To define a quota warning message at the Console:
Click the Quota tab.
From the drop-down list, choose the language you want to use.
Type the message you want to send in the message text field below the drop-down list.
Command Line. To define a quota warning message at the command line:
configutil -o store.quotaexceededmsg -v message
The message must be in RFC 822 format.
To define how often the warning message is sent:
configutil -o store.quotaexceedmsginterval -v number
where number indicates a number of days. For example, 3 would mean the message is sent every 3 days.
Specifying a Quota Threshold
You can send a warning message to IMAP users before they reach their disk quota by specifying a quota threshold. When a user's disk usage exceeds the specified threshold, the server sends a warning message to the user.For IMAP users whose clients support the IMAP ALERT mechanism, the message is displayed on the user's screen each time the user selects a mailbox (a message is also written to the IMAP log).
Console. To specify a quota threshold at the Console:
Click the Quota tab.
In the "Quota warning threshold" field, enter a number for the warning threshold.
Click Save.
- This number represents a percentage of the allowed quota. For example, if you specify 90%, the user is warned after using 90% of the allowed disk quota. The default is 90%. To turn off this feature, enter 100%.
Command Line. To specify a quota threshold at the command line:
configutil -o store.quotawarn -v number
where number indicates a percentage of the allowed quota.
Setting a Grace Period
If a user mailbox exceeds the quota for allotted disk space or total number of messages, the grace period you specify determines how long messages will be held in the message queue before the server starts bouncing the messages. Messages will remain in the queue until one of the following occurs:
The mailbox no longer exceeds the quota, at which time the server will deliver the message to the mailbox.
The user has remained over quota longer than the specified grace period, at which time the server will bounce the message.
The message has remained in the queue longer than the maximum message queue time.
Console. To set a grace period for how long messages are held in the queue at the Console:
Click the Quota tab.
In the "Over quota grace period" field, enter a number.
Command Line. To specify a quota grace period at the command line:
configutil -o store.quotagraceperiod -v number
where number indicates number of hours.
Specifying Aging Policies
Aging policies are another way to control disk usage on your server. You can control how long messages are stored in one or more mailboxes. If you have limited disk space, you might want to set aging policies to remove messages from the store. If you set aging policies, you should educate your users about these policies because the server will not send warning messages before it deletes messages from the store.You can create aging rules based on the following criteria:
Number of messages in the mailbox
If you specify more than one rule for a mailbox, all expiration rules will apply, but the most restrictive rule takes precedence. For example, assume two rules apply to a single mailbox. The first rule allows 1000 messages; the second rule allows 500 messages. When expiration occurs, the server will delete messages from the mailbox until 500 remain. For another example, if the first rule allows a message size of 100,000 bytes for 3 days and the second rule allows a message size of 1000 bytes for 12 days, the resulting union of rules allows a message size of 100,000 bytes for 3 days. The server will delete messages over 100,000 bytes that have been in the mailbox over 3 days. If you want to ensure that a specific rule is the only rule for a particular mailbox or set of mailboxes, use the Exclusive parameter.Number of days that messages remain in the mailbox
Number of days that messages exceeding a given size remain in the mailbox
Console. To create a new rule by using Console:
From iPlanet Console, open the Messaging Server you want to configure.
Click the Configuration tab and select Message Store in the left pane.
Click the Aging tab in the right pane.
Click Add to go to the Add Rule window.
Enter a name for the new rule.
Specify the target folders for which this rule applies.
If this rule is to be the only rule applied to the target folders, click the Exclusive selection box.
- You can enter a path name, filename, or partial string. You can use IMAP wildcards as follows:
- * - Match any series of characters.
% - Match any series of characters except slash characters.
- The new rule applies only to folders matching the pattern you specify.
If you want to create a rule based on folder size, do the following:
In the "Message count" field, specify the maximum number of messages that will be retained in a folder before the oldest messages are removed.
In the "Folder size" field, specify a number for the folder size; from the associated drop-down list, choose Mbyte(s) or KByte(s).
If you want to create a rule based on message age, in the "Number of days" field, specify a number to indicate how long messages should remain in the folder.
- When the specified folder size is exceeded, the server removes the oldest messages until this size is no longer exceeded.
If you want to create a rule based on message size:
In the "Message size limit" field, enter a number to indicate the maximum size message allowed in the folder; from the associated drop-down list, choose Mbytes or Kbytes.
Click OK to add the new rule to the Aging Rule list and dismiss the Add window.In the "Grace period" field, enter a number to indicate how long over-sized messages should remain in the folder.
Click Save to submit and preserve the current Aging Rule list.
Command Line. To create a new rule at the command line, use the following commands where name represents the name you give the rule:
To specify the target folders for which this rule applies:
configutil -o store.expirerule.name.folderpattern -v pattern
For example, the pattern user/* matches everything; the patter user/%@siroe.com/* matches all folders for all users in the domain siroe.com; and the pattern user/%/Trash matches the Trash folder for all users.
To specify that this rule is to be the only rule applied to the target folders:
configutil -o store.expirerule.name.exclusive -v [ yes | no ]
To specify the maximum number of messages that will be retained in a folder before the oldest messages are removed:
configutil -o store.expirerule.name.messagecount -v number
configutil -o store.expirerule.name.foldersizebytes -v number
where number is a size in bytes.
configutil -o store.expirerule.name.messagedays -v number
where number indicates the number of days.
configutil -o store.expirerule.name.messagesize -v number
where number is a size in bytes.
To indicate how long over-sized messages should remain in the folder:
configutil -o store.expirerule.name.messagesizedays -v number
where number indicates number of days.
Configuring Message Store Partitions
All user mailboxes are stored by default in the msg-instance/store/partition/ directory. The partition directory is a logical directory that might contain a single subpartition or multiple subpartitions. The subpartitions might map to a single physical drive or to multiple physical drives. At start-up time, the partition directory contains one subpartition called the primary partition.You can add partitions to the partition directory as necessary. For example, you might want to partition a single disk to organize your users as follows:
msg-instance/store/partition/mkting/
msg-instance/store/partition/eng/
msg-instance/store/partition/sales/As disk storage requirements increase, you might want to map these partitions to different physical disk drives.
You should limit the number of mailboxes on any one disk. Distributing mailboxes across disks improves message delivery time (although it does not necessarily change the SMTP accept rate). The number of mailboxes you allocate per disk depends on the disk capacity and the amount of disk space allocated to each user. For example, you can allocate more mailboxes per disk if you allocate less disk space per user.
If your message store requires multiple disks, you can use RAID (Redundant Array of Inexpensive Disks) technology to ease management of multiple disks. With RAID technology, you can spread data across a series of disks but the disks appear as one logical volume so disk management is simplified. You might also want to use RAID technology for redundancy purposes; that is, to duplicate the store for failure recovery purposes.
Note To improve disk access, the message store and the message queue should reside on separate disks.
Adding a Partition
When adding a partition, you specify both an absolute physical path where the partition is stored on disk and a logical name, called the partition nickname.The partition nickname allows you to map users to a logical partition name regardless of the physical path. When setting up user accounts and specifying the message store for a user, you can use the partition nickname. The name you enter must be an alphanumeric name and must use lowercase letters.
To create and manage the partition, the user ID used to run the server must have permission to write to the location specified in the physical path.
Note After adding a partition, you must stop then restart the server to refresh the configuration information.
Console. To add a partition to the store by using the Console:
From iPlanet Console, open the Messaging Server you want to configure.
Click the Configuration tab and select Message Store in the left pane.
Click the Partition tab in the right pane.
Enter the Partition path.
To specify this as the default partition, click the selection box labeled Make This the Default Partition.
Click OK to submit this partition configuration entry and dismiss the window.
Click Save to submit and preserve the current Partition list.
Command Line. To add a partition to the store at the command line:
configutil -o store.partition.nickname.path -v path
where nickname is the logical name of the partition and path indicates the absolute path name where the partition is stored.
To specify the path of the default primary partition:
configutil -o store.partition.primary.path -v path
Performing Maintenance and Recovery Procedures
This section provides information about the utilities you use to perform maintenance and recovery tasks for the message store. You should always read your postmaster mail for warnings and alerts that the server might send. You should also monitor the log files for information about how the server is performing. For more information about log files, see Chapter 12 "Logging and Log Analysis."This section contains the following:
Managing Mailboxes
This section describes the following utilities for managing and monitoring mailboxes: mboxutil, hashdir, readership.
The mboxutil Utility
You use the mboxutil command to perform typical maintenance tasks on mailboxes. These tasks include the following:You can also use the mboxutil command to view information about quotas. For more information, see Monitoring Quota Limits.
Table 10-4 lists the mboxutil commands. For detailed syntax and usage requirements, see the Messaging Server Reference Manual.
Mailbox Naming Conventions
You must specify mailbox names in the following format: user/userid/mailbox, where userid is the user that owns the mailbox and mailbox is the name of the mailbox. For hosted domains, userid is uid@domain.For example, the following command creates the mailbox named INBOX for the user whose user ID is crowe. INBOX is the default mailbox for mail delivered to the user crowe.
Important: The name INBOX is reserved for each user's default mailbox. INBOX is the only folder name that is case-insensitive. All other folder names are case-sensitive.
Examples
To list all mailboxes for all users:To list all mailboxes and also include path and ACL information:
To create the default mailbox named INBOX for the user daphne:
To delete a mail folder named projx for the user delilah:
mboxutil -d user/delilah/projx
To delete the default mailbox named INBOX and all mail folders for the user druscilla:
mboxutil -d user/druscilla/INBOX
To rename the mail folder memos to memos-april for the user desdemona:
mboxutil -r user/desdemona/memos user/desdemona/memos-april
To lock a mail folder named legal for the user dulcinea:
mboxutil -k user/dulcinea/legal cmd
where cmd is the command you wish to run on while the folder is locked.
To move the mail account for the user dimitria to a new partition:
mboxutil -r user/dimitria/INBOX user/dimitria/INBOX partition
where partition specifies the name of the new partition.
To move the mail folder named personal for the user dimitria to a new partition:
mboxutil -r user/dimitria/personal user/dimitria/personal partition
The hashdir Utility
The mailboxes in the message store are stored in a hash structure for fast searching. Consequently, to find the directory that contains a particular user's mailbox, use the hashdir utility.This utility identifies the directory that contains the message store for a particular account. This utility reports the relative path to the message store, such as d1/a7/. The path is relative to the directory level just before the one based on the user ID. The utility sends the path information to the standard output.
For example, to find the relative path to the mailbox for user crowe:
The readership Utility
The readership utility reports on how many users other than the mailbox owner have read messages in a shared IMAP folder.An owner of a IMAP folder may grant permission for others to read mail in the folder. A folder that others are allowed to access is called a shared folder. Administrators can use the readership utility to see how many users other than the owner are accessing a shared folder.
This utility scans all mailboxes and produces one line of output per shared folder, reporting the number of readers followed by a space and the name of the mailbox.
Each reader is a distinct authentication identity that has selected the shared folder within the past specified number of days. Users are not counted as reading their own personal mailboxes. Personal mailboxes are not reported unless there is at least one reader other than the folder's owner.
For example, the following command counts as a reader any identity that has selected the shared IMAP folder within the last 15 days:
Monitoring Quota Limits
You can monitor quota usage and limits by using the mboxutil utility. The mboxutil utility generates a report that lists defined quotas and limits, and provides information on quota usage. Quotas and usage figures are reported in kilobytes.For example, the following command lists all user quota information:
The next example lists quota information for the user crowe:
The next example lists quota information for a the domain siroe.com:
Monitoring Disk Space
You can specify how often the system should monitor disk space and under what circumstances the system should send a warning. To configure disk space monitoring and notification, you use the configutil command to set the alarm space attributes, which are described in Table 10-5.
Table 10-5 Disk Space Alarm Attributes
For example, if you want the system to monitor disk space every 600 seconds, specify the following command:
configutil -o alarm.diskavail.msgalarmstatinterval -v 600
If you want to receive a warning whenever available disk space falls below 20%, specify the following command:
configutil -o alarm.diskavail.msgalarmthreshold -v 20
For more information about setting alarm attributes, see the Messaging Server Reference Manual.
Using the stored Utility
The stored utility performs the following monitoring and maintenance tasks for the server:
Background and daily messaging tasks
The stored utility automatically performs cleanup and expiration operations once a day at midnight. You can choose to run additional cleanup and expiration operations.Deadlock detection and rollback of deadlocked database transactions
Cleanup of temporary files on startup
Implementation of aging policies
Periodic monitoring of server state, disk space, service response times, and so on
You can also use the stored utility to create a backup of the mailboxes database and log files. If the database becomes corrupt, you can use the backup copy to replace the database without having to reconstruct the database. To create a backup of the database, you use the configutil command to specify values for the following parameters:
configutil -o local.store.snapshotinterval -v number
where number specifies how often stored will back up the database; number indicates a time interval in minutes.
configutil -o local.store.snapshotpath -v path
where path indicates the location of the backup copy.
Table 10-6 lists the stored options. Some common usage examples follow the table. For detailed syntax and usage requirements, see the Messaging Server Reference Manual.
To perform a single aging and cleanup pass:
If you want to change the time of the automatic cleanup and expiration operations, use the configutil utility as follows:
configutil -o store.expirestart -v 21
Occasionally, you might need to restart the stored utility; for example, if the mailbox list database becomes corrupted. To restart stored on UNIX, use the following commands at the command line:
server-root/msg-instance/stop-msg store
server-root/msg-instance/start-msg storeIf any server daemon crashes, you must stop all daemons and restart all daemons including stored.
Repairing Mailboxes and the Mailboxes Database
If one or more mailboxes becomes corrupt, you can use the reconstruct utility to rebuild the mailboxes or the mailboxes database, and repair any inconsistencies.The reconstruct utility rebuilds one or more mailboxes, or the master mailbox file, and repairs any inconsistencies. You can use this utility to recover from almost any form of data corruption in the mail store. Note that low-level database repair, such as completing transactions and rolling back incomplete transactions is performed with stored -d.
Table 10-7 lists the reconstruct options. For detailed syntax and usage requirements, see the Messaging Server Reference Manual.
Rebuilding Mailboxes
To rebuild mailboxes, use the -r option. You should use this option when:
Accessing a mailbox returns one of the following errors: "System I/O error" or "Mailbox has an invalid format".
With the 5.0 release, reconstruct -r first runs a consistency check. It reports any consistencies and rebuilds only if it detects any problems. Consequently, performance of the reconstruct utility is improved with this release.Accessing a mailbox causes the server to crash.
Files have been added to or removed from the spool directory.
You can use reconstruct as described in the following examples:
To rebuild the spool area for the mailboxes belonging to the user daphne, use the following command:
To rebuild the spool area for all mailboxes listed in the mailbox database:
You must use this option with caution, however, because rebuilding the spool area for all mailboxes listed in the mailbox database can take a very long time for large message stores. (See reconstruct Performance.) A better method for failure recovery might be to use multiple disks for the store. If one disk goes down, the entire store does not. If a disk becomes corrupt, you need only rebuild a portion of the store by using the -p option as follows:
reconstruct -r -p subpartition
To rebuild mailboxes listed in the command-line argument only if they are in the primary partition:
reconstruct -p primary mbox1 mbox2 mbox3
If you do need to rebuild all mailboxes in the primary partition:
If you want to force reconstruct to rebuild a folder without performing a consistency check, use the -f option. For example, the following command forces a reconstruct of the user folder daphne:
To check all mailboxes without fixing them, use the -n option as follows:
Checking and Repairing Mailboxes
To perform a high-level consistency check and repair of the mailboxes database:You should use the -m option when:
One or more directories were removed from the store spool area, so the mailbox database entries also need to be removed.
One or more directories were restored to the store spool area, so the mailbox database entries also need to be added.
The stored -d option is unable to make the database consistent.
Removing Orphaned Accounts
To search for orphaned accounts (orphaned accounts are mailboxes that do not have corresponding entries in LDAP):Command output follows:
To create a file listing orphaned mailboxes that can be turned into a script file that deletes the orphaned mailboxes, where the file is to be named orphans.cmd:
Command output follows:
reconstruct: Start checking for orphaned mailboxes
reconstruct: Found 2 orphaned mailbox(es)
reconstruct: Done checking for orphaned mailboxes
reconstruct Performance
The time it takes reconstruct to perform an operation depends on a number of factors including:
The kind of operation being performed and the options chosen
The reconstruct -r option performs an initial consistency check; this check improves reconstruct performance depending on how many folders must be rebuilt.The number of folders when running reconstruct -m
The number of messages when running reconstruct -r
The overall size of the message store
What other processes the system is running and how busy the system is
Whether or not there is ongoing POP, IMAP, HTTP, or SMTP activity
In one example with approximately 2400 users, a message store of 85GB, and concurrent POP, IMAP, or SMTP activity on the server:
reconstruct -m took about 1 hour
reconstruct -r -f took about 18 hours
Note A reconstruct operation may take significantly less time if the server is not performing ongoing POP, IMAP, HTTP, or SMTP activity.
Moving a User's Account
The MoveUser utility moves a user's account from one messaging server to another. When user accounts are moved from one messaging server to another, it's also necessary to move the user's mailboxes and the messages they contain from one server to the other. In addition to moving mailboxes from one server to another, MoveUser updates entries in the Directory Server to reflect the user's new mailhost name and message store path.To use the MoveUser utility, the user must authenticate by including the -a option in the MoveUser command. Any valid message store administrator can run the MoveUser command. Users are granted store administrator privileges as follows:
You can grant message store administration privileges for a specific Messaging Server by using iPlanet console. For more information, see Specifying Administrator Access to the Store.
Table 10-8 lists the MoveUser options. Usage examples follow the table. For detailed syntax and usage requirements, see the Messaging Server Reference Manual.DA Top-level administrators are automatically granted message store administration privileges for the entire mail system.
DA domain administrators are automatically granted message store administration privileges for the domain.
To move all users from host1 to host2, based on account information in the Directory Server siroe.com:
MoveUser -l \
"ldap://siroe.com:389/o=Siroe.com???\
(mailhost=host1.domain.com)" \
-D "cn=Directory Manager" -w password -s host1 -x admin \
-p password -d host2 -a admin -v passwordTo move one user from host1 which uses port 150 to host2, based on account information in the Directory Server siroe.com:
MoveUser -l \
"ldap://siroe.com:389/o=Siroe.com???(uid=userid)" \
-D "cn=Directory Manager" -w password -s host1:150 -x admin \
-p password -d host2 -a admin -v passwordTo move a group of users whose uid starts with letter `s' from host1 to host2, based on account information in the Directory Server server1.siroe.com:
MoveUser -l \
"ldap://server1.siroe.com:389/o=Siroe.com???(uid=s*)" \
-D "cn=Directory Manager" -w password -s host1 -x admin \
-p password -d host2 -a admin -v passwordTo move a user's mailboxes from host1 to host2 when the user ID of admin is specified in the command line:
MoveUser -u uid \
-s host1 -x admin -p password \
-d host2 -a admin -v passwordTo move a user named aldonza from host1 to a new user ID named dulcinea on host2:
MoveUser -u aldonza -U dulcinea \
-s host1 -x admin -p password \
-d host2 -a admin -v password
Backing Up and Restoring the Message Store
Backup and restore is one of the most common and important administrative tasks. You must implement a backup and restore policy for your message store to ensure that data is not lost if problems such as the following occur:
System crashes
You also need to back up data when migrating users.Accidental deletion of messages or mailboxes
Problems when reinstalling or upgrading a system
Natural disasters (for example, earthquakes, fire, hurricanes)
Messaging Server provides command-line utilities that allow you to back up and restore the message store. Messaging Server also provides an integrated solution with Legato Networker.
Messaging Server provides a single-copy backup procedure. Regardless of how many user folders contain a particular message, during backup, the message file is backed up only once using the first message file found. The second message copy is backed up as a link to the name of the first message file, and so on. The backup utility maintains a hash table of all messages using the inode of the message files as the index. This method does have implications when restoring data, however. For more information, see Considerations for Partial Restore.
This section contains the following subsections:
Creating a Backup Policy
Messaging Server Backup and Restore Utilities
Creating a Backup Policy
Your backup policy will depend on several factors, such as:
How Users Are Provisioned
Depending on the size of your message store, message data might be stored on several disks. Disk 1 might hold messages for users whose last names being with A through F; disk 2 might hold messages for users whose last names begin with G through M, and so on. Or, users might be provisioned by function, with disk 1 containing Marketing personnel data, disk 2 containing Engineering personnel data, and so on.Assuming user messages are stored according to user last name, users whose names begin with A through F would represent a backup group while users whose last names begin with G through M would represent another backup group.
The logical view of the message store looks like the following:
STORE
______|______
| |
GROUP GROUP
___|___
| |
USER USER
____|____
| |
MAILBOX MAILBOX
By cataloging users into groups, you can improve backup management. For example, you can specify separate backup sessions for each group. Or you can choose to back up several groups in parallel. For more information about creating backup groups, see Creating Backup Groups.
Peak Business Loads
You need to take into account peak business loads when scheduling backups for your system. For example, backups are probably best scheduled for early morning hours such as 2:00 a.m.
Full and Incremental Backups
Incremental backups will scan the store for changed data and back up only what has changed. Full backups will back up the entire message store. You need to determine how often the system should perform full as opposed to incremental backups. You'll probably want to perform incremental backups as a daily maintenance procedure. Full backups are more appropriate when you need to move or migrate data.
Parallel or Serial Backups
When user data is stored on multiple disks, you can back up user groups in parallel if you wish. Depending on system resources, parallel backups can speed up the overall backup procedure. However, you might want to use serial backups, for example, if you do not want to impact the server's performance. Whether to use parallel or serial backups can depend on many factors, including system load, hardware configuration, how many tape drives are available, and so on.
Creating Backup Groups
By organizing users into groups, you can improve backup management. For example, you can specify separate backup sessions for each group. Or you can choose to back up several groups in parallel.If you want to create backup groups, you need to create a configuration file in which to store your group definitions. This file must be named backup-groups.conf and it must be stored in the following directory:
serverRoot/msg-instance/config/backup-groups.conf
The format of this file is:
groups=definitions
groups=definitions
.
.
.For example, if you want to group users by the first letter of their user IDs, use the following definitions:
groupA=a*
groupB=b*
groupC=c*Backup object naming uses the logical structure of the message store, as follows:
Messaging Server includes one predefined backup group that is available without creating the backup-groups configuration file. This group is called ALL; it includes all users.
Messaging Server Backup and Restore Utilities
To back up and restore your data, Messaging Server provides the imsbackup and imsrestore utilities.Please note that the imsbackup and imsrestore utilities are not intended to provide a general-purpose backup facility. These utilities do not have the advanced features found in general purpose tools like Legato Networker. For example, the utilities have only very limited support for tape auto-changers. They cannot write a single store to multiple concurrent devices. Comprehensive backup will be achieved via plug-ins to generalized tools like Legato Networker. For more information about using Legato Networker, see Using Legato Networker.
The imsbackup Utility
With imsbackup, you can write selected contents of the Message Store to any serial device, including magnetic tape, a UNIX pipe, or a plain file. The backup or selected parts of the backup may later be recovered by using the imsrestore utility. The output of imsbackup can be piped to imsrestore.To perform a back up, issue the imsbackup command as shown in the following example, which backs up user1 to backupfile:
imsbackup -f backupfile /mystore/ALL/user1
This command uses the default blocking factor of 20. For a complete syntax description of the imsbackup command, see the Messaging Server Reference Manual.
The imsrestore Utility
To restore messages from the backup device, use the imsrestore command. For example, the following command restores messages for user1 from the file backupfile.imsrestore -f backupfile /mystore/ALL/user1
For a complete syntax description of the imsbackup command, see the Messaging Server Reference Manual.
Considerations for Partial Restore
This single-copy backup procedure has implications when restoring messages as follows:
Full Restore. During a full restore, linked messages will still point to the same inode as the message file to which they are linked.
Assume there are three messages belonging to three users A, B, and C, as follows:Partial Backup/Restore. During a partial backup and partial restore, however, the single-copy characteristic of the message store might not be preserved.
Example 1. In the first example, the system performs a partial backup and full restore procedure as follows:
In this example, B/INBOX/1 and C/INBOX/1 are assigned a new inode number and the message data is written to a new place on the disk. Only one message is restored; the second message is a hard link to the first message.
Example 2. In this example, the system performs a full backup and a partial restore as follows:
A/INBOX/1 is assigned a new inode number.
Example 3. In this example, partial restore might require more than one attempt:
Perform full backup.
Delete users A and B.
Restore users A and B.
Delete user A (optional).
Using Legato Networker
Messaging Server includes a backup API that provides an interface with third-party backup tools, such as Legato Networker. The physical message store structure and data format are encapsulated within the backup API. The backup API interacts directly with the message store. It presents a logical view of the message store to the backup service. The backup service uses the conceptual representation of the message store to store and retrieve the backup objects.Messaging Server provides an Application Specific Module (ASM) that can be invoked by the Legato Networker's save and recover commands to back up and restore the message store data. The ASM then invokes the Messaging Server imsbackup and imsrestore utilities.
Note This section provides information about how to use Legato Networker with the Messaging Server message store. To understand the Legato Networker interface, see your Legato documentation.
Backing Up Data Using Legato Networker
To perform backups of the Messaging Server message store using Legato Networker, you must perform the following preparatory steps before invoking the Legato interface:
Create a symbolic link from usr/lib/nsr/imsasm to serverRoot/msg-instance/bin/imsasm
Figure 10-2 shows a sample backup groups directory structure.From Sun or Legato, obtain a copy of the nsrfile binary and copy it to the following directory:
If you want to back up users by groups, perform the following steps:
Create a backup group file as described in Creating Backup Groups.
To verify your configuration, run mkbackupdir.sh.
- Look at the directory structure in serverRoot/msg-instance/backup. The structure should look similar to that shown in Figure 10-2.
In the directory /nsr/res/, create a res file for your savegroup to invoke the mkbackupdir.sh script before the backup. See Figure 10-3 for an example.
- Note that if you do not specify a backup-groups.conf file, the backup process will use the default backup group ALL for all users.
Figure 10-2    Backup Group Directory Structure
siroe-groupA-a1
-a2
-groupB-b1
-b2
-groupC-c1
-c2
Figure 10-3 shows a sample res file named IMS.res in the nsr directory:
Figure 10-3    Sample res File
type: savepnpc
precmd: "echo mkbackupdir started",
"usr/siroe/server5/msg-siroe/bin/mkbackupdir.sh"
pstcmd: "echo imsbackup Completed"; timeout: "12:00 pm";
You are now ready to run the Legato Networker interface as follows:
Create the Messaging Server savegroup if necessary.
Create a backup client using savepnpc as the backup command:
Set the saveset to the directory created by mkbackupdir.
Select Group Control | Start to test your backup configuration.
- For a single session backup, use serverRoot/msg-instance/backup
- For parallel backups, use serverRoot/msg-instance/backup/server/group
- Be sure you've already created group as defined in Creating Backup Groups.
- You must also set the parallelism to the number of backup sessions.
- See Example. Creating A Backup Client in Networker.
Example. Creating A Backup Client in Networker. To create a backup client in Networker. From nwadmin, select Client | Client Setup | Create
Restoring Data Using Legato Networker
To recover data, you can use the Legato Networker nwrecover interface or the recover command-line utility. The following example recovers user a1's INBOX:recover -a -f -s siroe usr/siroe/server5/msg-siroe/backup/siroe/groupA/a1/INBOX
The next example recovers the entire message store:
recover -a -f -s siroe /usr/siroe/server5/msg-siroe/backup/siroe
Previous Contents Index DocHome Next
Copyright © 2000 Sun Microsystems, Inc. Some preexisting portions Copyright © 2000 Netscape Communications Corp. All rights reserved.
Last Updated September 14, 2000