Replace

The replace option specifies whether to overwrite existing files on your workstation, or to prompt you for your selection when you restore or retrieve files.

Important: The replace option does not affect recovery of directory objects. Directory objects are always recovered, even when specifying replace=no. To prevent overwriting existing directories, use the filesonly option.

You can use this option with the following commands:

  • restore
  • restore backupset
  • restore group
  • retrieve
AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemsWindows operating systemsNote: Replace prompting does not occur during a scheduled operation. If you set the replace option to prompt, Tivoli® Storage Manager skips files without prompting during a scheduled operation.
AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemsWindows operating systems

Supported Clients

This option is valid for all clients. The Tivoli Storage Manager client API does not support this option.

Options File

AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemsPlace this option in the client user-options file (dsm.opt). You can set this option on the Restore tab, Action for files that already exist section of the Preferences editor.

Windows operating systemsPlace this option in the client options file (dsm.opt). You can set this option on the Restore tab, Action for files that already exist section of the Preferences editor.

Syntax

Read syntax diagramSkip visual syntax diagram
            .-Prompt-.   
>>-REPlace--+--------+-----------------------------------------><
            +-All----+   
            +-Yes----+   
            '-No-----'   

Parameters

Prompt
For nonscheduled operations, you specify whether to overwrite existing files. For scheduled operations, existing files are not overwritten and no prompts are displayed. This is the default.
AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemsAll
AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemsAll existing files are overwritten, including read-only files. If access to a file is denied, you are prompted to skip or overwrite the file. No action is taken on the file until there is a response to the prompt.
Windows operating systemsAll
Windows operating systemsAll existing files are overwritten, including read-only files. All locked files are replaced when the system is rebooted. If access to a file is denied, you are prompted to skip or overwrite the file. No action is taken on the file until there is a response to the prompt.
Yes
Existing files are overwritten, except read-only files. For nonscheduled operations, you specify whether to overwrite existing read-only files. For scheduled operations, existing read-only files are not overwritten and no prompts are displayed. If access to a file is denied, the file is skipped.
Windows operating systemsNo
Windows operating systemsExisting files are not overwritten. No prompts are displayed.

Mac OS X operating systemsNote: When restoring or retrieving files with the replace option set to no, existing files are not overwritten, but existing directories are overwritten. To leave existing directories intact during a restore or retrieve operation, select the Options > All selected files and directories > Files only from the Tivoli Storage Manager GUI.

AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemsNo
AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemsExisting files are not overwritten. No prompts are displayed.
Windows operating systemsNote: You can choose to replace locked files when the system is rebooted. Tivoli Storage Manager cannot perform an in-place restore of active files. However, it stages restored versions of active files for replacement during the next reboot, except for files containing named streams, sparse files, and directories. You can only restore these files if they are unlocked.

Examples

Options file:
replace all
Command line:
-replace=no

This option is valid on the initial command line and in interactive mode. If you use this option in interactive mode, it affects only the command with which it is specified. When that command completes, the value reverts to the value at the beginning of the interactive session. This is the value from the dsm.opt file unless overridden by the initial command line or by an option forced by the server.