Using RAWASM to backup RAW devices with NetWorker

RAW devices are hard disk partitions, which have been created but have not been formatted by the operating system or a file manager. Such configurations are often used by databases, because they can address the data much faster using their internal mechanism.

Figure 1 below explains the coarse mechanism NetWorker uses to read from the disk during backups and writes to the disk during recoveries. As you can see, there is a variable part called an Application Specific Module or ASM in short form. The term *asm indicates that there can be different ASMs involved, depending on the specific task to fulfil:

rawasm

In general, ASMs can be separated into:

  • External ASMs
    An external ASMs exists as a separate executable that can also be used separately from the command line.
  • Internal ASMs
    These are called by another program and usually exists within a library file. As aconsequence, they cannot be started individually.

The decision which ASM will be used is controlled by rules called directives.

The ASMs that is used most, is uasm . Once called UNIX ASM , its name today is Universal ASM . This is the ASM that knows how to read and write filesystem information. It is the same mechanism for UNIX and Windows filesystems:

rawasm

To handle RAW devices there is a specifc internal ASM called rawasm , a functionality that has been incorporated in NetWorker since version 4.2 for UNIX and 4.4.1 for Windows.

As rawasm needs to run on the NetWorker client, even an older NetWorker server, should be able to backup data from a younger NetWorker client.

Raw partitions should be treated properly:

  • Do not change the data on that partition at any time. This ensures a consistent save set.
  • Mount such partitions in read-only mode, if possible.
  • For recoveries, the hard disk must have at least the same partition sizes than before.
  • For recoveries, the RAW device must be available already. NetWorker will not create it.

Backing up RAW devices with NetWorker under UNIX

This is how you configure your NetWorker server for automatic backups:

  1. Create a new directive , for example rawdevice , specifying the device names you must enter:
    Example for Sun Solaris:
    << /dev/rdsk >>
    rawasm: c1t0d0s0
    NOTE: that these entries are OS-dependant.
  2. Edit the settings for this client:
    1. In the client resource, you need to edit the settings as follows:
      Example for Sun Solaris:
      Save set: /dev/rdsk/c1t0d0s0
      NOTE: Specify the RAW device to backup. With the information from above, use OS-specific names again.
    2. Select the directive mentioned above in step 1, from the list of all directives.

Starting a manual backups of a RAW device

For a manual backup, NetWorker cannot use a directive resource as they are valid exclusively for automatic backups. Only a so-called local directive will work for all backup types.

  1. Create a new local directive (a hidden file .nsr ) in the directory for the raw devices. For example for Sun Solaris:
    # more /dev/rdsk/.nsr
    rawasm: c1t0d0s0
    #
  2. Start the save using the save command:
    # save /dev/rdsk/c1t0d0s0
    save: Using schlumpf as server
    /dev/rdsk/c1t0d0s0
    /dev/rdsk/
    /dev/
    /
    save: /dev/rdsk/c1t0d0s0 3096 MB 00:05:44 4 files
    #

Backing up RAW devices with NetWorker under Windows

Since version 6.0 this is very easy - an explicit RAWASM directive declaration is not required as RAWASM is implemented internally. The specification is done only via the save set setting.

You can either specify a partition by using \\.\drive_letter: or a complete hard disk using the physical device name \\.\PHYSICALDRIVE#: .

This is how you configure your NetWorker server for automatic backups:

  1. Edit the settings for this client:
    1. In the client resource, you need to edit the settings as follows. Examples:
      Save set: \\.\E:
      or
      Save set: \\.\PHYSICALDRIVE5:
      Starting a manual backups of a RAW partition is also easy:
  2. Start the save using the save command with the proper attributes:
    D:\NETWORKER\NSR\BIN> save \\.\E:
    save: Using schlumpf as server
    \\.\E:
    /
    save: \\.\E: 4096 MB 00:09:04 2 files
    save completion time: 12-24-01 09:57p
    D:\NETWORKER\NSR\BIN>

    And this is what will happen if you backup a formatted and active file system:

    D:\NETWORKER\NSR\BIN> save \\.\E:
    save: Using schlumpf as server
    \\.\E:
    save: Cannot lock volume \\.\Y:: Access denied
    /
    save: \\.\E: 4096 MB 00:09:01 2 files
    save completion time: 12-24-01 09:57p
    D:\NETWORKER\NSR\BIN>

    NOTE: Be careful to unmount the drive properly!
    If this is not done correctly, you will see such messages.

    Actually, as you can see, NetWorker is able to backup the drive but somebody else could change the contents in this situation!