cancel
Showing results for 
Search instead for 
Did you mean: 

Generate list of file systems in a Policy, from the Client

Gotham_Gerry
Level 4
On the client, I have a need to generate a list of file systems to be backed up by a particular Policy.  There does not seem to be a way to do this from the client.
Anyone know better? 

10 REPLIES 10

dustin_yonak
Level 4
Employee
I can't think of a method to preview files to be backed up from the client. You can use bplist, after the backup's taken place, to generate a list of files backed up however:
http://seer.entsupport.symantec.com/docs/259782.htm

Short of this you would need to look at the backup selections you've listed in the client's policy and then do a recursive dir listing on the client for each backup selection path. This obviously won't account for excludes that you've configured for the client.

dltsc
Level 4
Partner
Take a look at the bpcoverage command.  Syntax is INSTALL_PATH\netbackup\bin\admincmd\bpcoverage -c $client

Gotham_Gerry
Level 4
Thanks, I had thought of using bplist to look at past backups, but what I really want is: bppllist - list policy information, but I want to be able to run it on the client. 

Will_Restore
Level 6
done. :)

Gotham_Gerry
Level 4
Thanks, I use bpcoverage often from the Master, but it is not installed on the clients, and I don't think it would work from the clients. 

J_H_Is_gone
Level 6
If your policy has a USER schedule in it
You should be able to use the bpbackup command

have a script make the backup_list of what you want backed up then have it run the bpbackup command
 
I do it all the time but with just one file but you should be able to do it with the –f option.
 
/opt/openv/netbackup/bin/bpbackup -p <policy> -s <schedule> -h <myclient name –must match policy>
    -S <masterserver> -t 0 -w -k "<keyword optional>" <dir or file I want to backup> >> $LOG 2>&1
 (the -t is policy 0 being  standard)

from HELP for bpbackup
Example 2
The following command starts a user backup of the files that are listed in a file that is named backup_list:
bpbackup -f backup_list
Example 3
The following command (all on one line) starts an immediate-manual backup of the client host named diablo, in the policy named cis_co. The policy type is Standard policy and is in the configuration on the master server named hoss.
bpbackup -p cis_co -i -h diablo -S hoss -t 0

Anton_Panyushki
Level 6
Certified
Hello,

Could you please explain us why you want to have selection list of a certain policy to be available on the client side. Selection lists are static, so you may want to create plain text files for each of your policies, put selection list into these files and upload them to the client. Next you should create bpstaty_notify scripts for these policies. In these scripts you may read a text file for a particular policy thus gainning access to policy selection list. The programming is rather straightforward regardless of the platform you use.
 

Gotham_Gerry
Level 4

Thank you for this.  What I'm actually trying to do is get before and after 'ls -l' output of all files in the directories that are about to be backed up when a backup kicks off.  I do not want to change the way the backups are scheduled or launched. 

 

 

Gotham_Gerry
Level 4

Thank you for this.  What I'm actually trying to do is get before and after 'ls -l' output of all files in the directories that are about to be backed up when a backup kicks off.  I do not want to change the way the backups are scheduled or launched. 

 

 

Gotham_Gerry
Level 4

Thanks everyone for your suggestions.  I took another look at bplist on the client and decided that it will work fine for me.  I am doing something like this:
 

   bplist -C $CLNT -k $POLI -R -l / |nawk '{print $NF}' |sort -u 

This shows me what has been backed up before, and I am able to do a recursive 'ls' or a 'find' to list files.  If someone adds another file system to the policy, my script won't know about it until it is backed up once; no big deal.