The nvreport utility provides several options to format the layout and content of a report. The following sections outline the use of these options.
You can use one of the following methods to find the real names:
To obtain a list of valid field names for a canned report class, type the following command:
The output includes four columns: Real name, Field name, Data type, and Description.
This command displays all fields that are available with the specified canned report. It includes even those fields that are not displayed when you run the report. You can include these additional fields using the format option. For more information, see Adding or removing columns.
To determine the default fields for a template file, follow these steps:
2 |
Run the nvreport -help fields [Class Name] command. |
Open the template file in a text editor. In this file, the %FORMAT line provides the Real Name for the fields. You can find the template files in <NetVault Backup home>\reports\templates on Windows and <NetVault Backup home>/reports/templates on Linux.
The %FORMAT line of a template file only includes Real Names for the fields displayed when a report is run.
By default, a report is displayed in a pre-defined layout when run in the terminal window. You can use the ‑format option to specify the number of characters that are displayed in a column, insert a line break, or add or remove columns. The formatting options are described in the following sections:
When you use the -format option, you must use the real name of the fields. Each name must be prefixed with a “%” symbol. If the real name includes the “%” symbol, use the escape sequence “%%” when specifying the name. Moreover, you must specify all required fields in the syntax. If you omit any field in the syntax, it is not displayed in the output.
To include a line break between each entry in the report output, append “%\n” to the end of the list of fields named with the -format option:
Some template files offer several additional fields that can be included in the output using the -format option. To add a column, obtain the full list of the available fields for a template file using the nvreport -help field <class name> command. Review the information offered in the Description column for each field, and include the applicable fields. Verify that you use the real name of the field.
The -sort option can be used to sort the entries on a selected field. A sort expression is specified in the following format:
• |
[field name]: Field on which the report is sorted. |
• |
[+/-]: Use + to sort the output in ascending order of the specified field, or - to sort the output in descending order. |
When you use the -sort option, you must use the real name of the fields. Each name must be prefixed with a “%” symbol. If the real name includes the “%” symbol, use the escape sequence “%%” when specifying the name.
The -include option can be used to filter the data for a report. A filter expression is specified in the following format:
• |
[field name]: Real Name of the field. |
• |
[operator]: The operator can be any of the following: |
• |
[constant]: The value to which the [field name] value is compared. For example, to include only entries that apply to the job assigned the Job ID of “42”, you would include “42” as the [constant]. |
© ALL RIGHTS RESERVED. Nutzungsbedingungen Datenschutz Cookie Preference Center