The imsrestore utility restores messages from the backup device into the message store.
Location: msg_svr_base/sbin
imsrestore -f device|- [-a userid] [-b blocking_factor] [-c y | n] [-e encoding [-h] [-i] [-m file] [-n] [-r file] [-s] [-t] [-u file] [-v 0|1|2] [path] |
The options for this command are:
Option |
Description |
---|---|
-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. |
-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. |
-h |
Dumps the header. |
-g |
Debug mode |
-i |
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: a=xb=yc=z where a, b, and c are old names and x, y, and z are new names. This option is only used to rename user IDs from an older version of Messaging Server to a newer version of Messaging Server. Use the -u option for restoring users from SIMS to Messaging Server. |
-n |
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). |
-s |
Used to restore a large file without using large file seeking. |
-t |
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: joebonniejackie=jackie1 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) |
name |
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:
userA=user1 userB=user2 userC=user3 |