Message Store Backup and Restore

Message store backup and restore allows you to:

Restore the contents of a server's entire Sun Message Store (all referenced messages) in the event of a catastrophic failure, such as the loss of a hard disk.
Restore group or user folders in the event that a folder is corrupted or a user accidently deletes a message.
Migrate user or group folders or the contents of the entire Sun Message Store to another Sun Message Store.

Do backup and restore using the imbackup and imrestore commands (see SIMS Reference Manual), or Solstice Backup, a file backup and restore product that is part of the Solstice System Management Suite, which is bundled with the Solaris server or can be purchased separately (see http://docs.sun.com under the System Administration Library for documentation).

Each method has its advantages and disadvantages.

Solstice Backup and Restore:
  Easy to Use GUI.
  Automated on-line backup and restore--backups can be scheduled.
  Simultaneous backup and restore on more than one group of users.
  Recognizes more types of backup devices than imbackup.
  Local or remote administration.
  Automated tape labeling and tracking, support for bar code recognition, cleaning cartridges, etc.
  No incremental backup at this time.
imbackup and imrestore command line utilities:
  You can restore a single message.

Note - Message store backup and restore cannot run at the same time as some other maintenance utilities. Refer to TABLE 7-3 for session locking information.

 

Backing Up the Message Store Using Solstice Backup

  1. Run mkbackupdir at the command line.
  This creates a backup directory in <ADM_ROOT>. This backup directory is not the actual directory where the mail store will be backed up, but a directory "image" of how mail is stored in SIMS. This image provides information to the backup program on how the mail store will be stored on the backup media. The actual mkbackupdir files are empty files. If the directory already exists, mkbackupdir synchronizes the directory structure with the current folder/mailbox hierarchy.
 
  ADM_ROOT is the administration root directory defined in
/etc/opt/SUNWmail/ims/ims.cnf. By default the directory is
/var/opt/SUNWmail/ims/adm/.
  backup is the directory structure under which all message store data on the server resides (no real backup data exists here). Choose ADM_ROOT/backup to backup all the message data on the server.
  Backup groups are optional directories under which the mail folders for groups of users, say all users in a specific organization, can be placed. For example, folders for users in marketing can be placed in a directory called mktg, field service in field_service, and so on. Creating groups is useful for scheduling parallel backups by group. If you do not create any groups, all folders go under a directory called DEFAULT. Create groups with mkdir and move the directories under DEFAULT into the desired groups. (See next step.)
  The user directories contain the mail for each mail user. Under each user directory is a file called INBOX which stores all incoming messages and a Mail directory containing the user's mailboxes and folders. (Here mailboxes are files that hold messages and folders are directories that hold mailboxes.) Administrators can choose to backup at the user level or the mailbox level.
  You can also do an incremental backup by running:
  mkbackupdir -d <date (yyyymmdd) since last full backup>
  This will create a backup directory with mailboxes that have been modified since that date. Solstice only backup those mailboxes. For example, if you run a full backup using mkbackupdir on 1 January 2000, you can do one week incremental backup by running:
  mkbackupdir -d <20000108>
  2. (Optional) Create user groups in the directory hierarchy.
  You can structure users into hierarchical groups in the directory. This allows you to backup specific groups of users.
  3. Start Solstice Backup.
  Use Solstice Backup to backup <ADM_ROOT>/backup. Do not use the Solstice Backup incremental backup feature because the adm/backup directory is just an image of the user folder structure in the message store--it does not contains actual data. There are configuration files under the adm/backup directory that tell Solstice Backup to use imbackup to backup the mailboxes. The problem is the adm/backup directory doesn't get updated at the same time the users update their mailboxes. mkbackupdir updates the adm/backup directory in batch mode. Solstice Backup won't be able to tell which mailbox has been updated since the last backup by looking at the adm/backup directory. Therefore the Solstice Backup incremental backup won't work for us.
  Refer to the Solstice Backup documents (http://docs.sun.com) or the SIMS Reference Manual for detailed instructions.

Note - .nsr files are generated by the mkbackupdir command. It contains standard Networker directives and should never be edited.
  4. Automate this procedure.
  The preceding steps describe how to do a manual backup. However, we recommend that you set up a cron job to run mkbackupdir and then use the Solstice Backup GUI to schedule backups after mkbackupdir is run.

 

Restoring the Message Store

You cannot use imrestore to restore mailboxes backed up with Solstice Backup and you cannot use Solstice Restore to restore mailboxes backed up with imbackup. For more detailed information on how to use Solstice Restore and imrestore, refer to the Solstice Backup documents (http://docs.sun.com) or the SIMS Reference Manual.

If you use Solstice Restore, you will receive the message "File already exists. Do you want to overwrite, skip, backup, or rename?" Choose overwrite. This message appears because the backup tree is just the structure, i.e, it consists of empty files and stays that way permanently.


Note - If you use Solstice recover command, then you can use the -A and -iy arguments to suppress this message.



Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved.