Restorefiles command

Use the restorefiles command to restore VSS-based backups on the Tivoli® Storage Manager server (/BACKUPDESTINATION=TSM), or stored locally (/BACKUPDESTINATION=LOCAL).

Consider the following information before using the restorefiles command.

  • The restorefiles command restores .mdf, ldf, and other flat files from a specified Data Protection for SQL Server, VSS-based backup into a specified directory.
  • A destination directory can be specified as a directory on a fixed file system (for example C:\temp), or on a network share (for example \\server\dest) that is accessible to the Tivoli Storage Manager server Remote Agent (VSS Requestor). It is not possible to use a mapped network drive as a destination directory.
  • The restorefiles command does not restore the data to the SQL Server.
  • This command does not require the SQL Server to be installed on the machine where the restorefiles command is run. Files can be restored to another machine or directory on the same machine as the SQL Server.
  • A restore continues until it completed, unless the destination volume does not have enough space to fulfill the restore operation.
  • VSS-based backups that are located on the Tivoli Storage Manager server (/BACKUPDESTINATION=TSM) can be restored by using restorefiles on the same machine that performed the VSS-based backup, or by running the command on a machine that has the Data Protection for SQL client installed and configured for VSS operations.
  • The directory specified in the restorefiles command has the VSS component name appended so that multiple databases can be restored to the same target directory.
  • VSS-based backups that are stored on the local machine by using a persistent snapshot (/BACKUPDESTINATION=LOCAL), can be restored only by running the restorefiles command on the same machine that performed the VSS-based backup, and has access to the persistent snapshot.
  • To run a full restore: tdpsqlc restorefiles DB1 FULL relocatedir=d:\temprestore
  • Use /RELOCATEDIR to restore a database that exists to a different directory, even if your backup contains files that are located in different directories. Run the restorefiles command and specify just one restore destination directory. For example, issue restorefiles db1 full /relocatedir=d:\temp to place the files into the d:\temp\db1\* directory.
  • If you are in a non-clustered environment, you can restore only a local snapshot to the machine that generated the snapshot.
  • If you are in a clustered environment, you can run a restorefiles command from any of the machines in the cluster.