Quick Post -
After sorting through a few old files I found a nice little bash script that I used in the past. I was tasked with updating the NetBackup Linux clients to the most recent version which for me was 7.5. One of the nice features about having the NetBackup master installed on a RHEL server was that I could push client updates to my Linux servers without needing root (or any account) access. The command to do this is update_clients which will need a -ClientList parameter passed as well. As -ClientList suggests it needs a list of clients. To make my life easier for creating a list of clients I used this script to output every client and other details that I used to format and filter the clients I needed. Check it out!
Hello! This blog is mainly intended as a sort of collection of notes that I have found useful in my personal life and professional career in IT. My attitude is if it helped me than it may help you. I'm always looking to learn more!
Showing posts with label backups. Show all posts
Showing posts with label backups. Show all posts
Saturday, June 28, 2014
Thursday, May 29, 2014
NetBackup - Estimating the amount of data to be restored
At work I manage the Symantec NetBackup 7.5 environment (RHEL6.5). Every once in a while I'll get a request to restore some data from tape but what I have noticed is that it is somewhat difficult to tell how much data I will be restoring. NetBackup doesn't seem to have an easy way to show the amount of data that will be restored. I search but couldn't really find anything so if anyone has an easier way I would like to know. Anyways, I decided to take matters into my own hands and craft a quick little script to help me.
Usage: ./GetTotalSize.sh ndmp_bplist
The above script can be modified to include TB at some point. As a disclaimer I have only used it for UNIX clients. It assumes that column 4 is the size of the file in the bplist output. If for some reason this isn't true than the script will fail. Enjoy!
These steps are done on a NetBackup Linux master server. If you're using Windows Server well the bash script may not help much but the theory should still be sound. Maybe one day I will port it over to Windows...
- Use the bplist command to find all files and folders that you will be restoring. If you have never used it before I'd suggest to check out Symantec's tech note on bplist. In this example I will be using bplist to list all files/folders from a NDMP client.
bplist -C ndmpclientname -S netbackupmaster -k NDMP-policy -t 19 -b -l -s 02/22/2014 00:00:00 -e 03/01/2014 00:00:00 /vol/DirToRestore > ndmp_bplist - The above command lists files and folders in a format similar to if you were to use the "ls -l" command in the terminal.
Example:drwxrwxrwx 2259 2259 4096 Feb 13 21:37 /vol/DirToRestore/test1 drwxrwxrwx 2259 2259 4096 Feb 13 21:37 /vol/DirToRestore/test2 -r-xr--r-- 2259 2259 727 Feb 13 21:37 /vol/DirToRestore/File1 - At this point you technically have all the file sizes in Bytes, for example, File1 is 727 Bytes. Of course it isn't that easy when you are restoring 100,000 files. You could sit there and start adding all day or just use the below script.
Usage: ./GetTotalSize.sh ndmp_bplist
The above script can be modified to include TB at some point. As a disclaimer I have only used it for UNIX clients. It assumes that column 4 is the size of the file in the bplist output. If for some reason this isn't true than the script will fail. Enjoy!
Subscribe to:
Posts (Atom)