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.
You can use this option with the following commands:
- restore
- restore backupset
- restore group
- retrieve





Supported Clients
This option is valid for all clients. The IBM Spectrum® Protect API does not support this option.
Options File
Place 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.
Place 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
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.
All
All 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.
All
All 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.
No
Existing files are not overwritten. No prompts are displayed.
Note: 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 from the backup-archive client GUI.
No
Existing files are not overwritten. No prompts are displayed.

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.