• No results found

ca_devmgr Device Manager Command

In document CA ARCserve Backup for Windows (Page 127-153)

Chapter 7: ca_devmgr - Device Manager

Command

The device manager command (ca_devmgr) lets you perform various device

management commands in CA ARCserve Backup without interfacing with the Device Manager. You can use this tool to obtain information or to manipulate the tape or library devices. This command allows you to control storage devices, and to format and erase media in drives or changers. All of the features available from the Device Manager are available from the command line.

To use ca_devmgr, CA ARCserve Backup must be running, and you need authorization by an authentication service. If you are not authorized, then run the ca_auth utility to authorize yourself.

Syntax

The ca_devmgr command line syntax is formatted as follows: ca_devmgr [-cahost <hostname>]

[miscellaneous options] [general command options] [tape drive command options] [tape library command options] [FSD command options]

Note: The [-cahost <hostname>] switch is optional. This switch is not needed if you are using these commands locally; however, a hostname is required if you are performing these commands remotely. The host specified by the -cahost switch can be a member server or primary server. However, CA ARCserve Backup will always add the job to the job queue of the primary server, and the primary server will then dispatch the job to the proper server (primary/member) according to this switch when the job is processed. Note: If you installed CA ARCserve Backup using the "ARCserve Manager (Console)" mode, you must include the -cahost switch to execute this command from your local machine. Because this Console installation mode does not actually install all CA ARCserve Backup capabilities on your local machine, it is mandatory that -cahost be included when submitting this command remotely to the primary or member server containing CA ARCserve Backup or else the command will fail.

128 Command Line Reference Guide

Usage

The ca_devmgr command includes the following options:

■ miscellaneous options

■ general options

tape drive options ■ tape library options

FSD options

Miscellaneous Commands

The ca_devmgr command contains miscellaneous commands that are used to display all associated commands and define basic policies and parameters for CA ARCserve Backup to use during a device management process. Miscellaneous commands do not interact with a tape drive or a tape library, but do interact with CA ARCserve Backup.

The ca_devmgr command includes the following miscellaneous commands: -cahost <hostname>

Identifies the name of the system hosting the operation.

If you want to execute the operation on a remote system, this switch must be included in the command.

If you want to execute this operation on your local system, this switch is not required and should not be included in the command.

Note: If you include -cahost in the command, you must also specify the hostname of the system (local or remote) hosting the operation.

Note: If you installed CA ARCserve Backup using the "ARCserve Manager (Console)" mode, you must include the -cahost switch to execute this command from your local machine. Because this Console installation mode does not actually install all CA ARCserve Backup capabilities on your local machine, it is mandatory that -cahost be included when submitting this command remotely to the primary or member server containing CA ARCserve Backup or else the command will fail.

-usage

Displays a list of basic ca_devmgr commands. allusage

Displays a list of all ca_devmgr commands and their switches. -help

Chapter 7: ca_devmgr - Device Manager Command 129 -examples

Opens a Help topic with ca_devmgr usage examples.

General Commands

Common commands can be used whether you have a tape drive or a tape library attached to the system.

ca_devmgr [-cahost <host>]

-v <-adapterinfo...>|<-deviceinfo...>|<-groupinfo...>|<-mediainfo...>

-adapterinfo -groupinfo [-alldomain]

-deviceinfo <adapter #> <scsi ID> <lun>|<groupname>|<-all>|<-alldomain> -mediainfo <adapter #> <scsi ID> <lun>

-setdebug <none|summary|detail|detail+>

-v

Used only with the adapterinfo, deviceinfo, groupinfo, and mediainfo commands. The major difference in using the -v switch is to print additional information about these four commands. The -v switch is more of a verbose command.

- adapterinfo

Cycles through all the SCSI adapters attached to the system and prints out the adapter name, adapter number, SCSI ID, vendor ID, product ID, and firmware of any tape drive or tape library connected to the system.

-groupinfo

Prints the adapter number, SCSI ID, vendor ID, product ID, firmware, and status (tape libraries only) information on all groups configured in CA ARCserve Backup. -deviceinfo <adapter #> <scsi ID> <lun>

Prints the type of device, SCSI ID, vendor ID, product ID, firmware, status, and device sharing (tape libraries only) information for any tape drive or tape library. The adapter number, SCSI ID, and lun are required.

-mediainfo <adapter #> <scsi ID> <lun>

Prints the tape name, tape ID, sequence number, serial number, and expiration date for any tape device. For tape libraries, the same information is displayed, including slot number, and if the tape is loaded and write protected. For tape libraries, each slot is displayed.

130 Command Line Reference Guide

-setdebug <none|summary|detail|detail+>

Controls the level of debugging information that appears in the TAPE.LOG file which is generated and stored in the CA ARCserve Backup\Log folder.

none

No information is logged. summary

Logs critical messages and reduces the size of the tape log by excluding unnecessary information.

This is the default setting. detail

Logs all commands sent to the attached backup devices by CA ARCserve Backup, but does not include Read/Write commands and Test Unit Ready commands. Tape Engine specific information, which may be used by Customer Support to troubleshoot backup and restore issues, is also logged.

detail+

Logs all commands sent to the attached backup devices by CA ARCserve Backup, including Read/Write commands and Test Unit Ready commands. Tape Engine specific information, which may be used by Customer Support to troubleshoot backup and restore issues, is also logged.

Tape Drive Commands

The following tape drive commands can be used only for a tape drive. ca_devmgr [-cahost <host>]

-format [<adapter #> <scsi ID> <lun> <tape name>] [<mm/dd/yyyy> <serial no.>] [MEDIAPOOL <mediapool name>]

-erase [<adapter #> <scsi ID> <lun>] [q|qz|qw|l] -online [<adapter #> <scsi ID> <lun>] -offline [<adapter #> <scsi ID> <lun>]

-compression [<adapter #> <scsi ID> <lun>] <on|off> -eject [<adapter #> <scsi ID> <lun>]

Chapter 7: ca_devmgr - Device Manager Command 131 -format [<adapter #> <scsi ID> <lun> <tape name>] [<mm/dd/yyyy> <serial no.>] [MEDIAPOOL <mediapool name>]

Formats a tape in a tape drive.

When used with the -force option, formats the specified media, regardless of whether it is in a Save Set or Scratch Set.

The adapter number, SCSI ID, lun, and the new name of the tape are required. The date and serial number are optional.

-erase [<adapter #> <scsi ID> <lun>] [q|qz|qw|l] Erases a tape in a tape drive.

When used with the -force option, erases all data on specified media, regardless of whether it is in a Save Set or Scratch Set.

The adapter number, SCSI ID, and lun options are required. Options include:

q - quick erase (destroy media label). This is the default option.

qz - quick erase plus (destroy media label and serial number).

qw - quick erase and convert it to WORM, if media and tape drive support WORM technology. If hardware does not support WORM technology, the erase operation will fail.

l - long erase (destroy all data on the media).

Important! Long erase removes the entire media from the beginning of the tape to the end of the tape, and may take a long time to complete.

-online [<adapter #> <scsi ID> <lun>]

Sets the specified device (FSD or tape device) to an online status. When set to online, the device can be shared among multiple servers.

You must verify that you do not have more than one server set to write backup data to the same device at the same time. If multiple servers access the device at the same time, the backup could fail and data could get lost.

Example: If you have a FSD/tape device whose adapter #, scsi ID, and lun is 0, 0, and 1 and you want to set it to an online status, enter the following command:

132 Command Line Reference Guide

-offline [<adapter #> <scsi ID> <lun>]

Sets the specified device (FSD or tape device) to an offline status. When set to offline, no other backup job can be submitted to the device.

If a backup job to the device is already in progress, you will not be allowed to change the device status to offline until the job is completed. For an FSD, this prevents multiple servers from inadvertently accessing the device at the same time. If a backup job attempts to access the device when set to offline, the job will fail. Example: If you have a FSD/tape device whose adapter #, scsi ID, and lun is 0, 0, and 1 and you want to set it to an offline status, enter the following command:

ca_devmgr -offline 0 0 1

-compression [<adapter #> <scsi ID> <lun>] <on|off> Enables or disables compression on a tape drive.

For this command to work, the tape device must support compression and there must be a blank tape in the drive.

The adapter number, SCSI ID, lun and the on or off flags are required. -eject [<adapter #> <scsi ID> <lun>]

Ejects a tape from the tape drive.

To use this command, the tape drive must support the eject command. The adapter number, SCSI ID, and lun options are required.

-retension [<adapter #> <scsi ID> <lun>] Retensions a tape in a tape drive.

Chapter 7: ca_devmgr - Device Manager Command 133

Tape Library Commands

The following tape library commands can be used only for a tape library. ca_devmgr [-cahost <host>]

-cherase <adapter #> <changer scsi ID> <changer lun> [<slot #> [q|qz|qw|l] ...] or

-cherase <adapter #> <changer scsi ID> <changer lun> SLOT_RANGE <slot range> [q|qz|qw|l]

-chformat <changer adapter#> <changer scsi ID> <changer lun>

SLOT <slot#> <tape name> [<mm/dd/yy[yy]>|def [<serial no.> ]] MEDIAPOOL [<mediapool name>] SLOT <slot#> <tape name> [<mm/dd/yy[yy]>|def [<serial no.>]] MEDIAPOOL [<mediapool name>] ...]

-load <changer adapter #> <changer scsi ID> <changer lun> <drive adapter #> <drive scsi ID> <drive lun> <slot #>

-unload <changer adapter #> <changer scsi ID> <changer lun> <drive adapter #> <drive scsi ID> <drive lun>

-mount <changer adapter #> <changer scsi ID> <changer lun> <beg. slot> <end slot> [q|l]

-dismount <changer adapter #> <changer scsi ID> <changer lun> <beg. slot> <end slot>

-ieinfo <changer adapter #> <changer scsi ID> <changer lun>

-import <changer adapter #> <changer scsi ID> <changer lun> <slot #> [<slot #> ...]

-export <changer adapter #> <changer scsi ID> <changer lun> <slot #> [<slot #> ...]

-clean <changer adapter #> <changer scsi ID> <changer lun> <drive adapter #> <drive scsi ID> <drive lun>

134 Command Line Reference Guide

-cherase <adapter #> <changer scsi ID> <changer lun> [<slot #> [q|qz|qw|l] ...] -cherase <adapter #> <changer scsi ID> <changer lun> SLOT_RANGE <slot range> [q|qz|qw|l]

Erases a single tape or multiple tapes in a tape library.

When used with the -force option, erases all data on specified media, regardless of whether it is in a Save Set or Scratch Set.

The adapter number, changer SCSI ID, changer lun, and slot are required. Options include:

q - quick erase (destroy media label). This is the default option.

qz - quick erase plus (destroy media label and serial number)

qw - quick erase and convert it to WORM, if media and tape drive support WORM technology. If hardware does not support WORM technology, the erase operation will fail.

l - long erase (destroy all data on the media).

Alternatively, enter ca_devmgr -cherase [groupname] slot # [q|qz|qw|l] [,slot # [q|qz|qw|l] ,...] to erase the tape using just the group name and the slot number. Note: The "," in the examples is not a switch. It is there only to show you how to specify multiple slots to be erased.

-chformat <changer adapter#> <changer scsi ID> <changer lun> SLOT <slot#> <tape name> [<mm/dd/yy[yy]>|def [<serial no.> ]] MEDIAPOOL [<mediapool name>] SLOT <slot#><tape name> [<mm/dd/yy[yy]>|def [<serial no.>]] MEDIAPOOL [<mediapool name>] ...]

Formats a single tape or multiple tapes in a tape library.

When used with the -force option, formats the specified media, regardless of whether it is in a Save Set or Scratch Set.

The changer adapter number, changer SCSI ID, changer SCSI LUN, and group name are required, as are the word SLOT, the slot number where the tape to be

formatted is located, and the tape name. The mm/dd/yyyy (the expiration date) is optional.

The def switch (default expiration date) cannot be used with the expiration date. (The "|" between the expiration date and the default expiration date indicates you must choose one or the other.) The serial number is optional. The 3 "." at the end means that you can specify more slot numbers.

Alternatively, you can enter ca_devmgr -chformat [SLOT <slot#> <tape name> [<mm/dd/yy[yy]>|def [<serial no.>]].

The changer format can use the the slot number and the tape name. The expiration date and the serial number are optional, the rest is required. The word SLOT must be used before each slot number you specify.

Chapter 7: ca_devmgr - Device Manager Command 135 -load <changer adapter #> <changer scsi ID> <changer lun> <drive adapter #> <drive scsi ID> <drive lun> <slot #>

Loads a tape from a specified slot into a tape drive.

The changer adapter number, changer SCSI ID, changer lun, drive adapter number, drive SCSI ID, drive lun, and slot number are required.

-unload <changer adapter #> <changer scsi ID> <changer lun> <drive adapter #> <drive scsi ID> <drive lun>

Unloads a tape from a tape drive and returns it in the specified slot.

The changer adapter number, changer SCSI ID, changer lun, and the slot number are required.

-mount <changer adapter #> <changer scsi ID> <changer lun> <beg. slot> <end slot> [q|l]

Performs an inventory of your entire tape library.

If your tape library does not have a bar code reader, CA ARCserve Backup puts all the tapes into the tape drive and reads them. If your tape library does have a bar code reader, you can specify whether to obtain the information from the database or have CA ARCserve Backup read in all the tapes. The changer adapter number, changer SCSI ID, changer lun, beginning slot, and end slot are required.

The beginning and end slots can be any slot number, as long as the slots conform to the group you are mounting. The end slot cannot be smaller than the beginning slot. The q (quick mount) or l (long mount) options are optional. Quick mount is the default for tape libraries with bar code readers.

If your tape library has a bar code reader, it obtains the information from the CA ARCserve Backup database. Long mount forces CA ARCserve Backup to put each tape into the tape drive and read the information on it. If your tape library has no bar code reader, the q switch is disabled, and each tape must be read in by the tape drive.

-dismount <changer adapter #> <changer scsi ID> <changer lun> <beg. slot> <end slot> Dismounts the slots in the specified group within the range provided in the options, and renames all slots to "Dismounted Slot".

Unless CA ARCserve Backup is restarted or a mount command is issued to the dismounted group, no other command can be issued to the dismounted slots. The changer adapter number, changer SCSI ID, changer lun, beginning slot, and end slot are required.

-ieinfo <changer adapter #> <changer scsi ID> <changer lun>

Displays information on the import/export slot of the library, including whether or not it is full and, if full, the barcode number of the tape in the slot.

136 Command Line Reference Guide

-import <changer adapter #> <changer scsi ID> <changer lun> <slot #> [<slot #> ...] Takes a tape from the import/export slot of the tape library and places it into its destination slot.

If your tape library has a bar code reader enabled, the information is taken from the database, and the tape is not read in by the drive.

If your tape library does not have a bar code reader, it places the tape into the drive to be read.

The changer adapter number, changer SCSI ID, changer lun, and slot number are required. The only optional switch is the extra slot # .... for tape libraries with more than one import/export slot. You can import multiple tapes at the same time. If your tape library has only one import/export slot, you can only import one tape at a time.

-export <changer adapter #> <changer scsi ID> <changer lun> <slot #> [<slot #> ...] Takes a tape from a slot in the tape library and puts it in the import/export slot. The changer adapter number, changer SCSI ID, changer lun, and the slot number are required. The slot #... is to export multiple tapes. This can only be done if your tape library has more than one import/export slot.

-clean <changer adapter #> <changer scsi ID> <changer lun> <drive adapter #> <drive scsi ID> <drive lun>

Takes a cleaning tape (if one is installed in the tape library), puts it into the specified drive, and cleans the tape drive.

The changer adapter number, changer SCSI ID, changer lun, tape drive adapter number, tape drive SCSI ID, and tape drive lun are required.

-importall <changer adapter #> <changer scsi ID> <changer lun>

Imports each tape found in the library's mail slots into the first available storage slot(s) in the library specified.

You can use this when you just want to import tapes from the mail slot, but do not need the tapes to go to any specific storage slots.

If there is not enough library slots for all the tapes in the mail slots, a message "Not enough empty slots to import all the tapes!" will be displayed after all the empty

In document CA ARCserve Backup for Windows (Page 127-153)