Ifnewer

The ifnewer option replaces an existing file with the latest backup version only if the backup version is newer than the existing file.

Only active backups are considered unless you also use the inactive or latest options.

Note: Directory entries are replaced with the latest backup version, whether the backup version is older or newer than the existing version.

Use the ifnewer option with the following commands:

  • restore
  • restore backupset
  • restore group
  • retrieve
Note: This option is ignored if the replace option is set to No.

Supported Clients

This option is valid for all clients. The IBM Spectrum® Protect API does not support this option.

Syntax

Read syntax diagramSkip visual syntax diagramIFNewer

Parameters

There are no parameters for this option.

Examples

Mac OS X operating systemsOracle Solaris operating systemsLinux operating systemsAIX operating systemsCommand line:
Mac OS X operating systemsOracle Solaris operating systemsLinux operating systemsAIX operating systemsMac OS X operating systemsdsmc restore "/Users/grover/Documents/*" -sub=y -rep=y -ifnewer
Mac OS X operating systemsOracle Solaris operating systemsLinux operating systemsAIX operating systemsMac OS X operating systemsOracle Solaris operating systemsLinux operating systemsAIX operating systemsdsmc restore "/home/grover/*" -sub=y -rep=y -ifnewer
Windows operating systemsCommand line:
Windows operating systemsdsmc restore -ifnewer d:\logs\*.log