Sun Java System Messaging Server 6.3 Administration Reference


The imsrestore utility restores messages from the backup device into the message store.

When imsbackup, imsrestore, imsimport or any processing intensive operation takes significantly more system resources than normal, and continues doing so longer than the msprobe interval, there may be a temporary backlog of DB transaction log files to be cleared. If there are more files than specified in, then msprobe may erroneously restart all the processes during a restore. To prevent this from happening, disable msprobe during the imsbackup, imsrestore, and imsimport.

Location: msg-svr-base/sbin


imsrestore -f device|-  [-b blocking_factor] [-c y | n] 
[-d path] [-D] [-e encoding [-h] [-i] [-m file] 
[-n] [-p] [-r file] [-s] [-S] [-t] [-u file] [-v 0|1|2|3|4|5] 
[path] [-x]


The options for this command are:



-b blocking_factor

Indicates the blocking factor. Everything read on the device is performed by blocks of the size 512 x blocking_factor. The default is 20. Note: this number needs to be the same blocking factor that was used for the backup.

-c y | n

Provides an answer to the question: “Do you want to continue?” if an error occurs. Specify y for yes, n for no.

-d path


-e encoding

Mailbox name encoding (example: IMAP_MODIFIED-UTF-7) 

-f device|-

When -f- is specified, backup data from stdin is read. Otherwise, the backup data is read from the specified device or filename.


Dumps the header. 


Debug mode 


Ignores existing messages. Does not check for existing messages before restore. 

Note that if you specify the -i option, you may have duplicate messages after the restore, since the -i option supersedes your ability to check for duplicates.

-m file

This mapping file is used when renaming user IDs. The format in the mapping file is oldname=newname with one set of names per line. For example:


where a, b, and c are old names and x, y, and z are new names. For users in a hosted domain, add @domain_name to the old and new user IDs.

This option is only used to rename user IDs when restoring from a Messaging Server 5.x or 6.x imsbackup file. Use the -u option when restoring from a SIMS 4.0 imbackup file.


Creates a new mailbox with a .date extension (if the mailbox exists). By default, messages are appended to the existing mailbox.

-r file

Reference file name (will restore all links in file).


Used to restore a large file without using large file seeking.  


Prints a table of contents, but restore is not performed. 

-u file

Specifies a backup object file. This file contains the object names (entire message store, user, group, mailbox, and so on) to restore. See name for a list of backup objects.

For restoring SIMS data into a Sun Java System Message Store, you can specify or rename users with -u file. Users should have one name per line. If you rename users, the format of file is oldname=newname with one set of names per line. For example:


where joe and bonnie are restored, and jackie is restored and renamed to jackie1. Note that full object pathnames are not needed for user IDs.

-v [0|1|2|3|4|5]

Executes the command in verbose mode. 

0= no output

1= output at mailbox level

2= output at message level (default)

3= print meta data (for use with -t only)

4=print object level meta data (for use with -t only)

5=print the backup data of mailboxes and messages (for use with -t only)


Restores stubs into message files. 


Can be 1) logical pathname of the backup object, 2) user ID, 3) mailbox. See imsbackup for description.


The following example restores the messages from the file backupfile:

imsrestore -f backupfile

The following example restores the messages for joe from the file backupfile:

imsrestore -f backupfile /primary/user/joe

The following example lists the content of the file backupfile:

imsrestore -f backupfile -t

The following example renames users in the file mapfile:

imsrestore -m mapfile -f backupfile

where the mapfile format is oldname=newname: