NetBackup Performance
Reports with MySQL/Perl
Jerry Uanino
Backups are always a problem. Often, even in large companies where you would
expect such an important task to be a high priority, backups are given to a
new guy, an intern, or anyone willing to pay attention. Many excellent systems
administrators began their careers changing tapes and monitoring or restarting
failed backups.
If you oversee a large installation and backups are not your primary responsibility,
it's a daunting task to determine not only that the backups are succeeding,
but also that they are occurring consistently and efficiently. In this article,
I'll describe a technique for monitoring the performance of a Veritas NetBackup
Datacenter system. Although this technique is specific to a NetBackup installation,
the same concepts can be used to monitor any backup system.
The main concept is to run a collector script that queries the NetBackup catalog
for backup statistics and stores that information in a MySQL database. A second
program then uses the backup data in the MySQL database to generate a chart
with Perl and the help of GD::Graph::bars. Alternatively, you can use SQL commands
to query the MySQL database directly and produce any type of custom report.
Figure 1 shows some example output.
Performance data gathered for each backup would include the backup ID, the
duration, the client host, the schedule type (full or incremental), the amount
of data backed up, the number of files, the kilobytes per second, the policy
used, the date the backup started, and the server that initiated the backup.
This data can then be queried to help answer such questions as:
Which system is the best performer?
mysql> select client,kbpersec from backperf order by kbpersec desc limit 1;
+------------+----------+
| client | kbpersec |
+------------+----------+
| somehost | 24612 |
+------------+----------+
Which systems back up the most data?
mysql> select client,kbytes from backperf order by kbytes desc limit 1;
+---------+-----------+
| client | kbytes |
+---------+-----------+
| ct01sts | 746335072 |
+---------+-----------+
What is the average number of files being backed up?
mysql> select avg(numfiles) from backperf;
+---------------+
| avg(numfiles) |
+---------------+
| 102661.9
|