Académique Documents
Professionnel Documents
Culture Documents
Title Page
Version 7.4.x
Copyrights
Software Copyright 2006 BakBone Software NetVault:Backup - Command Line Interface Users Guide for Version 7.4.x Copyright 2006 BakBone Software Printed and On Line versions. This software product is copyrighted and all rights are reserved. The distribution and sale of this product are intended for the use of the original purchaser only per the terms of the License Agreement. All other product trademarks are the property of their respective owners. The NetVault:Backup - Command Line Interface Users Guide for Version 7.4.x documentation is copyrighted and all rights are reserved. This document may not, in whole or part, be copied, photocopied, reproduced, translated, reduced or transferred to any electronic medium or machine-readable form without prior consent in writing from BakBone Software. THIS PUBLICATION IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. THIS PUBLICATION COULD INCLUDE TECHNICAL INACCURACIES OR TYPOGRAPHICAL ERRORS. CHANGES ARE PERIODICALLY ADDED TO THE INFORMATION HEREIN; THESE CHANGES WILL BE INCORPORATED INTO NEW EDITIONS OF THE PUBLICATION. BAKBONE SOFTWARE MAY MAKE IMPROVEMENTS AND/OR CHANGES IN THE PRODUCT(S) AND/OR THE PROGRAM(S) DESCRIBED IN THIS PUBLICATION AT ANY TIME.
BakBone Software
9540 Towne Centre Drive, Suite 100 San Diego, California 92121 866.484.2663
Table of Contents
Section 1: The NetVault:Backup CLI
Chapter 1: Introduction to the NetVault:Backup CLI 7
The NetVault:Backup Command Line Interface.............................................................. 9 - Help from the Command Line Interface .................................................................................. 9 - The NetVault:Backup CLI and Access Control ......................................................................... 9 Working with Command Line Executables ................................................................... 10 - Preparing to Run Command Line Executables ...................................................................... 10 - Command Syntax .............................................................................................................. 10 - The nvsetmodify.cfg File ................................................................................................... 13 Technical Support............................................................................................................ 14 - Helpdesk Support Lines ...................................................................................................... 14 - BakBone Softwares Web Site ............................................................................................. 14
15
Using Command Line Executables................................................................................ 17 - Client Specific Command Line Executables .......................................................................... 17 - Device Specific Command Line Executables ......................................................................... 20 - Media Specific Command Line Executables .......................................................................... 30 - Job Specific Command Line Executables ............................................................................. 38 - NetVault Logs and the Command Line Interface .................................................................... 63 - Other Command Line Executables ....................................................................................... 66
Section 2: Appendix
Appendix A: Running Reports from the CLI 71
NetVault:Backup Reporting with the CLI....................................................................... 73 - Help from the Command Line .............................................................................................. 73 Using nvreport to View Reports from the CLI ........................................................... 73 - Classes (The -class Switch) .............................................................................................. 74
iv
Table of Contents
- Template Files (The -templatename/-templatefile Switches) ................................................83 - Adjusting a Reports Layout and Content ...............................................................................87
The nvreport Command and External Reports ........................................................100 - Creating External Report Files from the CLI .........................................................................100
S E C T I O N
1 :
Chapter 1:
1.0.0
1.0.1
1.0.2
10
Important: Even if CLI access has been granted to a specific user account, the proper
account and password values associated with that account must be input before these tools can be used (e.g., via a script from a Command Line session). The environmental variables necessary for inclusion in a script to allow this access consist of the following: NETVAULTCLIACCOUNT - Used to name the Account with access to use the CLI. NETVAULTCLIPASSWORD - Used to name the Password associated with the Account.
1.1.0
1.1.1
1.1.2
Command Syntax
The syntax of a command takes the following form:
Syntax Command -switch 1 <value> -switch 2 <value> -switch 3 <value> | -switch 4 <value> [-switch 5],
Information enclosed in < > is a user input variable based on the command preceding the brackets (e.g., If a NetVault:Backup Server was named Server1, input servername <server name> as servername Server1). Switches enclosed in [ ] are optional. A | symbol between two switches indicates that only one of the multiple listed can be used in a command.
11
Important:
1. All scripts shown in syntax format are to be input as one line, unless otherwise noted. 2. The order of the switches is not important in the syntax.
1.1.2.a
Switch Abbreviation
Switches can be specified using only initial letter in their name, provided this letter is unique (i.e., no other switch name used by the selected command begins with the same letter). Using the nvbulkblankmedia command as an example, a description of the command is given along with all of its switches:
Syntax nvbulkblankmedia -libraryname <library name> -medialabel <media label> -allmedia -password -wait <NetVault:Backup password>
-libraryname: The name of the library to target. -medialabel: Media with label to search for. -allmedia: Indicates all media will be blanked in the library. -password: The NetVault:Backup password for the specified Server. -wait: This switch can be added to tell NetVault:Backup to wait until this task has completed before moving forward. All of the required switches for this command begin with different letters. Therefore, this command could be input as follows: nvbulkblankmedia -l NVLibrary1 -m Backup* -p sunny wait -l - represents the -libraryname switch -m - represents the -medialabel switch -p - represents the -password switch
1.1.2.b
12
Chapter 1 Introduction to the NetVault:Backup CLI Server. Not finding a machine with this name, the command will return a failed result. To remedy this, the following can be performed: Enclose in Quotes ( ) - Variable names that included underscores must be enclosed in quotes when input in the CLI (See the section that follows, Using Spaces in CLI Variables for more information on the use of quotes in the syntax).
1.1.2.c
1.1.2.d
NetVault: Backup Command Line Interface Users Gude NV_USER_ARG - Arguments that have been passed on to the script
13
1.1.2.e
1.1.3
Important:
1. Ensure that the nvsetmodify.cfg is not edited or modified in any manner. It is recommended that you print out this file and use this print for reference purposes. 2. This functionality is intended only for highly-experienced users. Therefore, it is strongly recommended that any attempt to use any of the values displayed in this configuration file when generating CLI commands be performed under the guidance of a BakBone Technical Support representative.
14
1.2.0
Technical Support
BakBone Software is dedicated to providing friendly, expert advice to NetVault: Backup customers. Our highly trained professionals are available to answer questions, offer solutions and generally help make the most of any NetVault: Backup purchase. Log on to BakBones web site, or contact the Helpdesk.
1.2.1
E-mail
support@bakbone.com
Europe
Telephone
+44.1202.244727
E-mail
support@bakbone.co.uk
China
Telephone
+86.10.6567.3331
E-mail
support@bakbone.com.cn
Korea
Telephone
+82.2.501.3062
E-mail
koreasupport@bakbone.com
Asia/Pacific Rim
Telephone
+81.3.5908.3517
E-mail:
Multiple offices exist in our Asia, Pacific Rim district. Please contact the closest support office for assistance:
Japan Office:
support@bakbone.co.jp
India Office:
indiansupport@bakbone.com
1.2.2
Chapter 2:
16
- 2.0.4.d - nvjobdelete ........................................................................................................ 42 - 2.0.4.e - nvjobhold ........................................................................................................... 44 - 2.0.4.f - nvjoblist .............................................................................................................. 45 - 2.0.4.g - nvjobmodify........................................................................................................ 45 - 2.0.4.h - nvjobresume ...................................................................................................... 47 - 2.0.4.i - nvsetcreate ......................................................................................................... 48 - 2.0.4.j - nvsetdelete ......................................................................................................... 55 - 2.0.4.k - nvsetexport ........................................................................................................ 56 - 2.0.4.l - nvsetimport ......................................................................................................... 57 - 2.0.4.m - nvsetmodify ....................................................................................................... 58 - 2.0.4.n - nvjobstart ........................................................................................................... 62 - 2.0.4.o - nvtrigger ............................................................................................................ 62 2.0.5 - NetVault Logs and the Command Line Interface ....................................................... 63 - 2.0.5.a - nvlogdump ......................................................................................................... 63 - 2.0.5.b - nvlogpurge ......................................................................................................... 64 - 2.0.5.c - nvreadlog ........................................................................................................... 65 2.0.6 - Other Command Line Executables ........................................................................... 66 - 2.0.6.a - bonedate ........................................................................................................... 66 - 2.0.6.b - getmachineid...................................................................................................... 66 - 2.0.6.c - nvlicenseinfo ...................................................................................................... 66 - 2.0.6.d - nvlicenseinstall ................................................................................................... 66 - 2.0.6.e - nvpassword........................................................................................................ 66 - 2.0.6.f - nvpluginaccess.................................................................................................... 67 - 2.0.6.g - nvreport ............................................................................................................. 67 - 2.0.6.h - nvsendmail ........................................................................................................ 67 - 2.0.6.i - nvsendopmsg ...................................................................................................... 68
17
2.0.0
Important:
1. Prior to using any of the CLI commands illustrated in this chapter, please fully review Chapter 1: Introduction to the NetVault:Backup CLI on page 7 for complete details on the use of NetVault:Backups CLI utility, as well as any pre-requisites for use. 2. The commands covered for use in this guide are the only ones that are supported for use with NetVault. Any commands found in the ...\NetVault\util directory (or other NetVault directories) that are not covered in this guide are not supported and should not be used. BakBone Software can not be held accountable for any outcome that may result from the use of any non-supported CLI command(s).
2.0.1
2.0.1.a
nvclientaccess
Use this command to check whether a Client machine can be accessed by the NetVault:Backup Server.
Syntax nvclientaccess [-client <client name>] | [-clients <client name>] | [-tdclients <DBSname>] [-password <password>]
-client/-clients: Accompany this switch with the NetVault:Backup name of the Client to check access to it. -tdclients: This switch is used exclusively for NetVault:Backup Clients with the Teradata Database software installed. Accompany this switch with the DBS name of the Teradata Client to check access to it. -password: This switch, accompanied with the password associated with the NetVault:Backup Client, must be used for a Client with security enabled.
18
2.0.1.b
nvclientadd
Use this command to add a NetVault:Backup Client to the Server. This command only works if issued from the NetVault:Backup Server itself.
Syntax nvclientadd [-client <client name> | -clientip <IP address>] [-clientgroup <clientgroup>] [-password <password>] [-timeout <timeout period>] [-version]
Important:
1. The Client should be available and running a valid installation of NetVault:Backup before it can be added to a NetVault:Backup Server using this command. 2. If security is enabled on the target Client, the -password switch must be used and the proper password value established for the target Client must be input. 3. If the Client is not available to the Server, the nvclientlist find <ipaddress> command can be used to locate the machine. Please see a description of this command on page 19. -client: Accompany this switch with the NetVault:Backup name of the Client to be added to the Server. -clientip: Accompany this switch with the IP address of the machine to be added as NetVault:Backup Client. -clientgroup: This switch specifies the name of the Client Group to which the Client is to be added.
Important: The Client Group to be used must exist before this command is used.
NetVault:Backup will not automatically create a Client Group if this switch is used. Client Groups must be created in the NetVault:Backup GUI (i.e., no CLI utility is offered for the creation of a Client Group). -password: If NetVault:Backup security is enabled on a target Client, this switch must be used, accompanied with the exact password value established for the Client. -timeout: This option specifies the period of time (in minutes) that NetVault will wait on the Client to approve the add request. If this period elapses and no Client addition has occurred, an error message will be displayed stating that the request has timed out and the Client could not be added. -version: This switch gives the build date of the NetVault:Backup distribution installed on the target Client.
19
2.0.1.c
nvclientlist
Use this command for the following: To get a list of Clients added to the NetVault:Backup domain. To get a list of available NetVault:Backup Clients. To find a NetVault:Backup machine using either a specific NetVault:Backup name or IP address.
Syntax nvclientlist [-current [-name <client name>]] [-available [-name <client name>]] [-find <IP address>] [-version]
-current: This switch gives a list of Clients added to the NetVault:Backup domain. -available: This switch gives a list of available NetVault:Backup machines that can be added as Clients to the Server. -name: Accompany this switch with the NetVault:Backup name of the Client to be located. -find: Accompany this switch with the IP address of the machine to be located. -version: This switch gives the build date of the NetVault:Backup distribution installed on the target Client.
2.0.1.d
nvclientremove
Use this command to remove a Client from the domain controlled by the Server on which this command is run.
Syntax nvclientremove [-client <client name>] [-version]
-client: The NetVault:Backup name of the Client to be removed from the domain.
Important: The -client switch may only be used once per use of this command (i.e., it is
not possible to remove multiple NetVault Clients with a single use of the nvclientremove command). -version: This switch gives the build date of the NetVault:Backup distribution installed on the target Client.
20
2.0.2
2.0.2.a
asf_load_media
This command loads the specified media into the drive and locks it in the drive as ASF media.
Syntax asf_load_media -m <media name> | -b <barcode> -d <device name> [-s <server name>] [-c <client name>] [-wait]
-m: This switch followed by the media label of the desired media. -b: This switch followed by the barcode of the desired media. -d: The name of the target drive. -s: The NetVault:Backup name of the machine to which the target backup device is locally attached. If the device is locally attached to a NetVault:Backup Client (i.e., a NetVault:Backup SmartClient), this switch must be used to name that Client. -c: The NetVault:Backup name of the Client the device is attached to. -wait: This switch can be added to tell NetVault:Backup to wait until this task has completed before moving forward.
2.0.2.b
asf_ release_drive
This command releases the lock previously placed on the specified device by the asf_release_drive command and allows the drive and the media to be used by NetVault:Backup.
Syntax asf_release_drive -d <device name> [-s <server name>] [-c <client name>]
-d: The name of the target drive. -s: The name of the NetVault Server to which the device is locally attached (i.e., in the event that the device is locally attached to the NetVault Server)
21
-c: The NetVault:Backup name of the Client to which the device is attached (i.e., in the event the device is configured as a NetVault:Backup SmartClient). This switch is also used to name a remote NetVault:Backup Server that has the target device locally attached.
2.0.2.c
nvacslsmedia
Use this command to allocate/de-allocate media known to an ACSLS library.
Syntax nvacslsmedia [-allocate | -deallocate] [-medialabel <media label>] -libraryname <library name> [-servername <server name>] [-range <range-media >] [-file <filename >] [-version]
-allocate: Allocates the specified media. -deallocate: De-allocates the specified media. -medialabel: The switch followed by the media label or barcode of the desired media. Multiple labels/barcodes can be denoted by a comma separated list of values. -libraryname: The name of the target library. -servername: The NetVault:Backup name of the machine to which the target backup device is locally attached. If the device is locally attached to a NetVault:Backup Client (i.e., a NetVault:Backup SmartClient), this switch must be used to name that Client. In the event that the device is attached to the local instance of the NetVault:Backup Server, this switch can be left out. -range: Accompany this switch with a range of media label/barcode values that correspond to a series of media to be de-allocated. include a hyphen (with no spaces) between the values. -file: This option can be used to specify the list of media labels or barcodes corresponding to the set of media that are to be de-allocated. Note that only one entry (media label or barcode) can be specified per line. -version: This switch gives the build date of the NetVault:Backup distribution.
22
2.0.2.d
nvcheckdrive
Use this command to check the status of the specified drive. For example, it can be used to check the status of a drive that was taken off-line for some reason. If successful, the specified drive will be returned to on-line status so that it is available to NetVault:Backup for future jobs.
Syntax nvcheckdrive -servername <server name> [-drivename <drive name>] [-libraryname <library name>] [-drivenumber <drive number>]
-servername: The NetVault:Backup name of the machine to which the target backup device is locally attached. If the device is locally attached to a NetVault:Backup Client (i.e., a NetVault:Backup SmartClient), this switch must be used to name that Client. In the event that the device is attached to the local instance of the NetVault:Backup Server, this switch can be left out. -libraryname: The name of the target library. -drivename: Accompany this switch with the name of the target drive whose status is to be checked. -drivenumber: Accompany this switch with the drive number of the drive whose status is to be checked.
Important: If the -libraryname option is chosen to denote a library, then the -drivename or -drivenumber switch must be used to specify the desired drive. Examples of the Use of the nvcheckdrive Command
The examples below illustrate a few of the ways in which the different switches can be combined for the desired result: Standalone Drive - Checking the Status of a drive named Stndalone1 that is locally attached to the NetVault:Backup Server: nvcheckdrive -drivename Stndalone1 Library Drive (by Drive Name) - Checking the status of Drive 1 in a library device entitled NVLibrary that is locally attached to a NetVault:Backup Client named NVCLIENT1 nvcheckdrive -servername NVCLIENT1 -libraryname NVLibrary -drivename Drive 1
23
Library Drive (by Drive Number) - Checking the status of Drive 2 in a library device entitled NVLib2 that is locally attached to a remote NetVault:Backup Server, with the NetVault:Backup name NVSERVER2 nvcheckdrive -servername NVSERVER2 -libraryname NVLib2 -drivenumber 2
2.0.2.e
nvcleandrive
Use this command to clean the library media. If the number of cleaning lives has been set for the media, it will be reduced by one when used for this process.
Syntax nvcleandrive -libraryname <library name> -librarydrivenumber <drive number>
-libraryname: The name of the target library. -librarydrivenumber: The drive number or the drive that is to be cleaned.
2.0.2.f
nvclosedoor
Use this command in order to close the door of a library managed by the specified Server.
Syntax nvclosedoor [-servername <server name>] -libraryname <library name>
-servername: The NetVault:Backup name of the machine to which the target backup device is locally attached. If the device is locally attached to a NetVault:Backup Client (i.e., a NetVault:Backup SmartClient), this switch must be used to name that Client. In the event that the device is attached to the local instance of the NetVault:Backup Server, this switch can be left out. -libraryname: The name of the target library.
24
2.0.2.g
nvcloseeeport
Use this command in order to close the entry/exit port.
Syntax nvcloseeeport [-servername <server name>] -libraryname <library name> [-mediatype <media type>]
-servername: The NetVault:Backup name of the machine to which the target backup device is locally attached. If the device is locally attached to a NetVault:Backup Client (i.e., a NetVault:Backup SmartClient), this switch must be used to name that Client. In the event that the device is attached to the local instance of the NetVault:Backup Server, this switch can be left out. -libraryname: The name of the target library. -mediatype: The type of media in the entry/exit slot.
2.0.2.h
nvcloseeeportcleaning
Use this command in order to close the entry/exit port of the specified library for importing a cleaning tape.
Syntax nvcloseeeportcleaning [-servername <server name>] -libraryname <library name> [-mediatype <mediatype>]
-servername: The NetVault:Backup name of the machine to which the target backup device is locally attached. If the device is locally attached to a NetVault:Backup Client (i.e., a NetVault:Backup SmartClient), this switch must be used to name that Client. In the event that the device is attached to the local instance of the NetVault:Backup Server, this switch can be left out. -libraryname: The name of the target library. -mediatype: The type of media in the entry/exit slot.
25
2.0.2.i
nvdeviceeject
Use this command to remove any media from a specified standalone drive.
Syntax nvdeviceeject -devicename <device name> [-servername <server name>] [-librarydrivenumber <drive number>] [-wait]
-servername: The NetVault:Backup name of the machine to which the target backup device is locally attached. If the device is locally attached to a NetVault:Backup Client (i.e., a NetVault:Backup SmartClient), this switch must be used to name that Client. In the event that the device is attached to the local instance of the NetVault:Backup Server, this switch can be left out. -devicename: The name of the target device or library. -librarydrivenumber: The number of the target drive in the library. -wait: This switch can be added to tell NetVault:Backup to wait until this task has completed before moving forward.
Important: If the -libraryname option is chosen to demote a library then the -drivename or -drivenumber switch must be used to specify the desired drive. 2.0.2.j nvexportmedia
Use this command to export a piece of media from a tape library to its exit/entry (EE) port.
Syntax nvexportmedia [-servername <server name>] [-barcode <barcode> | -medialabel <medial label> | -slotspec <library name::slot number>] [-wait]
-servername: The NetVault:Backup name of the machine to which the target backup device is locally attached. If the device is locally attached to a NetVault:Backup Client (i.e., a NetVault:Backup SmartClient), this switch must be used to name that Client. In the event that the device is attached to the local instance of the NetVault:Backup Server, this switch can be left out. -barcode: This switch followed by the barcode number of the desired media. The barcode is to be preceded by an * (use only when searching by barcode).
26
Chapter 2 NetVault:Backup CLI Commands -medialabel: This switch followed by the media label of the desired media (use only when searching by media label). If media labels contain spaces, underscores (e.g., _) should be used in their place (e.g. my_media_1). -slotspec: This switch followed by the library name and slot number of the desired media. These two values must be separated using a double colon delimiter (e.g., ::). Use this switch only when searching by library slot. -wait: This switch can be added to tell NetVault:Backup to wait until this task has completed before moving forward.
2.0.2.k
nvopendoor
Use this command in order to open the door of a library managed by the specified Server.
Syntax nvopendoor [-servername <server name>] -libraryname <library name>
-servername: The NetVault:Backup name of the machine to which the target backup device is locally attached. If the device is locally attached to a NetVault:Backup Client (i.e., a NetVault:Backup SmartClient), this switch must be used to name that Client. In the event that the device is attached to the local instance of the NetVault:Backup Server, this switch can be left out. -libraryname: The name of the target library.
2.0.2.l
nvopeneeport
Use this command in order to open the entry/exit port for access to it.
Syntax nvopeneeport [-servername <server name>] -libraryname <library name>
-servername: The NetVault:Backup name of the machine to which the target backup device is locally attached. If the device is locally attached to a NetVault:Backup Client (i.e., a NetVault:Backup SmartClient), this switch must be used to name that Client. If the device is attached to the local instance of the NetVault:Backup Server, this switch can be left out. -libraryname: The name of the target library.
27
2.0.2.m
nvresetdrivestats
Use this command to reset the statistics for a specified drive.
Syntax nvresetdrivestats -servername <server name> [-libraryname <library name>] [-drivename <drivename>] [-drivenumber <drivenumber>] -action <action>
-servername: The NetVault:Backup name of the machine to which the target backup device is locally attached. If the device is locally attached to a NetVault:Backup Client (i.e., a NetVault:Backup SmartClient), this switch must be used to name that Client. If the device is attached to the local instance of the NetVault:Backup Server, this switch can be left out. -libraryname: The name of the target library. -drivename: The name of the target drive. -drivenumber: The drive number assigned to the desired drive in a library. -action: The action to perform on the drive. The value that can accompany this switch include: drive: To reset drive statistics. clean: to reset drive cleaning statistics. all: To reset all statistics for the specified drive.
Important: If the -libraryname option is chosen to denote a library then the -drivename or -drivenumber switch must be used to specify the desired drive. Examples of the Use of the nvresetdrivestats Command
The examples that follow illustrate the use of this command with its associated switches to obtain a few of the available results. Reset Drive Statistics in a Standalone Drive - To reset the stats for a standalone drive named Stndalone1 that is locally attached to the NetVault:Backup Server. nvresetdrivestats -drivename Stndalone1 -action drive Reset Cleaning Statistics for a Library Drive (by Drive Name) - To reset the cleaning statistics for Drive 1 in a library device entitled NVLibrary that is locally attached to a NetVault:Backup Client named NVCLIENT1 nvresetdrivestats -servername NVCLIENT1 -libraryname NVLibrary -drivename Drive 1 -action clean
28
Chapter 2 NetVault:Backup CLI Commands Reset All Statistics for a Library Drive (by Drive Number) - To reset all statistics for Drive 2 in a library device entitled NVLib2 that is locally attached to a remote NetVault:Backup Server, with the NetVault:Backup name NVSERVER2 nvresetdrivestats -servername NVSERVER2 -libraryname NVLib2 -drivenumber 2 -action all
2.0.2.n
nvsetcleaninglives
Use this command to set the number of lives for a cleaning tape in the specified library device. The slot containing the cleaning tape is specified using the -slotnumber switch.
Syntax nvsetcleaninglives [-server <server name>] -libraryname <library name> [-slotnumber <slot number>] [-lives <lives>]
-server: The NetVault:Backup name of the machine to which the target backup device is locally attached. If the device is locally attached to a NetVault:Backup Client (i.e., a NetVault:Backup SmartClient), this switch must be used to name that Client. If the device is attached to the local instance of the NetVault:Backup Server, this switch can be left out. -libraryname: The name of the target library. -slotnumber: The cleaning slot number in the library. -lives: The number of lives to be set for the cleaning media.
29
2.0.2.o
nvsetdrivecleaning
Use this command to set the cleaning cycle for a specified library device.
Syntax nvsetdrivecleaning -libraryname <library name> -librarydrivenumber <drive number> -days <number of days> -dataxfersize <data transfer size> -hours <number of hours> -rwerrors <number of read/write errors> [-displayonly]
-libraryname: The name of the target library. -librarydrivenumber: The drive number of the drive for which the cleaning cycle has to be set. -days: The number of days the drive is to be used until a clean cycle. -dataxfersize: The size of data to be transferred before clean cycle. -hours: The number of hours the drive is to used until a clean cycle. -rwerrors: The number of read/write errors that can occur before a clean cycle. -displayonly: This option can be used to include additional details on the named device.
Important: Other than the -displayonly switch, all of the switches offered for use must be included in the syntax of a single command. Therefore, a value of -1 can be used with any of the above-mentioned switches in order to disable it completely. Example Use of the nvsetdrivecleaning Command
Three examples of usable syntax are displayed below that will set Drive 1 of a library entitled SONY LIB-162 to clean itself: Every 200 GB of Data Transfer Every 100 Hours of Drive Usage: If More than 100,000 Read/Write Errors Occur nvsetdrivecleaning -libraryname SONY LIB-162 -librarydrivenumber 1 -days -1 -dataxfersize 200 -hours 100 -rwerrors 1024
30
2.0.3
Important:
1. A media item can be identified by its barcode (if one exists), its media label, or its slot position within a library when using CLI commands. 2. If media labels contain spaces, underscores (_) should be used in their place (e.g., my_media_1). 3. Various operating systems do not support the use of special characters when included in a medias label (e.g., :, !, @, #, $, %, ^, &, *, (, ), >, <, \, [, ], {, }, , or ). Therefore if a CLI command is issued to call out a piece of media whose label contains one of these characters, an error message may be revealed and the command will fail. Media labelled with any of these characters can only managed from the NetVault:Backup GUI (i.e., in the Media Management or Device Management windows).
2.0.3.a
nvblankmedia
Use this script to blank various media.
Syntax nvblankmedia [-servername <server name>] -barcode <barcode> | -medialabel <media label> | -slotspec <library name::slot number> [-wait]
-servername: The NetVault:Backup name of the machine to which the target backup device is locally attached. If the device is locally attached to a NetVault:Backup Client (i.e., a NetVault:Backup SmartClient), this switch must be used to name that Client. If the device is attached to the local instance of the NetVault:Backup Server, this switch can be left out. -barcode: This switch followed by the barcode number of the desired media. The barcode is to be preceded by an * (use only when searching by barcode). -medialabel: This switch followed by the media label of the desired media (use only when searching by media label). If media labels contain spaces, underscores (_) should be used in their place (e.g., my_media_1). -slotspec: This switch followed by the library and slot number of the desired media (use only when searching by library slot). -wait: This switch can be added to tell NetVault:Backup to wait until this task has completed before moving forward.
31
Important:
1. Blanking media completely removes ALL data from a selected piece of media. Use caution when blanking media. 2. This command removes all backup indexes for backups on the selected media from the NetVault:Backup databases.
2.0.3.b
nvbulkblankmedia
Use this command to bulk blank media.
Syntax nvbulkblankmedia -libraryname <library name> -medialabel <media label> [-allmedia] -password <password> [-wait]
-libraryname: Specifies the name of the library containing the media to be cleared. -medialabel: Specifies a common string that appears in the labels of all the media to be cleared. -allmedia: If this switch is included in the syntax, all media in the named library will be blanked. -password: Bulk blanking operations require that the NetVault:Backup Administrator password be input, which must be specified with this switch. -wait: This switch can be added to tell NetVault:Backup to wait until this task has completed before moving forward.
Important:
1. Blanking media completely removes ALL data from a selected piece of media. Use caution when blanking media. 2. This command removes all backup indexes for backups on the selected media from the NetVault:Backup databases.
32
3. The Bulk Blank utility will not work on Servers on which security is disabled. 4. The library name and media label are case sensitive. 5. The wild card character *, used to represent a series of characters, is supported for the medialabel switch.
2.0.3.c
nvexportmedia
Use this command to export a piece of media from within a tape library to its exit/ entry (EE) port.
Syntax nvexportmedia -servername <server name> -barcode <barcode> | -medialabel <media label> | -slotspec <lib::slot> [-wait]
-servername: The NetVault:Backup name of the machine to which the target backup device is locally attached. If the device is locally attached to a NetVault:Backup Client (i.e., a NetVault:Backup SmartClient), this switch must be used to name that Client. If the device is attached to the local instance of the NetVault:Backup Server, this switch can be left out. -barcode: This switch followed by the barcode number of the desired media. The barcode is to be preceded by an * (use only when searching by barcode). -medialabel: This switch followed by the media label of the desired media (use only when searching by media label). If media labels contain spaces, underscores (_) should be used in their place (e.g. my_media_1). -slotspec: This switch followed by the library and slot number of the desired media. Use this switch only when searching by library slot. -wait: This switch can be added to tell NetVault:Backup to wait until this task has completed before moving forward.
33
2.0.3.d
nvlabelmedia
Use this command to label selected new media or re-label existing.
Important: Media that contain existing backups may not be re-labelled without first running either nvblankmedia or nvreusemedia commands.
Syntax nvlabelmedia [-servername <server name>] -barcode <barcode> | -medialabel <media label> | -slotspec <lib::slot> -newlabelname <new media label> [-newgroupname <new media group name>] [-newoffsitelocation <new off-site location name>] [-wait]
-servername: The NetVault:Backup name of the machine to which the target backup device is locally attached. If the device is locally attached to a NetVault:Backup Client (i.e., a NetVault:Backup SmartClient), this switch must be used to name that Client. If the device is attached to the local instance of the NetVault:Backup Server, this switch can be left out. -barcode: This switch followed by the barcode number of the desired media. The barcode is to be preceded by an * (use only when searching by barcode). -medialabel: This switch followed by the media label of the desired media (use only when searching by media label). If media labels contain spaces, underscores (_) should be used in their place (e.g. my_media_1). -slotspec: This switch followed by the library and slot number of the desired media (use only when searching by library slot). -newlabelname: This switch followed by the new name desired for the selected piece of media. If the new media label is to contain spaces, underscores (_) should be used in their place (e.g.,my_media_1). -newgroupname: This switch followed by the new name desired for the selected group of media. If the new media group label is to contain spaces, underscores (_) should be used in their place (e.g., my_media_1). -newoffsitelocation: This switch followed by a new off-site location to be assigned to the selected piece of media. -wait: This switch can be added to tell NetVault:Backup to wait until this task has completed before moving forward.
34
2.0.3.e
nvlistblankmedia
Use this command to get a list of the slots containing blank media for a given NetVault:Backup Server and library.
Syntax nvlistblankmedia -servername [servername] -libraryname [library name]
-servername: The NetVault:Backup name of the machine to which the target backup device is locally attached. If the device is locally attached to a NetVault:Backup Client (i.e., a NetVault:Backup SmartClient), this switch must be used to name that Client. If the device is attached to the local instance of the NetVault:Backup Server, this switch can be left out. -libraryname: The name of the library.
2.0.3.f
nvmediadetails
Use this command to view details pertaining to a media item or media group.
Syntax nvmediadetails [-label <media label>] [-group <group label>] [-all] [-listlabels] [-listgroups] [-version]
-label: Accompany this switch with the media label of the media for which the details are to be viewed. -group: Accompany this switch with the media group label of the media group for which the details are to be viewed. -all: This option gives details pertaining to all individual media items that have been assigned a media label as well as media items belonging to different media groups. -listlabels: This option will give the details of all the media items that have been assigned a media label. The -group option can be used with this option for the details pertaining to the media items belonging to the specified group. -listgroups: Use this option for a list of media groups. -version: This switch gives the build date of the NetVault:Backup distribution.
35
Examples
The example syntax below would be used to display the details of a single media item with the label MyTape. nvmediadetails -label MyTape The example syntax below would be used to display the details of all of the media items contained in the Media Group entitled, MyGroup. nvmediadetails -group MyGroup -all
2.0.3.g
nvremovemedia
Use this command to delete the media information from the NetVault:Backup database.
Important: The media has to be taken offline prior to issuing this command for deleting the media information.
Syntax nvremovemedia [-medialabel <media label>] [-displaymedialist] [-version]
-medialabel: Accompany this switch with the media label of the offline media that is to be removed from the NetVault:Backup database. -displaymedialist: This option gives details pertaining to all the media items that have been assigned a media label. -version: This switch gives the build date of the NetVault:Backup distribution.
2.0.3.h
nvreusemedia
Use this command in order to set specific media as reusable.
Syntax nvreusemedia [-servername <server name>] -barcode *<barcode> | -medialabel <media label> | -slotspec <library name::slot number>
-servername: The NetVault:Backup name of the machine to which the target backup device is locally attached. If the device is locally attached to a NetVault:Backup Client (i.e., a NetVault:Backup SmartClient), this switch must be used to name that Client. If the device is attached to the local instance of the NetVault:Backup Server, this switch can be left out.
36
Chapter 2 NetVault:Backup CLI Commands -barcode: This switch followed by the barcode number of the desired media. The barcode is to be preceded by an * (use only when searching by barcode). -medialabel: This switch followed by the media label of the desired media (use only when searching by media label). If media labels contain spaces, underscores (_) should be used in their place (e.g. my_media_1). -slotspec: This switch followed by the library and slot number of the desired media (use only when searching by library slot).
Important:
1. The nvreusemedia CLI command is not supported for use with ACSLS/ADIC DAS library systems. Attempts to use this command with these devices will be met with a failure message. 2. This command removes all backup indexes for backups on the selected media from the NetVault:Backup Databases.
2.0.3.i
nvscanmedia
Use this command to scan for and locate media of the selected type.
Syntax nvscanmedia [-servername <server name>] -barcode *<barcode> | -medialabel <media label> | -slotspec <library name::slot number> [-wait]
-servername: The NetVault:Backup name of the machine to which the target backup device is locally attached. If the device is locally attached to a NetVault:Backup Client (i.e., a NetVault:Backup SmartClient), this switch must be used to name that Client. If the device is attached to the local instance of the NetVault:Backup Server, this switch can be left out. -barcode: This switch followed by the barcode number of the desired media. The barcode is to be preceded by an * (use only when searching by barcode). -medialabel: This switch followed by the media label of the desired media (use only when searching by media label). If media labels contain spaces, underscores (_) should be used in their place (e.g. my_media_1). -slotspec: This switch followed by the library and slot number of the desired media (use only when searching by library slot). -wait: This switch can be added to tell NetVault:Backup to wait until this task has completed before moving forward.
37
Important:
1. This command can be used to import an item of media from another NetVault:Backup device, including media previously in a device controlled by a different NetVault:Backup Server. Prior to running this command, media of this type is recognized as FOREIGN and a restore of data from this media cannot be conducted until the media is scanned. 2. It writes backup indexes for all backups on the selected media to the NetVault:Backup databases (unless the index entry is already present in the database).
2.0.3.j
nvsyncronizesilomedia
Use this command to allocate all the known media in the specified ACSLS library.
Syntax nvsyncronizesilomedia [-servername <server name>] -libraryname <library name>
-servername: The NetVault:Backup name of the machine to which the target backup device is locally attached. If the device is locally attached to a NetVault:Backup Client (i.e., a NetVault:Backup SmartClient), this switch must be used to name that Client. If the device is attached to the local instance of the NetVault:Backup Server, this switch can be left out. -libraryname: The name of the target library.
2.0.3.k
nvupdateserialnumber
Use this command to update the serial number of any drive in the specified library back to its original number.
Syntax nvupdateserialnumber [-servername <server name>] -libraryname <library name> [-bayname <bay name>] [-checkonly]
-servername: The NetVault:Backup name of the machine to which the target backup device is locally attached. If the device is locally attached to a NetVault:Backup Client (i.e., a NetVault:Backup SmartClient), this switch must be used to name that Client. If the device is attached to the local instance of the NetVault:Backup Server, this switch can be left out. -libraryname: The name of the target library. -bayname: The name of the drive bay that the target drive occupies in the named library. -checkonly: Use this option to check the media serial number.
38
2.0.4
2.0.4.a
nvexpiresaveset
Use this command to expire a backup saveset and remove its entry from the NetVault:Backup Database.
Syntax nvexpiresaveset -savesetid <saveset ID number> [-version]
Important: The -savesetid switch may only be used once per use of this command (i.e.,
it is not possible to expire multiple savesets with a single use of the nvexpiresaveset command). -version: This switch gives the build date of the NetVault:Backup distribution.
2.0.4.b
nvjobabort
This command allows a user to abort a job that is currently running. However, if the job is a scheduled one, it must actually be deleted from the NetVault:Backup GUI.
Syntax nvjobabort [-servername <server name>] -jobid <jobid> [-instanceid <instance ID #>]
-servername: The NetVault:Backup Server that is administering the job. If the job is being administered by a remote NetVault:Backup Server, this switch must be used to name that specific Server. If the local instance of the NetVault:Backup Server is administering the job, this switch can be left out of the syntax. -jobid: The NetVault:Backup Job ID of the job being aborted. -instanceid: The instance of the job being aborted.
Important: Unless one is specified, NetVault:Backup will assume the default instance ID is
1.
39
2.0.4.c
nvjobcreate
Use this command to create a backup or restore job. A job can be created to be later submitted. This is done by submitting a job title and using pre-defined Selection Sets.
Syntax nvjobcreate [-server <server name>] -jobtitle <jobtitle> -type <job type> [-selectionsetname <backup/restore selection set name>] [-selectionoptionssetname <GUI-created backup options set name>] [-schedulesetname <schedule set name>] [-backupoption <backup option>=<value>] [-targetsetname <target set name>] [-advoptssetname <advanced options set name>] -submit -parameters <parameter file name> -version
-server: The NetVault:Backup Server that is to administer the job. If the job is to be administered by a remote NetVault:Backup Server, this switch must be used to name that specific Server. If the local instance of the NetVault Server is to be used to administer the job, this switch can be left out of the syntax. -jobtitle: Input the desired name for the job along with this switch. -type: Accompany this switch with the type of NetVault:Backup job to be created (e.g., -type backup or -type restore). The default job type is backup (i.e., if the -type switch is applied with no accompanying backup or restore variable, NetVault:Backup will assume the job is a backup job). -selectionsetname: Include the name of the Selection Set to be used with a backup/restore job with this switch. This can be a Selection Set that was created in the NetVault:Backup GUI, or one can be created from the command line, using the nvsetcreate command, described on page 48. -selectionoptionssetname: Backup Job Only - Include the name of a Set of Backup options that should be used with a job, with this switch. This swirch applies specifically to Backup Options Sets that were created and saved using the NetVault:Backup GUI (i.e., it is not possible to create a Set of Backup Options from the CLI -- you must either use this option to specify a Set created in the GUI, or individually specifiy Backup Options using the -backupotpion switch, explained below).
40
Chapter 2 NetVault:Backup CLI Commands -schedulesetname: The name of the Schedule Set used to set the schedule details for the job. The job will be scheduled to run immediately (i.e., the default settings for schedule will be used) if this option is not used. This set can be one that was created and saved in the NetVault:Backup GUI, or one can be created from the command line, using the using the nvsetcreate command that is described on page 48. -backupoption: This switch is used to set Backup Options for the job. The Tag ID of the window item to be set is required. This can either be the backup option name as recognized by the CLI, or a numeric value assigned to the option by NetVault:Backup. Both of these values are revealed beneath the [Plugin Options] heading in the nvsetmodify.cfg configuration file (please see the section, The nvsetmodify.cfg File of Chapter 1 on page 13 for information on accessing and viewing this file). Input either of these values in place of the <field> variable, and input a boolean argument for the <Value> variable to enable/disable the option (i.e., True to enable, and False to disable).
Important:
1. This switch must be followed by a colon (:) and no spaces before or after the Tag ID (e.g., -backupoption:<Tag ID>=True/False. 2. The nvjobcreate command does not allow for the setting of Restore Options via a specific switch. Any desired Restore Options for use must be included in the creation of the Restore Selection Set to be used. The nvsetcreate command offers a switch that is used to incorporate Restore Options into the Restore Selection Set. For complete details, please see the section, nvsetcreate on page 48. -targetsetname: The name of the Target Set used to specify the target media and drive details. The default target options (as displayed in the NetVault GUI) are used if no Target Set is specified. This set can be one that was created and saved in the GUI, or one can be created from the command line, using the nvsetcreate command that is described on page 48. -advoptssetname: The name of the Advanced Options Set used to specify advanced backup/restore related options. The default Advanced Options (as displayed in the NetVault:Backup GUI) are used if no Advanced Options Set is specified for the backup or restore job. This set can be one that was created and saved in the NetVault:Backup GUI, or one can be created from the command line, using the nvsetcreate command that is described on page 48. -submit: If this switch is used, the job will be submitted and listed as an active job. If omitted, the job will be saved but NOT run or scheduled. The job may be scheduled at a later time using the nvjobmodify command.
41
-parameters: Use this option to redirect nvjobcreate to read options from the specified parameter file. -version: This switch gives the build date of the NetVault:Backup distribution.
42
2.0.4.d
nvjobdelete
Use this command in order to delete jobs matching the criteria specified by the options from the scheduler.
Syntax nvjobdelete [-jobid <jobid>] [-type <job type>] [-jobrange <jobid-jobid>] [-jobtitle <job title>] [-client <client>] [-plugin <plugin>] [-selectionsetname <selection set name>] [-schedulesetname <schedule set name>] [-targetsetname <target set name>] [-advoptssetname <advanced options set name>] [-force] [-sheduleonly] [-version]
-jobid: Accompany this switch with the numerical job identification value assigned by NetVault to a single job that is to be deleted (e.g., -jobid 36).
Important: The -jobid switch may only be used once per use of this command (i.e., it is not possible to delete multiple jobs with a single use of the nvjobdelete command).
-type: Accompany this switch with the type of NetVault:Backup job to be deleted (e.g., -type backup or -type restore). This option should only be used if a specific job type is to be deleted (i.e., leave this option out of the syntax entirely if all NetVault:Backup job types are to be deleted). -jobrange: Accompany this switch with a range of job identification values that correspond to a series of jobs to be deleted, separated by a hyphen (e.g. -jobrange 30-45). -jobtitle: Accompany this switch with the name of the job enclosed in quotes (e.g., -jobtitle Full_Backup_1) to delete job(s) with a matching title. -client: Accompany this switch with the exact NetVault:Backup name of a NetVault:Backup Client that served as target for the jobs that are to be deleted (e.g., -client NV_Client_MKTG). All jobs performed using the named NetVault:Backup Client will be deleted.
43
-plugin: Accompany this switch with the exact name of the NetVault:Backup APM/plugin used in the jobs that are to be deleted. Ensure that the APM/ plugin name is enclosed in quotes (e.g., -plugin File System). -selectionsetname: Accompany this switch with the name of a pre-defined backup/restore selection set that was used in the job(s) to be deleted. -schedulesetname: Accompany this switch with the name of a predefined schedule set that was used in the job(s) that are to be deleted. -targetsetname: Accompany this switch with the name of a predefined target set that was used in the job(s) that are to be deleted. -advoptssetname: Accompany this switch with the name of a predefined advanced options set that was used in the job(s) that are to be deleted.
Important: This applies to the use of the following switches with this command:
-jobtitle -client -plugin -selectionsetname -schedulesetname -targetsetname -advoptssetname In the event that any of these switches are used alone in the syntax of this command, all instances of a job that meet the parameters set in the switch will be deleted (e.g., nvjobdelete -plugin File System would result in all File System Plugin jobs being deleted). However, other switches can be used in conjunction to limit the total number of jobs deleted (e.g., if used in conjunction with the -jobrange switch, only jobs that fall into the Job ID range specified that meet the parameters set by one of these switches, will be deleted). -force: If a job that meets the parameters set by another switch is currently in the queue to be run (i.e., the job is scheduled to run at a later time), any attempt to delete it with this command will fail. Use of the -force switch in conjunction with other switches will cause any eligible jobs to be removed from the queue and therefore successfully deleted. -scheduleonly: Used in lieu of the -force switch, this switch can be used to only remove any eligible jobs from the job queue, but not actually delete them from the NetVault:Backup Database. -version: This switch gives the build date of the NetVault:Backup distribution.
44
2.0.4.e
nvjobhold
Use this command to put a currently scheduled report job on hold temporarily. The job can be resumed using the nvjobresume command.
Syntax nvjobhold [-servername <server name>] -jobid <jobid> [-version]
-servername: The NetVault Server that is administering the job. If the job is being administered by a remote NetVault Server, this switch must be used to name that specific Server. If the local instance of the NetVault Server is administering the job, this switch can be left out of the syntax. -jobid: The Job ID of the job that is to be put on hold.
Important: The -jobid switch may only be used once per use of this command (i.e., it is only possible to place a hold on a single job with the nvjobhold command).
-version: This switch gives the build date of the NetVault distribution.
45
2.0.4.f
nvjoblist
Use this command to list all active jobs.
Syntax nvjoblist [-servername <server name>] [-delimiter <delimiter>] [-title <title>] [-fixedcols] [-noheader] [-version]
-servername: The NetVault Server that is administering the job(s). If administered by a remote NetVault Server, this switch must be used to name that specific Server. If the local instance of the NetVault Server is being used to administer the job(s), this switch can be left out of the syntax. -delimiter: Use this option to specify the delimiter character that is used to separate fields. -title: Accompany this switch with the name of the job enclosed in quotes (e.g., -jobtitle Full_Backup_1) to list job(s) with a matching title. -fixedcols: Use this option to vertically align all the rows in the output. -noheader: Use this option if the header row is not required in the output. -version: This switch gives the build date of the NetVault distribution.
2.0.4.g
nvjobmodify
Use this option to modify a given job as described by the -change option(s).
Syntax nvjobmodify -jobid <jobid> -jobname <job name> -type <job type> -change <change description> [-submit] [-parameters <parameter file>] [-assign <assignment character>] [-delimit <delimiter character>] [-version]
46
Chapter 2 NetVault:Backup CLI Commands -jobid: Accompany this switch with the numerical job identification value assigned by NetVault:Backup to the single job that is to be modified (e.g., -jobid 36). This option is not required if the -jobname option is used. -jobname: Accompany this switch with the name of the job enclosed in quotes. This command will fail if more than one job with the given title is available on the Server. In such cases, use the -jobid option. -type: Accompany this switch with the type of NetVault:Backup job to be modified (e.g., -type backup or -type restore). -change: This switch is used to specify the changes that are to be made to the given job. Any number of values can be specified with this option. The <change description> is formatted as follows: <item>[:<field>]=<value> The <Item> variable refers to the name of the item in the job that is to be modified. The <Field> variable, if applicable, calls out a specific field in the item that is to be modified. Finally, the <Value> variable represents the change that will occur for the selected Item/Field. The following values can be input and used as the <item> variable: Title: To change the Job Title. Set: To change the Selection Set. <value> specifies the new set name. <field> may take any of the following values: BS: Backup Selection Set S: Schedule Set BT: Backup Target Options Set AB: Advanced Backup Options Set RS: Restore Selections Set AR: Advanced Restore Options Set Options: This switch is used to modify/add Backup Options to a job. The Tag ID for the actual backup option to be set is required. This can either be the backup option name as recognized by the CLI, or a numeric value assigned to the option by NetVault. Both of these values are revealed beneath the [Plugin Options] heading in the nvsetmodify.cfg configuration file (please see the section, The nvsetmodify.cfg File of Chapter 1 on page 13 for information on accessing and viewing this file). Input either of these values in place of the <field> variable, and input a boolean argument for the <Value> variable to enable/disable the option (i.e., True to enable, and False to disable).
Important: This switch must be followed by a colon (:) and no spaces before or after the
Tag ID (e.g., Options:<Tag ID>=True/False).
47
-submit: Use this option to schedule/re-schedule the given job following application of the changes. This option may also be used on its own in order to schedule jobs that have been created but not scheduled. -parameter: Use this option to redirect nvjobmodify to read options and their values from a given parameter file. -assign: The character used for assignment in change descriptions may be changed using the -assign option. This option must be used if old or new values contain the default assignment character =. -delimit: The character used as a delimiter in change descriptions may be changed using the -delimit option. This option must be used if old or new values contain the default delimiter :. -version: This switch gives the build date of the NetVault:Backup distribution.
2.0.4.h
nvjobresume
Use this command to resume a job previously put on hold.
Syntax nvjobresume [-servername <server name>] -jobid <jobid> [-version]
-servername: The NetVault Server that is administering the job. If the job is being administered by a remote NetVault Server, this switch must be used to name that specific Server. If the local instance of the NetVault Server is administering the job, this switch can be left out of the syntax. -jobid: The Job ID of the job to be resumed.
Important: The -jobid switch may only be used once per use of this command (i.e., it is not possible to resume multiple jobs with a single use of the nvjobresume command).
-version: This switch gives the build date of the NetVault distribution.
48
2.0.4.i
nvsetcreate
Use this command to create a Selection Sets of different types using the available options.
Syntax nvsetcreate [-version] [-setname <set name>] -type <set type> <set type specific options> -assign <assignment character> -delimit <delimiter character> -parameters <parameter file name>]
Important: A list of the permitted options for any set type may be obtained with the
command nvsetcreate type <set type>. -setname: Use this switch to specify a name for the Set to be created. -type: Use this switch to specify the set type. The <set type> value must be one of the following: BS: Backup Selections Set S: Schedule Set BT: Backup Target Set AB: Backup Advanced Options Set RS: Restore Selections Set AR: Restore Advanced Options Set -set type specific options: These are described in the sections that follow, and are dependant upon the type of set to be created. -assign: The character used for assignment may be changed using this option. This switch must be used if any user input variable (e.g., a file name or directory path) contains the equal sign (=), because it serves as the default assignment character. -delimit: The character used as a delimiter may be changed using this option. This switch must be used if any user input variable (e.g., a file name or directory path) contains a colon (:), because it serves as the default delimiter character. -parameters: This switch redirects nvsetcreate to read options and their arguments from the given parameter file. An example parameter file is given following the descriptions of the various options. -version: This switch gives the build date of the NetVault distribution.
49
Important: This switch can only be used to exclude items that appear in the file system
tree below items that have already been named for inclusion. -info <path=value[:value[:]]>: Some plugins add extra information to nodes in the selection tree. This may be information that would otherwise be unavailable to the plugin at backup time. This information can be specified with the -info switch, but only for nodes where default values are always added by the plugin. The type and order of the values specified is plugin dependant. For more information contact BakBone Support. Example Backup Selection Set Creation In the example that follows a Windows-based Client with the NetVault name WinClient is the target of a File System Plugin backup job in which files in a directory entitled work on its C:\ partition are to be backed up. However, all files with the .txt extension are to be excluded. nvsetcreate -setname workbackup -type BS -client WinClient -plugin File System -include C:\work -exclude C:\work\*.txt
50
Chapter 2 NetVault:Backup CLI Commands be used. It this option is not used then the -saveset option must be used instead. -include <path>: This switch specifies the path to be restored. It should consist of the names of each node below the selected item in the tree as they appear in the NetVault GUIs Restore window (each separated by / or \ on the Windows File System Plugin). -exclude <path>: This switch specifies the path to be excluded from the backup. It is specified in the same way as included paths.
Important: This switch can only be used to exclude items that appear in the file system
tree below items that have already been named for inclusion. -rename <path> =<new name or path>: Use this switch if the restored item has to be renamed or relocated. It is possible to combine rename and relocation functionality, or use each independently. If the item is only to be renamed, then only the new name should be given. For relocating items, the full path should be specified. Example Syntax for a Rename Only (i.e., the selected file will be restored to it original backup destination, but with a new file name): -rename /usr/joe/diary=diary.old Example Syntax for a Relocation Only (i.e., the selected file will maintain its existing file name, but it will be restored to a new location): -rename /usr/joe/diary=/home/joe/diary Example Syntax for Simultaneous Rename and Relocate (i.e., the selected file will be given a new name and it will be restored to a different directory/volume): -rename /usr/joe/diary=/home/joe/diary.old
Important:
1. As noted in the description of the -assign switch on page 48, if a rename value or relocation path to be used contains an = character, then the assignment character must be changed with the -assign switch. 2. If relocating data to a different directory, the new target directory must exist on the target machine before execution of the restore command (i.e., you must manually create the desired target directory if it doesnt already exist). NetVault will not automatically create a new directory. -restoreoption <option=value>: This switch is used to add Restore Options (if any are available for use with the target APM/Plugin). The Tag ID of the window item to be set is required. This can either be the restore option name as recognized by the CLI, or a numeric value assigned to the option by
51
NetVault. Both of these values are revealed beneath the [Plugin Options] heading in the nvsetmodify.cfg configuration file (please see the section, The nvsetmodify.cfg File of Chapter 1 on page 13 for information on accessing and viewing this file). Input either of these values in place of the <field> variable, and input a boolean argument for the <Value> variable to enable/disable the option (i.e., True to enable, and False to disable).
Important: This switch must be followed by a colon (:) and no spaces before the Tag ID
(e.g., -restoreoption:<Tag ID>) -restoretarget <client>: Use this switch to specify the name of the Client to restore the selected items to. By default items are restored to the same Client that they were backed up from. The selected plugin must have been installed on the Client for this operation to be successful. -info <path=value[:value[:]]>: Use this switch to specify alternate values for items in a nodes plugin information. The type and order of the values specified is plugin dependent. For more information, please contact BakBone Support. Example Restore Selection Set Creation Below is an example of the syntax used to create a restore selection set named restorebig that is to be restored to the Client isp9039. The backup was performed using the the File System Plugin and the target backup saveset has been assigned the ID 320 by NetVault. The entire volume is to be restored except for a directory name a1 and the file document is to be relocated from the directory /usr/var to usr/tmp. Lastly, the Restore Option, Overwrite Newer Files is to be set to enabled, to allow for overwriting. nvsetcreate -setname restorebig -type RS -client isp9039 -plugin File System -saveset 320 -include /-exclude /a1 -rename /usr/var/document=/usr/tmp/document -restoreoption:NVFSOPT_OVERNEW=TRUE
52
Chapter 2 NetVault:Backup CLI Commands command, for existing backup jobs (see the description of this switch on page 46). Through the Use of a Backup Options Set Created in the GUI - If you have created a Backup Options Set using the NetVault GUI, you can call it out for use during creation of a CLI job by including its exact name with the -selectionoptionsetname switch. Restore Options Sets - In difference to Backup Options, Restore Options can not be established during job creation (i.e., no switch is provided to do so with the nvjobcreate command). Restore Options are specified using the -restoreoption switch that is available for use with the nvsetcreate or nvsetmodify commands (see the description of this switch on page 50). Once the Selection Set is saved, when it is called out using the nvjobcreate command, the Restore Options saved in the Set will be utilized.
53
54
NetVault: Backup Command Line Interface Users Gude Example Backup Advanced Options Set Creation
55
In the example that follows, the proper syntax is revealed for an backup advanced options set named AdvOptBU with a backup life of 5 full backups, with network compression enabled; is to be verified and is to run a postscript entitled jobdone. nvsetcreate -type AB -setname AdvOptBU -backuplife 5 -netcompress TRUE -verify TRUE -postscript jobdone
2.0.4.j
nvsetdelete
Use this command to delete the named set of the given type from the NetVault Server.
Syntax nvsetdelete -setname <set name> [-type <set type>] [-version]
-setname: Accompany this switch with the name of the set to be deleted. -type: Use this option to specify the set type. It can take one of the following values: BS: Backup Selections Set S: Schedule Set BT: Backup Target Options Set AB: Advanced Backup Options Set RS: Restore Selections Set AR: Advanced Restore Options Set -version: This switch gives the build date of the NetVault distribution.
56
2.0.4.k
nvsetexport
Use this command to export the named set(s) of the given type from the NetVault Server to the output file.
Syntax nvsetexport [-setname <name>] -type <set type> -file <output file> [-version]
-setname: Use this switch to specify the set name. More than one set may be exported by repeating this option with different set names in the command. If this option is not used then all sets of the specified type are written to the output file.
Important: A space in the set name may be indicated using an exclamation character !.
For example, the set name my schedule set name can be input as my!schedule!set!name. -type: This option is used to specify the type of set(s) to be exported. It can take one of the following values: BS: Backup Selections Set S: Schedule Set BT: Backup Target Options Set AB: Advanced Backup Options Set RS: Restore Selections Set R: Advanced Restore Options Set -file: Accompany this switch with the name of the file to be created. -version: This switch gives the build date of the NetVault distribution.
57
2.0.4.l
nvsetimport
Use this command to import the named set(s) from the input file to the NetVault Server.
Syntax nvsetimport -file <input file> [-setname <name>[=<new name>]] [-assign <assignment character>] [-version]
-file: Accompany this switch with the name of the file to be read. -setname>[=<newname>]: One or more -setname options may be specified to select specific sets from the file. Each may be renamed if required. If no setname option is present then all sets in the input file are imported, each retaining their original name. Note that if a set already exists with the given name then it will not be overwritten. -assign: The character used for assignment may be changed using this option. It must be used if values contain the default assignment character =. -version: This switch gives the build date of the NetVault distribution.
58
2.0.4.m
nvsetmodify
Use this command to modify the given set, as described by the change option(s).
Syntax nvsetmodify -setname <set name> -type <set type> -change <change description> [-parameters <parameter file>] [-assign <assignment character>] [-delimit <delimiter character>] [-version]
-setname: Accompany this switch with the name of the set to be modified. -type: Use this option to specify the type of the set. The following values are supported for use: BS: Backup Selections Set S: Schedule Set BT: Backup Target Options Set AB: Advanced Backup Options Set RS: Restore Selections Set AR: Advanced Restore Options Set -change <change description>: Changes to be made to the set are specified using this option. More than one change option may be specified if required. The <change description> variable is formatted as follows, for each desired change to a set: <item>[:<field>][:<old value>]=<new value> The <item> variable refers to the name of the item in the set to be modified. The following values can be used as an <item> variable:
Important: Some examples of the use of the -change switch in use for a selection set
are described in the sections, Example - Modifying a Backup Selection Set on page 61 and Example - Modifying a Restore Selection Set on page 61. Tree: Used to change items in the selection tree (Backup Selection Sets and Restore Selection Sets only). Following are the values that can be input as the <field> variable, when Tree is set as the <item>. path: When input as the <field> variable, the <old value> variable symbolizes the full path to the target data items in the existing selection set (i.e. input the path that is to be changed). Input a new value for the
59
<new value> variable that will serve as the new path to target data for this selection set. Alternatively, the <old value> can contain the name of the Client or plugin, and the <new value> can be the new Client or plugin.
Important: If no <new value> variable is established, anything that is currently selected/ omitted in the path named as the <old value> will be considered de-selected by NetVault when this command is executed to modify the Set.
rename: This switch allows you to add a new rename/relocation command to a restore selection set or modify an existing one. The <old value> variable refers to the full path to the desired item. The <new value> variable refers to the new name or the new path for the selected item. Adding a New Rename/Relocation Command to an Existing Restore Selection Set - Input the desired rename/relocation targets information as the <old value> variable and input the desired new rename/relocation information as the <new value> variable. Modifying an Existing Rename/Relocation Command in an Existing Restore Selection Set - Input the Exact rename/ relocation command syntax originally created as the <old value> variable, and input the new rename/relocation syntax as the <new value> variable.
Important: For complete details on the proper syntax used for the Rename command,
please see the description of this switch offered on page 50. info: Modifies the plugin information object attached to a node in the selection tree. The value input as the <old value> variable should be the full path (from the plugin root node) to the required item. The value input as the <new value> variable should be the new values for the plugin information object, separated by colons (:). If any field is to remain unchanged, no value should be given (i.e., use a double colon in its place ::). <Node Name> or <ID>: This refers to the name of the root node marked for inclusion in the restore/backup job as revealed by NetVault. This may either be the node name as recognized by the CLI, or a numeric ID assigned to the node by NetVault. Both of these values are revealed beneath the [Tree Nodes] heading in the nvsetmodify.cfg configuration file (please see the section, The nvsetmodify.cfg File of Chapter 1 on page 13 for information on accessing and viewing this file). Input the value (i.e., node name or ID)
60
Chapter 2 NetVault:Backup CLI Commands that applies to the existing node in place of the <old value> variable; and input the new value for the new root node as the <new value> variable to modify the set.
Important:
1. The actual node name should be input as the <old value> variable when the selection tree for the target Client contains multiple nodes of the given type (i.e., rather than the ID value). 2. If no <new value> variable is established, anything that is currently selected/omitted in the <Node Name> or <ID> named as the <old value> will be considered de-selected by NetVault when this command is executed to modify the Set. Options: This switch is used to add/modify Restore Options (if any are available for use with the target APM/Plugin). The Tag ID of the window item to be set is required. This can either be the restore option name as recognized by the CLI, or a numeric value assigned to the option by NetVault. Both of these values are revealed beneath the [Plugin Options] heading in the nvsetmodify.cfg configuration file (please see the section, The nvsetmodify.cfg File of Chapter 1 on page 13 for information on accessing and viewing this file). Input either of these values in place of the <field> variable, and input a boolean argument for the <Value> variable to enable/ disable the option (i.e., True to enable, and False to disable).
Important:
1. This switch must be followed by a colon (:) and no spaces before the Tag ID (e.g., Options:<Tag ID>=True/False). 2. For backup jobs, any required Backup Options must be specified/modified when the job is created (i.e., Backup Options can not be modified in a Set using nvsetmodify command). This can be accomplished through the use of the -backupoptions switch available for use with the nvjobcreate command when creating a new backup job (see the description of this switch on page 40); or through the use of the -change:options switch available for use with the nvjobmodify command, for existing backup jobs (see the description of this switch on page 46). Target: Used to change items in the target tree (Restore Selection Sets only). The <field> variable is used to specify the type to be changed. The only permitted value is a valid NetVault Client name. The <new value> specifies the new target Client. -parameters: This switch redirects nvsetmodify to read options and their arguments from the given parameter file. -assign: The character used for assignment may be changed using this option. It must be used if values contain the default assignment character (i.e., the equal sing -- =).
NetVault: Backup Command Line Interface Users Gude -delimit: The character used as a delimiter may be changed using this option. It must be used if values contain the default delimiter : -version: This switch gives the build date of the NetVault distribution.
61
Important: If performing this type of modification to a Backup Selection Set, the new target Client must have a the same root node in its file system as the original target Client. For example, if the Backup Selection Set was originally created to target the volume /usr/var/ docs as its root node, the new target Client must also contain this same node, otherwise the backup would fail. Example - Modifying a Restore Selection Set
A Restore Selection Set entitled, RestoreSet1 was created for a Windowsbased Client to restore several directories, including the contents of the directory C:\mail, to target system WinClient1. The following syntax would be used to restore the backup to a different Client entitled, WinClient2. In addition, a switch is included telling NetVault to overwrite newer files, and perform the restore to a different directory (i.e., to the directory C:\MyMail instead of C:\mail on the new Client). Lastly, the leading character in the change description for the data relocation is the @ character. This is done so that the : character may be used in the relocation path information. nvsetmodify -setname BackSet2 -type RS -change target:client:WinClient1=WinClient2 -change options:nvfs_opt_overnew=true -change @tree@path@c:\mail=c:\MyMail
62
2.0.4.n
nvjobstart
Use this command to run a saved job using the proper Job ID.
Syntax nvjobstart [-servername <server name>] -jobid <job id> [-wait] [-version]
-servername: The NetVault Server that is to administer the job. If the job is to be administered by a remote NetVault Server, this switch must be used to name that specific Server. If the local instance of the NetVault Server is to be used to administer the job, this switch can be left out of the syntax. -jobid: The Job ID of the job to be run. -wait: This switch can be added to tell NetVault to wait until this task has completed before moving forward. -version: This switch gives the build date of the NetVault distribution.
2.0.4.o
nvtrigger
Use this command in order to trigger a NetVault job that has already been predefined in the NetVault GUI and saved as a triggered job (via the Triggered option of the Schedule tab -- for complete details on this option, please see NetVault: Backup - Administrators Guide).
Important: This command is not located in the ...\netvault\util directory, and can be
found in the following directory: ...\netvault\bin
Syntax nvtrigger [-servername <server name>] -trigger <trigger name> [-wait]
-servername: The name of the NetVault Server that will administer the job. If the job is to be administered by a remote NetVault Server, this switch must be used to name that specific Server. If the local instance of the NetVault Server is to be used to administer the job, this switch can be left out of the syntax. -trigger: The name of the trigger to be used.
63
-wait: Used to set an interval of time (in milliseconds) that NetVault will wait before actually launching the named trigger (e.g., the correct syntax used would be: nvtrigger -servername <server name> -trigger <triggername> -wait <time in milliseconds> <triggername>).
Important: The nvtrigger command will return a numerical value after its associated job has completed/ended. This number indicates the status of the job performed. The return values and the corresponding job status are listed below:
0: Backup Completed 1: Backup Failed 2: Backup Completed with Warnings 3: Backup Aborted
2.0.5
2.0.5.a
nvlogdump
Use this command to dump NetVault log entries that were taken between a specified period of time to a text file for external viewing.
Syntax nvlogdump [-jobid <job id number>] [-filename <filename>] [-text] [-starttime <YYYYMMDDHHMMSS>] [-endtime <YYYYMMDDHHMMSS>]
-jobid: NetVault assigns a Job ID to each job run. This number can be input to have only logs recorded that apply to that specific job, dumped to a file. -filename: The name that will be assigned to the completed text file. -text: Variable set to have a text file created. -starttime: The time that is to serve as a starting point for the dump file. -endtime: The time that is to serve as a stopping point for the dump file.
64
Important:
1. At least the jobid variable or a combination of the starttime/endtime variables must be set to properly use this command. However, a combination of the jobid and starttime/endtime variables can be set to achieve the desired log dump (e.g., a specific jobid can be set and a starttime/endtime set so that only logs belonging to the jobid that occurred within the set date range will be dumped to file). 2. When inputting a value for either the starttime or endtime variables, the number of characters input for each time unit must be correct: YYYY - Four digits for the year. MM - Two digits for the month (preface single digit months with a zero - 02). DD - Two digits for the date (preface single digit dates with a zero - 09). HH - Two digits for the hour of the day. (Works on a 24 hour time clock. Therefore a value of 08 represents 8:00 AM.) MM - Two digits for the minute (preface single digit minute values with a zero - 05). SS - Two digits for the second (preface single digit second values with a zero -02).
2.0.5.b
nvlogpurge
Use this script to purge all NetVault log entries from the NetVault Database up to a specified point in time.
Syntax nvlogpurge -purgetime <YYYYMMDDHHMMSS>
-purgetime: The specific point in time that is to serve as a stopping point for the purge. When inputting a value for the purgetime variable, the number of characters input for each time unit must be correct: YYYY - Four digits for the year. MM - Two digits for the month (preface single digit months with a zero 02). DD - Two digits for the date (preface single digit dates with a zero - 09). HH - Two digits for the hour of the day. (Works on a 24 hour time clock. Therefore a value of 08 represents 8:00 AM.)
65
MM - Two digits for the minute (preface single digit minute values with a zero - 05). SS - Two digits for the second (preface single digit second values with a zero -02).
2.0.5.c
nvreadlog
NetVault log information can be reviewed through the use of this command.
Syntax nvreadlog [-h] [-b <days>] [-d <delimiter string>] [-o <messages>]
-h: Adding this tag will exit after outputting historic logs.
Important: Since this command incorporates a -h switch, the full command -help must
be input to view additional help for this command from a terminal session prompt (e.g., nvreadlog -help). -b: This tag followed by a number value determines the number of days prior, from which a dump is to begin. -d: Adding this tag accompanied by specific character(s) alerts the interface on how to separate displayed data (e.g., -d followed by < > (two spaces) would separate each displayed item of data with two spaces). -o: Including this switch will reveal operator messages only, where the <messages> variable requires that you input the desired type of message (e.g., -o <failed> would display only operator messages that included the word failed). Multiple items can be included for this variable, separated by a comma.
66
2.0.6
2.0.6.a
bonedate
Use this command to obtain the BakBone time and date in use on the current machine. This value will be obtained from whichever machine is currently configured as the BakBone Time Server (for details on BakBone Time and its setting, please see the NetVault: Backup - Configurator Guide).
2.0.6.b
getmachineid
Use this command to obtain the machine identification number for the current machine (i.e., as used in obtaining license keys).
2.0.6.c 2.0.6.d
nvlicenseinfo
Use this command to obtain license information for the NetVault Server.
nvlicenseinstall
Use this command to install license for the NetVault software or the APMs/Plugins using the key file (i.e., the.npk file containing the key) or the license string.
Important: This command is not located in the ...\netvault\util directory, and can be
found in the following directory: ...\netvault\bin
Syntax nvlicenseinstall <keyfile> | <license string>
2.0.6.e
nvpassword
Use this command to change the NetVault password for the machine on which this command is run. There are no switches to be used with this command. Type the new NetVault password along with the command (after a space) to change it.
Important: This command is not located in the ...\netvault\util directory, and can be
found in the following directory: ...\netvault\bin
67
2.0.6.f
nvpluginaccess
This script is used to enable CLI backups and the generation of CLI-based reports for APMs that require the use of database-related utility (e.g., onbar for Informix database users and rman for Oracle). The use of this CLI script is tied to specific APMs and its proper use is completely covered in the relevant APMs Users Guide.
.
Syntax nvpluginaccess [-remove -client <client names>] | [-client <client name> (-account <account name> -password < account password>)]
-client: NetVault name of the Client. -account: Name of user account to be used with this command. -password: The password associated with the user account.
2.0.6.g
nvreport
This command allows you to utilize NetVault:Backups reporting functionality from the CLI. This tool is considerably powerful and offers a host of switches and different methods of use. For details on the use of this CLI command, please see Appendix A: Running Reports from the CLI on page 71.
2.0.6.h
nvsendmail
Use this script to send an e-mail message.
Syntax nvsendmail [-d <dest_address>] [-r <real_name] [-s <subject>] [-f <message_text>] [-a <attach_file>] [-m] [-n]
-d: The e-mail address of the intended recipient. -r: The actual name of the intended recipient. -s: The subject line of the e-mail.
68
Chapter 2 NetVault:Backup CLI Commands -f: The e-mail message to be sent. -a: If it is necessary to attach a file to the e-mail use this switch accompanied by the exact path and file name of the desired file. -m: This switch forces mime-format. -n: This switch specifies notification mode in which the necessary parameters will be taken from the host environment.
2.0.6.i
nvsendopmsg
Use this command to send an operator message.
Syntax nvsendopmsg [-n] [-test]
-n: Send notification from environment variables. -test: Send test operator message.
S E C T I O N
Appendix
2 :
Appendix A:
72
73
A.0.0
A.0.1
A.1.0
-server: The name of the NetVault:Backup Server that will administer the report job. With a remote instance of a Server named, that Servers NetVault Database will be analyzed for the desired report information (e.g., if a report was run regarding media usage, resulting data pertaining to media in use by that NetVault:Backup Server would be revealed in the resulting report). If the job is to be administered by a remote NetVault Server, this switch must be used to name that specific Server. If the local instance of the NetVault Server is to be used, this switch can be left out of the syntax. -class [class name] - This applies to the specific Class of NetVault functionality for which the report will gather information. Pre-created, or Canned Reports are run using this switch. A detailed explanation on this switch and its proper usage is outlined in the section, Classes (The -class Switch) on page 74.
74
Appendix A Running Reports from the CLI -templatename [template nice name]/-templatefile [complete path to template file] - This switch allows you to call out specific files that has been created to determine the content, layout and format of the report. The -templatename switch is used to call out a template file based on its nice name value as revealed in the NetVault GUI; while the -templatefile switch is used to input the exact path to, and specific file name for a template file that is to be used. A detailed explanation on these switches and their proper usage is outlined in the section, Template Files (The -templatename/ -templatefile Switches) on page 83.
A.1.1
A.1.1.a
Figure A-1: An example of the output returned for the Canned Report associated with the Clients Class
C:\Program Files\NetVault\util>nvreport -class Clients Component Clients at 11:06:53, 09 Dec 2005 Client Name NVSERVER Client1 Client 2 Type Windows Linux UNIX Status UP UP UP Server Yes No No Access Yes Yes Yes Preferred Address NVSERVER Client1 Client2 Contact Address 10.55.55.2 10.55.55.43 10.55.55.44
A.1.1.b
Canned Reports
As previously noted, each NetVault:Backup report class has a default report job that can be run in association with it. These default reports are referred to as Canned Reports. When a class name is properly called out in conjunction with the -class switch, the default template file that is associated with that class is used to run a report. For example, to run the Client Groups class canned report from the command line, the following syntax would be used: nvreport -class Client Groups
75
Important:
1. The value listed in the Class Name column of the following table is the exact value that should be used as the variable for the -class switch in order to run its associated Canned Report. If a name contains a space in its title, ensure that its full name is enclosed in quotes ( ) when input as the variable. 2. Class Names are not case-sensitive. They can be input using initial capital letters (as revealed in the following table) or all lower-case letters.
Class Name
Advanced Options
Audits
Backup Targets
Client Groups
Clients
76
Drive Events
77
Entry/Exit Ports
Job History
78
Library Drives
Library Slots
License Capabilities
Media
Media Capacities
79
Media Requests
80
NetVault Events
When this class is named in conjunction with the -class switch, information will be displayed, pertaining to the occurrence of various NetVault events. Information includes: Date/Time of Event Event Name Event Class - The class the selected NetVault event belongs to. Description - Brief information describing the event. Event Message - The message issued as a result of this event. When this class is used in conjunction with the -class switch, all log entries currently housed in the NetVault Database will be displayed in the terminal session window. Based on the number of log entries that exist in the NetVault Database, it may take several minutes (or longer) for this command to reveal results (i.e., the greater the number of log entries, the longer it will take to process the information and display the results). When this class is named in conjunction with the -class switch, information is displayed pertaining to how the current Global Notifications profile is set up (i.e., via the Global Notification window in the GUI). Information includes: Notify Class - The class designation of the selected global notification. Notify Event - The NetVault event that must occur in order to trigger the selected global notification method. Account Name - The name of the Access Control account to which this Global Notification profile belongs (if applicable.) Notification Method - The method of notification used for this global notification (e.g., sysop operator message, sysop e-mail, run a job, etc.).
NetVault Logs
Notifications
81
Policies
Policy Clients
Policy Jobs
Privileges
82
Schedule Sets
Segments
83
NetVault Client Name > APM/Plugin Used > Path to Data Items Selected
Selection Tree Follows... (Restore Selection Set) - A path will be revealed to the selected items, broken down as follows:
NetVault Client Name > APM/Plugin Used > Root Node Name (if app.) > Backup Saveset Name and Information > Target Restore Path
Users When this class is named in conjunction with the -class switch, information pertaining to all user accounts set up on the NetVault Server via the Access Control functionality will be revealed, including: Account Name - The name of the user account, as established during creation. Real Name - The real name value assigned to this account during its creation (if appl.). UID - The user identification number automatically assigned to this account by NetVault (values are assigned in increments of one, based on the order the account was created. Values begin at 2, in order to accommodate for the default user accounts, Default = 0 and Administrator = 1). Workstation - The O/S name assigned to the machine the account was created on (if appl.) Logon Date - The last date on which this account accessed NetVault. Logon Time - The last time at which this account accessed NetVault.
A.1.2
84
A.1.2.a
Figure A-2: An example of the output returned when a template file is run using the File Name method and the -templatefile switch
C:\NetVault\util>nvreport -templatefile C:\netvault\reports\templates\clientsclidefault Component Clients at 11:06:53, 09 Dec 2005 Client Name NVSERVER Client1 Client 2 Type Windows Linux UNIX Status UP UP UP Server Yes No No Access Yes Yes Yes Preferred Address NVSERVER Client1 Client2 Contact Address 10.55.55.2 10.55.55.43 10.55.55.44
Important:
1. The files pertaining to all report templates can be found in the following directory (i.e., where ... refers to the complete path to the installation of NetVault): ...\NetVault\reports\templates 2. If the value input for the file path contains any spaces, the entire variable must be enclosed in quotes (e.g., -templatefile C:\program files\netvault\reports\templates\clientsclidefault) Method 2: By Using the Template Files Nice Name Value (Using the -templatename Switch) - Each template file has been created with an alternate name value known as its Nice Name. This value is how the template file is revealed in the windows of the NetVault GUI (e.g., in the Reporting Job Editor window). Include this Nice Name value along with the -templatename switch in the syntax of the nvreport command: nvreport -templatename Client Machines - cli default template
Figure A-3: An example of the output returned when a template file is run using the Nice Name method and the templatename switch
C:\NetVault\util>nvreport -templatename Client Machines - cli default template Component Clients at 11:06:53, 09 Dec 2005 Client Name NVSERVER Client1 Client 2 Type Windows Linux UNIX Status UP UP UP Server Yes No No Access Yes Yes Yes Preferred Address NVSERVER Client1 Client2 Contact Address 10.55.55.2 10.55.55.43 10.55.55.44
85
Important:
1. If any spaces exist in the Nice Name value for a template, the entire value must be enclosed in quotes ( ). 2. It is also possible to locate the Nice Name value for a template file by opening the template file in a text editing software and noting what accompanies the %NICENAME line of the file.
86
Media Capacities - cli default template mediacapacitiesclidefault Media Contents Query - Textual Media Requests - cli default template mediajobcontentsclidefault mediarequestsclidefault
Media Segment Contents Query - Tex- mediasegmentcontentsclidefault tual Media Transfer Requests - cli default template mediatransfersclidefault
NetVault Event Types - cli default tem- eventtypesclidefault plate NetVault Events - cli default template NetVault Logs - cli default template User's Selected Notifications - cli default template eventsclidefault logsclidefault notificationsclidefault operatormessagesclidefault policiesclidefault policyclientsclidefault policyjobsclidefault privilegesclidefault reporttemplatesclidefault schedulesclidefault segmentsclidefault
Operator Messages Operator Messages - cli default template Policies Policy Clients Policy Jobs Privileges Report Templates Schedule Sets Segments Selection Option Sets Selection Sets Users Policies - cli default template Policy Clients - cli default template Policy Jobs - cli default template Granted Privileges - cli default template Report Templates Installed on System Schedule Sets - cli default template Segments - cli default template
Selection Option Sets - cli default tem- seloptionsclidefault plate Selection Sets - cli default template Users - cli default template selectionsclidefault usersclidefault
87
b. This variable is used in conjunction with the -templatename switch c. This variable is used in conjunction with the -templatefile switch, and it must also be accompanied by the complete path to the template file
Important:
1. For a detailed description on the data revealed for each of the above canned reports, please review the table in the section, Canned Report Descriptions on page 75. 2. NetVault offers many additional template files that are not covered in this table (i.e., there are additional template files that are not used in generating a canned report, but can be accessed for use). The sections that follow discuss the use of these templates.
A.1.3
Important: Unless otherwise noted, the descriptions of the switches offered in this section
assume that they are being used in conjunction with report templates that use a Plain Text output type (i.e., those with clidefault/- cli default template in their file name that are designed to be viewed from a terminal session window).
A.1.3.a
88
Figure A-4: Referred to as JOBID and TRANSITION in the template file, these fields output as Job Id and Status in the resulting report in the terminal window
The Real Name values JOBID and TRANSITION must be input when used with a switch
How Real Name Values are Found These values can be found for a field in one of two ways: From the Terminal Session Prompt - To obtain a list of valid field names for a class canned report, the following command can be used: nvreport -help fields [class name] This will list all of the fields available for output with the selected class canned report. The resulting output will show four columns of information. The first is comprised of a fields real name values (i.e., how it is labeled in the template file). The second contains the field name for the column (i.e., how the same field is actually revealed when the report is run). The third names the type of data that the column will contain, and the last column gives a basic description of the data that is output.
Figure A-5: Using the help fields command to reveal both the Real Name and Field Name for a canned report
C:\NetVault\util>nvreport -help fields media requests nvreport - Copyright (c) BakBone Software Inc. 2001 There are 8 fields... Real Name Date Instance JobId RequestId Transition SessionId SysTime Time Field Name Date Instance Job Id Request Id State Session Id SysTime Time Data Type Date Integer Integer Integer String Unique System time Time Description Date of event Job instance generating event Job generating event Unique identifier of media request State of the request: Received Comp... Session generating event System internal time of event Time of Event
89
Important: This command will display all fields available for use with the selected class
canned report, even those that are not revealed when the report is run (e.g., when the media requests canned report is run, only the Date, Time, Job ID, and State field names are revealed, but additional fields are revealed when the -help fields command is used. These fields can be applied to the report, if desired -- please see the section, The -format Switch on page 89 for details on adding more fields to a canned report). To determine the fields used by default for a selected template file, perform the following steps: 1. Run the report and note each columns default Field Name. 2. Run the nvreport -help fields [Class Name] command. 3. Locate the appropriate Field Name in the list and cross-reference its Real Name value.
Figure A-6: With a template file open for viewing, Real Name values for a field can be found in the %Format line, each prefaced with a %
View the Template File in a Text Editing Software - Once opened, the values in the %FORMAT line will reveal the Real Name value for each of the fields displayed when the template is used. These template files can be found in the following directory (i.e., where ... refers to the path to the installation of NetVault:Backup): ...\NetVault\reports\templates
Important: Only the Real Name values that apply to the fields revealed when a report is
run are shown in the %FORMAT line of a template file.
A.1.3.b
Important: If a percentage symbol exists in a fields real name for a selected template, use
the escape sequence %% when inputting the name.
90
Appendix A Running Reports from the CLI When Using the -format Switch, ALL Columns Desired for Display Must be Called Out - Using the same example as a previous point, the Media Requests - cli default template template file will reveal four columns of information, Date, Time, Job Id and State. If the -format switch is used in any way, all fields desired for display in the report must be named in the switch syntax using their real name value. If any of the fields are left out, they will not be displayed in the report. This methodology can also be used if you wish to omit a column from the report, or if you wish to add additional columns of information to the report output.
Important: When naming multiple fields using the -format switch, all must be separated
by a single space and the entire set must be enclosed in quotes. For example: -format %Date %Time %JOBID %TRANSITION
Figure A-7: In this example, the -format switch was used and only three of the available four fields were named, therefore only three are revealed
C:\NetVault\util>nvreport -class media Requests -format %Date %JOBID %TRANSITION Component media requests - cli default template at 11:06:53, 09 Dec 2005 Date 29 Nov 2005 29 Nov 2005 29 Nov 2005 30 Nov 2005 30 Nov 2005 30 Nov 2005 Job Id 31 31 31 31 31 31 Status Received Started Completed Received Started Completed
Limiting the Number of Characters Displayed in a Column - The maximum number of characters to be displayed for a column can be set by appending two colons and a number value to the field name (e.g., %TRANSITION::3 will limit the display in the Status column to only the first three characters).
Figure A-8: In this example, ::3 was appended to the %TRANSITION variable in order to limit the character width in the Status column to three characters
C:\NetVault\util>nvreport -class media requests -format %Date %JOBID %TRANSITION::3 Component media requests - cli default template at 11:06:53, 09 Dec 2005 Date 29 Nov 2005 29 Nov 2005 29 Nov 2005 30 Nov 2005 30 Nov 2005 Job Id 31 31 31 31 31 Status Rec Sta Com Rec Sta
91
Inserting a Line Break - Various reports can issue a large amount of information, that may run together and be difficult to visually separate. To include a line break between each entry in an output report, append %\n to the end of the list of field names named with the -format switch.
Figure A-9: In this example, %/n was appended to the end of the string of variables in order to insert a line break between each report entry
C:\NetVault\util>nvreport -class media Requests -format %Date %Time %JOBID %TRANSITION %\n Component media requests - cli default template at 11:06:53, 09 Dec 2005 Date Time 29 Nov 2005 23:00:01 29 Nov 2005 23:00:01 29 Nov 2005 23:05:31 Job Id 31 31 31 Status Received Started Completed
Adding Additional Information Columns (i.e., Fields) - Some template files offer several additional Field Names that can be added to a reports output, in order to include additional data. This is accomplished by using the -format switch and calling out all of the desired Field Names to be used. The example below uses the drives class canned report -- all of the default Fields offered for this report are to be used, but it is also necessary to identify the number of Write Errors that may have occurred using this drive. 1. The canned report was run to identify all existing Fields. From a terminal session prompt, the following command was issued: nvreport -class drives 2. As a result, the following Fields were revealed in the finished report, and these names were all noted: Drive Name Product Vendor Status DriveMachine Drive Data Written Drive Data Read 3. At the terminal session prompt, the following command was issued: nvreport -help fields drives 4. All of the Fields available for use with the drives class template file were revealed. At this stage two tasks were performed:
92
Appendix A Running Reports from the CLI Cross Reference Field Names with Their Real Name Values - The Field Names noted in Step 2, are located in the Field Name column (the second column), and their associated Real Name values were noted (from the first column):
Field Name
Drive Name Product Vendor Status DriveMachine Drive Data Written Drive Data Read
Real Name
DriveName Product Vendor Status: DriveMachine DriveDataWritten DriveDataRead
The Real Name Value for the Additional Column is Noted - As discussed in the introduction, we would like to add a column of information to the output that notes the quantity of write errors that may have occurred with any of the drive(s) in use by the NetVault Server. In scanning the list of available fields, Drive Write Errors is located in the Field Names column, so is associated Real Name value of DriveWriteErrors is noted. 5. At the terminal prompt, the -format switch is used in conjunction with the nvreport command, in the following format, in order to achieve the desired result: nvreport -class drives -format %DriveName %Product %Vendor %Status %DriveMachine %DriveDataWritten %DriveDataRead %DriveWriteErrors
Figure A-10: With the command properly input, an additional column of information is added to the report
C:\NetVault\util>nvreport -class drives -format %DriveName %Product %Vendor %Status %DriveMachine %DriveDataWritten %DriveDataRead %DriveWriteErrors NetVault 7.4 Server NVSERVER - Report CLI Report Component drives at 11:08:23, 09 Dec 2005 Drive Name DRIVE 1 DRIVE 2 DRIVE 3 Product EXB-480 EXB-480 EXB-480 Vendor Exabyte Exabyte Exabyte Status Online Online Offline DriveMachine NVSERVER NVSERVER NVSERVER Drive Data Written 12.4GB 9.5GB 4.4GB Drive Data Read 0B 81.9MB 103.6MB Drive Write Errors 0 0 2
Important:
1. Before choosing an additional Field to be used in a reports output, please review the full list of those available for a template file (i.e., via the nvreport -help field <class name> command, review the information offered in the Description column for each Field Name/ Real Name). Ensure that the Field you include will include the desired data output.
93
2. All of the same rules called out in the previous points in this section that describe the use of the -format switch also apply to its use when adding Fields to a reports output. 3. In instances when the drives or media classes default template files are used to add additional colums of data in this manner, it is important to note that the following apply to the use their available Real Names in the command: Reporting Read/Write Errors - As briefly pointed out in the example above, it is possible to obtain a quantity of read/write errors that have occurred in conjunction with the specific drives available to the NetVault Server. In addition, it is also possible to list the frequency of these errors in based ontheir occurrence with actual media in a library. Both of these mthods require the use of the proper class default template file, and the specific fields Real Name must be included in the syntax through the use of the -format switch: Errors Associated with Media - These errors require the use of the media class and the -format switch must contain the Real Name values, ReadErrors (Field Name = Read Errors), and/or WriteErrors (Field Name = Write Errors). Example: nvreport -class media -format <other column info> %WriteErrors Errors Associated with Drives - These errors require the use of the drives class and the format switch must contain the Real Name values, DriveReadErrors (Field Name = Drive Read Errors), and/or DriveWriteErrors (Field Name = Drive Write Errors). Example: nvreport -class drives -format %<other columns> %DriveReadErrors If the ReadErrors/WriteErrors Real Name values are used in conjunction with the drives class (i.e., instead of the intended DriveReadErrors/ DriveWriteErrors values), the report will generate read/write error information, but this information is specific to any media that currently exists in a drive -- not the entire range of drives in that device. If no media exists in the drive however, a result of UNKNOWN will be returned. 4. For ease of use, it is recommended that custom commands such as this be written to a text file and saved, or included in a script. This will eliminate the need to manually type out the command each time the report is required.
94
A.1.3.c
Important: A report can be sorted on any field a class offers. Even a Real name Field
Name that is not revealed in an output report can be used for ordering the output (i.e., the additional Real Names/Field Names revealed when the nvreport -help fields [class name] command is used to determine the fields that comprise a template -- as explained on page 88).
Figure A-11: In this example, the report was set up to sort based on the title of jobs, in ascending order
C:\NetVault\util>nvreport -class Job History -sort %TITLE+ Component Executed Job History - cli default template at 11:06:53, 09 Dec 2005 Start Date 29 Nov 2005 30 Nov 2005 01 Dec 2005 05 Dec 2005 28 Oct 2005 11 Nov 2005 Start 23:00:01 23:00:01 23:05:31 11:45:01 01:00:01 16:15:01 Job Id 31 31 31 33 33 32 Instance 1 2 3 1 1 1 Job Title All Full All Full All Full Inc_1 Master_D No_DB Exit Status Completed Aborted Completed Completed Aborted Complete Run Length 00:05:32 00:02:11 00:07:42 00:10:56 00:22:23 02:01:19
Important: If a percentage symbol exists in a field title for a selected template, use the
escape sequence %% when inputting the field title.
95
Sort Expressions can be Joined - Multiple fields can be named along with the -sort switch. The resulting report will prioritize the sort based on the order of the field names in the syntax (i.e., the first value will determine the first search priority, the second one will determine the second, etc.). When using multiple entries in this fashion, all must be enclosed in quotes ( ).
Figure A-12: In this example, the report was set up to sort based on the title of jobs, and then based on each jobs exit status, both in ascending order
C:\NetVault\util>nvreport -class Job History -sort %TITLE+ %EXITSTATUS+ Component Executed Job History - cli default template at 11:06:53, 09 Dec 2005 Start Date Start Job Id 30 Nov 2005 23:00:01 31 29 Nov 2005 23:00:01 31 01 Dec 2005 23:05:31 31 05 Dec 2005 11:45:01 33 28 Oct 2005 01:00:01 33 11 Nov 2005 16:15:01 32 Instance 2 1 3 1 1 1 Job Title All Full All Full All Full Inc_1 Master_D No_DB Type Backup Backup Backup Backup Backup Restore Exit Status Aborted Completed Completed Completed Aborted Complete Run Length 00:02:11 00:05:32 00:07:42 00:10:56 00:22:23 02:01:19
The primary sort variable - all jobs are sorted alphabetically by job title, first.
The secondary sort variable - all jobs with the same title are then sorted alphabetically based on their exit status.
A.1.3.d
96
Figure A-13: In this example, the report was set up to only include entries that correspond to Job ID 33
The Job ID field has a Real Name value of JOBDEFINITIONID, in the template file, so this value is used as the [field name], followed by = as the [operator] and the desired Job ID value, 33 as the [constant]
Description
For fields that gather data based on a time interval that has elapsed (e.g., the amount of time it took to run a backup job). Can be input in either of the following formats: HH:MM:SS (22:10:11) - Based on a 24-hour clock HHMMSS (221011) - Based on a 24-hour clock For fields that present a final form of answer, based on the resulting data (e.g., does the named client have the Server version of NetVault installed = Yes/No; <option X> is enabled for this job = True). Examples of boolean arguments: Yes No True False This applies to a specific date a NetVault event occurred (e.g., nvreport -class job history %STARTDATE >= [Date]). This can be input in two ways: Specific Date: Input in the following formats:
Date
97
Description
For fields that return a result of a day of the week. Input in the following format: [NN] - A two letter indication for each day of the week:
98
Description
Specific time applying to a NetVault event that occurred in relation to the system time on the NetVault Server. This can be input in two ways: Specific Time: The number of seconds that have passed since midnight, on January 1st 1970: (e.g., a value of 1104537600 seconds would be midnight on January 1st, 2005, taking all leap years into account since 1970) Past Time: now-[number value][time value] (YE = Year, MO = Month, WE = Week, DA = Date, HO = Hour, MI = Minute, SE = Second -- e.g., now-30mi would be 30 hours ago) This applies to a specific time a NetVault event occurred (e.g., nvreport -class job history %STARTTIME >= [Time]). This can be input in two ways: Specific Time: Input in the following formats:
Time
HH:MM:SS (22:10:11) - Based on a 24-hour clock HHMMSS (221011) - Based on a 24-hour clock
Past Time: now-[number value][time variable (YE = Year, MO = Month, WE = Week, DA = Date, HO = Hour, MI = Minute, SE = Second)]. For example, now-12ho would be 12 hours ago. Unique Weeks of the Month (weeksinmonth) N/A For fields that return a result of a specific week in the month. Input in the following format: [Week Number] - Desired week number(s). L refers to the last week in the month (e.g., 134L would include the first, third, fourth, and last week in the month)
Important: If a percentage symbol exists in a field title for a selected template, use the
escape sequence %% when inputting the field title. Multiple Include/Exclude Arguments Can Be Linked - Through the use of boolean arguments, multiple include/exclude arguments can be applied (e.g., Boolean arguments consist of AND and OR). In addition, parenthesis can be applied to determine the priority of the boolean arguments. When using multiple entries in this fashion, all must be enclosed in quotes ( ).
99
C:\NetVault\util>nvreport -class Job History (%JOBDEFINITIONID > 10 AND %INSTANCEID < 5) OR %TYPE = restore Component Executed Job History - cli default template at 11:06:53, 09 Dec 2005 Start Date 28-Oct-05 11-Nov-05 12-Nov-05 29-Nov-05 30-Nov-05 03-Dec-05 04-Dec-05 05-Dec-05 07-Jan-06 Start 1:00:01 16:15:01 11:04:43 23:00:01 23:00:01 23:05:31 11:45:01 11:45:01 18:32:09 Job Id 31 15 14 32 32 33 35 35 35 Instance 3 1 1 1 1 2 13 13 14 Job Title Master_D Report1 Report2 All Full All Full All Full Inc_1 Inc_1 Inc_1 Type Backup Report Report Backup Backup Restore Backup Restore Restore Exit Status Aborted Completed Completed Completed Aborted Completed Completed Completed Completed Run Length 0:22:23 0:00:03 0:00:02 0:05:32 0:02:11 0:07:42 0:09:26 0:10:56 0:14:13
The include/exclude argument given, (%JOBDEFINITIONID > 10 AND %INSTANCEID < 5) OR %TYPE = restore states that only those jobs whose Job ID is greater than 10 AND whose Instance value is less than five should be revealed in this report. In addition, all restore jobs will be displayed, regardless of their Job ID and Instance values.
A.1.3.e
Figure A-15: A comparison of the Media Requests canned report run with and without a title using the -title switch
The default Title for a report With the -title switch used, the output report is named accordingly
Important:
1. If a desired title is to contain any spaces, the entire value must be enclosed in quotes (as demonstrated in the example image, above).
100
2. While the -title switch can be used to label a CLI-output report, it is better suited to label a report that is output to file, and viewed outside of the CLI. For example, the -outputdir command explained on page X-REF, allows you to output a report for viewing outside of the CLI. In this case, when the -title switch is used, the desired name will appear in the saved report file.
A.2.0
A.2.1
101
A.2.1.a
Important: While it is possible, it is recommended that you avoid using the -class switch to generate a report file for viewing outside of the terminal session window. The -class switch is designed to call out a default template file and create a report for viewing in the terminal session window (i.e., the report created has a default output type of Plain Text and is specifically designed for viewing from the terminal session window). You may not obtain the desired end result in an external report when the -class switch is used. Which Type of Template File Should be Used?
As discussed in previous sections of this guide, there are basically two types of report template files, based on their output format -- HTML-based template files and Plain Text-based template files. The sub-sections that follow offer a description of these two template file types and offer details on their effectiveness when used to generate an external report file. HTML-based Template Files Up until now, most sections of this guide covered the use of the 36 canned templates that have been specifically designed for output and viewing from the command line. You may have noticed that NetVault also offers 50 additional template files for use -- these additional files are used to generate HTML-based reports for viewing from the NetVault:Backup GUI. However, when used in conjunction with the -outputdir switch, you can generate an HTML-based file for the report, that can be viewed externally.
102
Appendix A Running Reports from the CLI Can They Be Used To Generate an External Report File? YES Is This Recommended? YES - This process is designed to accommodate the HTML-based template files. Files of This Type Available for Use - The table that follows offers the actual file name for each HTML-based template file, as well as its Nice Name value, and a brief description of the report that will be created when it is named in the syntax.
Template File Namea
activejobs
alldrives
All Drives
103
clientgroups
Client Groups
clientstatuses
Client Statuses When a report utilizing this component is run, the status of all Clients currently added to the NetVault Server will be displayed. Information provided includes: Added Client Name Version of NetVault Installed Access - Whether or not access is currently available (yes/no). Status - Current Status of the Client (up/down). Recent Error Logs When a report utilizing this component is run, it is prefaced by a filter dialog box requesting a date range. Once properly given, information will be displayed, pertaining to NetVault error log entries that have occurred in the date range specified. Information includes: Date/Time of Error Log Entry Client - The name of the NetVault Client that the action that generated the error log entry was running on.
errorlogs
104
events
NetVault Events
expiredofflinemedia Expired Offline When a report utilizing this component is run, inforMedia mation will be displayed pertaining to any expired offline media. Information displayed includes: Media Label - The label given to the piece of media that is currently offline/expired. Media Group - The name of the media group that the target piece of media belongs to (if applicable). Barcode - The barcode assigned to the target piece of media. Date Written/Read - The last date the target media was written to/read from. Offsite Location - The specified offsite location for the target media (if applicable). failedrequests Failed ULA Requests When a report utilizing this component is run, all attempted operations in NetVault that resulted in failure as a result of their access level will be revealed with their end result (Yes = granted/No = denied), sorted by the various user accounts. When this component is run, information will be displayed pertaining to any online media that is currently full. Information displayed includes: Media Label - The label given to the piece of media that is currently online and full.
fullonlinemedia
105
globalnotifications
Global Notifications
historicjobs
106
jobdefinitions
Defined Jobs
107
libraryblankcounts
librarycontents
108
mediacontentsquery
109
mediasegmentcontentsquery
110
notifications
offlinedevices
Offline Devices When a report utilizing this component is run, information pertaining to any currently offline drives will be displayed. When a report utilizing this component is run, information pertaining to all outstanding operator messages (as revealed in the Operator frame of the Status window) will be displayed. If no operator messages appear in this frame (i.e., they have all been acknowledged and/or deleted) this report will return no information. Date/Time - The date and time the operator message was issued. Text - The operator message text. When a report utilizing this component is run, it is prefaced by a filter dialog box requesting a date range. Once properly given, information pertaining to any overnight backup jobs that failed within that date range will be displayed. Information given includes: Job Identification Number Job Title Client Name - The name of the machine that the failed job ran on. Policy Name - The name of the Policy that the failed job belongs to (if applicable). Exit Status - The status of the job once NetVault completed it
overnight_jobs_ failed
111
overnight_jobs_ successful_count
overnight_jobs_ total_data_stored
overnight_jobs_ warnings_count
policiessummary
restoresummary
Restore Summary
112
serverlicenseflags
single_job_drives_ events
single_job_logs
single_job_media
113
Media Type - Designated type of target media (tape, disk file, etc.). Offsite Location - The specified offsite location for the target media (if applicable). single_job_media_ transfers Single Job's Media Transfers When this component is run, it is prefaced by a filter dialog box requesting specific Job ID and Instance numbers. Once properly given, information pertaining to media transfers by this specific NetVault Job will be displayed. Information includes: Received Date/Time - The date and time the media transfer request was received. Started Date/Time - The date and time the requested media transfer began. Done Date/Time - The date and time the requested media transfer completed. Type - The type of media transfer (e.g., write). Transferred - The amount of data transferred.
single_job_ summary
Single Job When a report utilizing this component is run, it is Main Summary prefaced by a filter dialog box requesting specific Job ID and Instance numbers. Once properly given, detailed information pertaining to this specific NetVault Job will be displayed. This component can be used for any NetVault job. The following information is included: Job Identification Number Job Title Type - Job type (Backup/Restore/Report) Plugin - The plugin (or APM) used for the job (if applicable). Instance Number Start Date/Time End Date/Time Exit Status - The status of the job once NetVault completed it. Transfer Size - The size of data transferred. Transfer Rate - The average amount of data transferred per second during the job (applies only to backup jobs). Single Job's Data Transfer Rate When a report utilizing this component is run, it is prefaced by a filter dialog box requesting a specific jobs Job Identification and Instance numbers. Once properly given, information pertaining to events associated with the drives used in this specific job will be displayed. The following columns are given: Date/Time of Event Drive Name - Name of the drive in question. Event - Event(s) occurred with the selected drive for the specified job.
single_job_xfer_ rates
114
singlepolicyclients
Policy Clients
singlepolicyfailedjobs
singlepolicyjobs
115
singlepolicystatus
singleusersaudittrail
userdefinedeventtypes
116
userprivileges
User Privileges When a report utilizing this component is run, information is revealed pertaining to each NetVault User Account and its set privileges in NetVault. Information includes: Account Name - The name of the NetVault User Account. Privileges - All privileges currently allowed for the selected User Account. Quotas And Media Usage When this component is run, information is revealed pertaining to each NetVault User Accounts current settings in regards to media quotas and usage. Information includes: Account Name - The name of the NetVault User Account. Media Quota - Level set for media usage for the current user account (e.g., 100 GB, Unlimited, etc.). Media Used - The amount of media currently in use by the selected user account.
usersmediausage
a. This file name is used in conjunction with the -templatefile switch to run a report. When used, the complete path and file name must be included in the syntax. In addition, each file name displayed is to be input as a single word. b. The Nice Name value is used in conjunction with the -templatename switch to run a report. It is also how the template file (i.e., Report Component) is named in the Report Component Editor window of the NetVault:Backup GUI.
NetVault: Backup Command Line Interface Users Gude Plain Text Template Files
117
This applies to the 36 canned template files that were created for viewing in the terminal session window (i.e., all of those templates that contain the text clidefault in their file name, or cli default file/textual in its Nice Name. If a template file of this format type is called out in this syntax, and external file will be created that is comprised of simple plain text. Can They Be Used To Generate an External Report File? YES Is This Template File Type Recommended? NO - The actual formatting set up in this type of template file is specifically designed for viewing its output in a terminal session window. An external file generated using this type of template file will result in a series of plain text characters, and formatting is lost.
Important:
1. For a listing of these template files, please consult the column entitled Template File Used to Generate Canned Report in the table in the section, Best Practice - Using the -Class Switch Instead on page 85. This column will reveal both the actual template file name and its Nice Name value. 2. Plain-text format template files can be incorporated into an external report file when using the -appendoutput switch in order to add their content to an existing HTML-based report. In doing so, the report data will appear in an existing report file, in its intended Plaintext format, beneath existing HTML-data (i.e., the resulting output will maintain its expected formatting and appear in the report file as if it were output for viewing in a terminal session window). For more details on the use of the -appendoutput switch and an example of this output, please see the section, The -appendoutput Switch on page 121.
A.2.1.b
118
Figure A-16: An example of the process used in a Windowsbased environment to generate an external report file for viewing outside of the terminal session window
An HTML-based template file is called out and the -outputdir switch is applied, with client_report set as its variable...
As a result, a new subdirectory entitled, client_report is created in the ...\netvault \reports \output directory... This new subdirectory contains an HTML file that can be opened for viewing the resulting report outside the terminal session window
119
Important: To avoid the loss of an existing report file, perform one of the following:
Create a New Sub-directory - Input a new variable with the -outputdir switch, in order to have NetVault create a new sub-directory to house the report file(s). Append Report Data to the Existing Report File - Through the use of the -appendoutput command, you can name the same sub-directory and have NetVault append new report data to the existing report file (please see the description of this switch in the section, The -appendoutput Switch on page 121). HTML-based Template Files will Automatically Copy All Support Files to the New Sub-directory - NetVaults default HTML-based report templates contain various artwork files in their layout. When an HTMLbased report template is used, these artwork files will be automatically copied to the newly created sub-directory.
Important: Based on the O/S in use, if a space exists anywhere in the characters that make up the path to the desired file, it may be necessary to compensate for it by inputting the proper character string to emulate a space (e.g., ASCII characters).
120
121
A.2.1.c
Additional Notes on Use The points below illustrate issues that should be noted when using the -appendoutput switch: The -appendoutput Switch Must Be Used with the -outputdir Switch - This switch only applies when used in conjunction with the -outputdir switch. In addition, the sub-directory named as the variable with the -outputdir switch must already exist (i.e., a previous report job must have been created using the -outputdir switch).
122
Appendix A Running Reports from the CLI Different Template Files Can be Combined - If desired, a template file that is different from the original can be used and its resulting report data will be appended to the bottom of the original report file.
Figure A-19: Template files with different output formats can be combined into the same report file when using the -appendoutput switch
New report data, generated using a different template along with the -appendoutput switch
Template Output Types can be Combined - Any template file can be named and the -appendoutput switch can be used. For example, even if the original report file utilized an HTML-format of output, a Plain-Text format template can be named in conjunction with the -appendoutput switch. As an end result, report data will be appended to the bottom of the existing report file in the named templates output format.
Figure A-20: Template files with different output formats can be combined into the same report file when using the -appendoutput switch
New report data, generated using a template with a different output type, added as a result of the -appendoutput switch
123
Additional Notes on Use The points below illustrate issues that should be noted when using the -title switch: Usable with Any Format Template File - This switch can be used in conjunction with the -outputdir switch to add a title to any format of template (i.e., HTML or Plain Text-based). Only Applies to New Report Data - When used in conjunction with the -appendoutput switch, the value set as the variable with the -title switch will be used as the title of the report that is appended to the existing output.html file (i.e., the existing report will maintain its existing title).