Skip to content
Tools for NetBackup
Python
Branch: master
Clone or download
Latest commit 591af87 Jul 30, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
images bpdbjobs report May 19, 2017
.gitignore Initial commit May 12, 2017
LICENSE Initial commit May 12, 2017
README.md Update README.md May 22, 2017
add_server_nbu.py Initial commit May 12, 2017
bpdbjobs_delay_report.py added deduplication normalization May 22, 2017
chk_con_nbu.py added emm update Jul 30, 2019
del_server_nbu.py Initial commit May 12, 2017
requirements_bpdbjobs.txt bpdbjobs report May 19, 2017

README.md

nbu_tools

Various tools for managing NetBackup Releases

Connectivity tools

Use Cases:

Reporting tools

Use Cases:

Connectivity tools

add_server_nbu

Adds SERVER entries to configuration, similar to bundled NetBackup's add_media_server_on_clients, but more flexible and faster.

Issue with add_media_server_on_clients that it runs in single thread and if there are multiple unreachable clients in the domain it takes very long time to complete. And server list is taken from bp.conf/registry on the master server, which might be undesired in testing or migration scenarios.

Script is written for python 2.6.9 using only standard libraries. Compatible python interpreter is shipped with most major platforms. For convenience it was packaged with PyInstaller for Windows and Linux.

Usage

Usage: add_server_nbu.exe [options] host1 host2 host3 ...

Options:
  -h, --help            show this help message and exit
  -f HOST_LIST_FILE, --file=HOST_LIST_FILE
                        read hosts from file, one per line
  -s SERVER_FILE, --server=SERVER_FILE
                        read new server entries from file, bp.conf syntax
                        SERVER = HOSTNAME
  -b BIN_ADMIN, --bin_admin=BIN_ADMIN
                        path to .../netbackup/bin/admincmd
  -n NUM_THREADS, --num_threads=NUM_THREADS
                        number of threads to run simultaneously
  -v, --verbose         print status messages to stdout
  -d, --debug           print debug messages to stdout

Notes

If client becomes unreachable after config update, script will terminate all threads and exit.

Debug will print whole configuration for each client, don't use it on large client sets

del_server_nbu

Deletes SERVER entries from configuration. Very similar to add_server_nbu , but instead of add servers for the provided list it will delete the from host's configuration.

Usage

Usage: del_server_nbu.exe [options] host1 host2 host3 ...

Options:
  -h, --help            show this help message and exit
  -f HOST_LIST_FILE, --file=HOST_LIST_FILE
                        read hosts from file, one per line
  -s SERVER_FILE, --server=SERVER_FILE
                        read new server entries from file, bp.conf syntax
                        SERVER = HOSTNAME
  -b BIN_ADMIN, --bin_admin=BIN_ADMIN
                        path to .../netbackup/bin/admincmd
  -n NUM_THREADS, --num_threads=NUM_THREADS
                        number of threads to run simultaneously
  -v, --verbose         print status messages to stdout
  -d, --debug           print debug messages to stdout

Notes

If client becomes unreachable after config update, script will terminate all threads and exit.

Debug will print whole configuration for each client. Don't use it on large client sets as it will flood output.

chk_con_nbu

Checks client connectivity by connecting to NetBackup's PBX(1556), BPCD(13724) ports and executing bpgetconfig. Advantage overbptestbpcd and bptestnetconn is flexibility in client selection and performance.

Usage

Usage: chk_con_nbu.exe [options] host1 host2 host3 ...

Options:
  -h, --help            show this help message and exit
  -f FILENAME, --file=FILENAME
                        read hosts from file, one per line;
  -b BIN_ADMIN, --bin_admin=BIN_ADMIN
                        path to .../netbackup/bin/admincmd
  -s, --skip_bpgetconfig
                        Don't run bpgetconfig to confirm connection
  -n NUM_THREADS, --num_threads=NUM_THREADS
                        number of threads to run simultaneously
  -v, --verbose         print status messages to stdout
  -d, --debug           print debug messages to stdout

Notes

When using skip_bpgetconfig report will show this check as success.

Use Case - Catalog Migration Pre-check

Scenario

NetBackup on master server nbumas01 needs to be migration to different server while keeping the same name. Target system has temporary name nbutgt.

Solution

  1. Create list of all clients with

    • Windows FOR /F "tokens=3" %a IN ('bpplclients -allunique') DO (echo %a) >> clients.txt

    • Linux and *nix bpplclients -allunique| awk '{print $3}' > clients.txt

  2. Verify client connectivity from the source system with chk_con_nbu.

  3. Add temporary nbutgt name to all clients in source domain with add_server_nbu or add_media_server_on_clients.

  4. Verify client connectivity from the target system with chk_con_nbu.

  5. Delete temporary nbutgt name from all clients in source domain with del_server_nbu or add_media_server_on_clients.

  6. Crosscheck results from steps 1 and 4. Resolve connectivity issues.

Reporting Tools

bpdbjobs_delay_report

Takes bpdbjobs -all_columns output, analyses bpbkar and bptm delay messages and produces series of diagrams in one pdf file.

  • Top ten clients by loss in throughput due to slow Clients/Network in MBps.

  • Top ten clients by loss in throughput due to slow Media server in MBps.

  • Storage units (STU) report showing:

    • Total throughput in MBps.
    • Loss in throughput due to slow Clients/Network in MBps.
    • Loss in throughput due to Media server storage performance in MBps.

Formula is throughput is total throughput * (time spend waiting for buffers/ total time) * (1 - dedup ratio)

Installation

Download windows release form the link on the the page. Otherwise install Python 3.4 or above and run

git clone https://github.com/StoneRam/nbu_tools
pip install -r requirements_bpdbjobs.txt
python bpdbjobs_delay_report.py [...options]

Usage

usage: bpdbjobs_delay_report [-h] -f|--file BPDBJOBS -o|--output OUTPUT
                      [-i|--interval INTERVAL] [-s|--start_date START_DATE]
                      [-n|--skip_slps] [-y|--only_slps]
                      [-t|--top_clients TOP_CLIENTS] [-e|--end_date END_DATE]

optional arguments:
  -h, --help            show this help message and exit
  -f|--file BPDBJOBS    file with bpdbjobs -all_columns output
  -o|--output OUTPUT    output pdf
  -i|--interval INTERVAL
                        Interval
  -s|--start_date START_DATE
                        The Start Date - format YYYY-MM-DD-HH24
  -n|--skip_slps        Don't count SLP stats
  -y|--only_slps        Only count SLP stats
  -t|--top_clients TOP_CLIENTS
                        Number of most delayed clients to display
  -e|--end_date END_DATE
                        The End Date - format YYYY-MM-DD-HH24

Theory

Delay messages indicate two different issues:

  • Network/client performance is suspect in case of bptm 'waiting for full buffer' messages. Buffers are available for writing on the media server, but client doesn't fill them in time.

  • Media server performance issue in case of bpbkar messages 'waiting for empty buffer'. Client is sending data faster then media server is able to write it.

Some amount of delays expected and doesn't indicate any issues.

Notes

  • X-axis is labeled with Month-Day-24Hours format
  • Time frame choosen based on minimun and maximum value of jobs start and end time in bpdbjobs output.
  • Compiled version take longer to execute due to exe compression.

Example reports

Clients

Client report

Media Server - STU

Client report

Use Case - Tune NetBackup

  • For slow clients\network delays:

    • Increase\Enable multiplexing\number of streams on storage. So more clients will could storage buffers.
    • Increase number of data streams for client, i.e. NEW_STREAM directive in filesystem backup selections
    • Reduce size of Network buffers and increase size of Disk/Tape buffers.
  • For media server delays:

    • Reduce number of streams on storage. Clients are racing for buffers reducing overall performance.
    • Reduce size of Disk/Tape buffers and increase size of Network buffers.
    • Spread backup schedules so they would overlap less, use generated report to make a judgement.

Often best solution is to resolve core issue, network bottleneck, underlying storage performance, etc.

You can’t perform that action at this time.