Mounting VSS snapshots to remote servers

You can mount VSS snapshots to remote servers that other users can access. When you remotely mount a snapshot, you must use hardware that includes a feature for creating transportable snapshots. If you use a mix of hardware, all hardware must include a feature for creating transportable snapshots.

Before you begin

You must enable the Import VSS snapshots only when needed configuration option before you create a snapshot. Enable this option by clicking Properties > VSS options.

To use the remote management and remote mount features, you must install and enable Windows PowerShell 3.0. To download, install and enable the software, follow the instructions in: Microsoft Windows Management Framework 3.0 Downloads (http://www.microsoft.com/en-s/download/ details.aspx?id=34595)

About this task

When you select the Import VSS snapshots only when needed option, if the VSS hardware provider does not support transportable snapshots, or, if no hardware provider is available, the snapshot completes, but the VSS snapshot is imported and is not transportable.

Restriction: Do not create snapshots that contain a mixture of hardware providers because the snapshot operations fail.

The following steps are based on two servers, Server A and Server B, both with IBM Storage Protect Snapshot installed, and attached to the same storage device. The snapshots were created by using IBM Storage Protect Snapshot on Server A.

The Command-Line Interface (CLI) and cmdlet methods in the following procedure detail the commands for Data Protection for Microsoft SQL Server.

Procedure
  1. Query the snapshots that are available on Server A from Server B, by using one of the following methods:
    • GUI method:

      Configure Server A as a remote computer and browse the snapshots that are available by using the Microsoft Management Console (MMC)>Remote Management feature.

    • CLI method:

      Configure Server A as a remote computer by using the CLI with the remote computer options.

      tdpsqlc query fcm * /remotecomputer=ServerA
      /remotecompteruser=MyDomain\MyUser
      /remotecomputerpassword=MyPassword

      where MyDomain specifies the domain of the remote computer and MyPassword specifies the password to the remote computer.

    • Cmdlet method:

      Configure the remote computer by using the different methods in Windows PowerShell:

      "Enter-PSSession -ComputerName <Remote Computer>"

      or

      "New-PSSession -ComputerName <Remote Computer> -Credential domain\User"

      or

      "invoke-command -ComputerName <Remote Computer>
      - credential $(Get-Credential) – ScriptBlock{script}”

      where ComputerName specifies the remote computer.

      Tip: From within the Windows Power® Shell session, or within the script block script, you can import the IBM Storage Protect Snapshot cmdlet modules (ipmo <FlashCopyManager installed path>\FmModuleSql.dll), and then run the "Get-DpSQLBackup" cmdlet.
      {ipmo 'C:\Program Files\Tivoli\FlashcopyManager\FmModuleSQL.dll';
      Get-DpSqlBackup}
  2. Mount a snapshot to a remote server, by using one of the following methods:
    • CLI method:

      From Server B, run the CLI mount command with the remote computer options:

      tdpsqlc mount backup "mydb1=d:\dir1\mntPt" /remotecomputer=ServerA
      /remotecompteruser=MyDomain\MyUser /remotecomputerpassword=MyPassword
      where MyDomain specifies the domain of the remote computer and MyPassword specifies the password to the remote computer.
    • Cmdlet method:

      From Server B, run the Mount-DPSQLBackup cmdlet with the remote computer options:

      Mount-DPSQLBackup "mydb1=d:\dir1\mntPt" -remotecomputer ServerA
      -remotecompteruser MyDomain\MyUser
      -remotecomputerpassword MyPassword

      where MyDomain specifies the domain of the remote computer and MyPassword specifies the password to the remote computer.

      The active snapshot of the "mydb1" database is mounted from Server A to the d:\dir1\mntPt directory on Server B.

  3. Unmount a snapshot, by using one of the following methods:
    • CLI method:

      From Server B, run the CLI unmount command with the remote computer options:

      tdpsqlc unmount backup "d:\dir1\mntPt"
                              /remotecomputer=ServerA
                              /remotecompteruser=MyDomain\MyUser
                              /remotecomputerpassword=MyPassword

      where MyDomain specifies the domain of the remote computer and MyPassword specifies the password to the remote computer.

    • Cmdlet method:

      From Server B, run the Dismount-DPSQLBackup cmdlet with the remote computer options:

      Dismount-DpSQLBackup "d:\dir1\mntPt"
                              -remotecomputer ServerA
                              –remotecompteruser MyDomain\MyUser
                              -remotecomputerpassword MyPassword

      where MyDomain specifies the domain of the remote computer and MyPassword specifies the password to the remote computer.

What to do next

When you use the CLI method to mount VSS snapshots to remote servers, the following restrictions apply:

  • On the server where the snapshot is created, no fast restore operation of the full snapshot is available
  • Snapshots are mounted with read-only access
  • After a snapshot is mounted, the snapshot cannot be mounted to a different location at the same time

When you mount a snapshot remotely and then you delete the snapshot, the state of the mount point varies. The state of the mount point depends on the VSS hardware provider and storage device that you used. When you mount a snapshot remotely, you can delete the snapshot.

When you create a local persistent VSS snapshot, a source and target volume relationship is created. The local persistent VSS snapshot is created on the storage device. In this scenario, when a remote mount operation occurs, the target volume is imported and mounted to the server that sends the request for the remote operation. During the deletion of a snapshot, the snapshots and the relationship between the source and target volumes on the storage device are also deleted. However, the target volume that is imported and mounted might continue to exist. In addition, the target volume might not be available to the server where the remote mount occurred.

When you use the remote mount feature, consider the following common snapshot deletion scenarios:

  • When you manually delete a remotely mounted snapshot. You can use the IBM Storage Protect Snapshot software to delete any snapshot by using the CLI or the Microsoft Management Console.
  • When a remotely mounted snapshot exceeds snapshot conditions. When either the maximum number of snapshot versions or the maximum number of days to retain a snapshot (as specified by the IBM Storage Protect Snapshot policy) is exceeded, the associate snapshot is expired and deleted.

When you enter a mount or query command with the /remotecomputer option, enable CLI tracing to debug the problem, if a problem occurs. For tracing, append /tracefile=filename.trc /traceflag=service to the command.

After tracing is enabled, the CLI generates trace files for the local and remote systems. On the local system, you can view the file that you specified. In addition, on the local and remote systems, a trace file is also created. This file has the same name as the file stored on the local system and the file name concludes with the following suffix appended to the file type extension: _remote.

In addition to the CLI trace file, you can enable tracing on the agent, enable tracing on both the local and remote systems, and collect trace files on both the local and remote systems.