cancel
Showing results for 
Search instead for 
Did you mean: 

bpflist "no entity was found" error - used to work before

Sto_Rage
Level 3
NBU 5.1 no MP, running on Solaris 2.8 Master

We have a home grown script that we use to track the archvie jobs that used to run before, but fails with "no entity was found" errror. Here's the snippet of the script

#!/bin/sh
#### Inputs required 1. start date 2. end date 3. client name and 4. backup type
bpimagelist -U -d $1 -e $2 -client $3 -sl $4 -idonly |awk '{print $8}' >imagelist
for i in `cat imagelist|sort`
do
echo
echo Backup ID: $i

bpimagelist -U -backupid $i
#echo ----------------------------------------------------------------------------
echo List of tapes that contain Image $i
echo Primary Copy:
bpimagelist -l -backupid $i |grep "FRAG 1" |awk '{print $9;}'|sort -u
echo ----------------------------------------------------------------------------
echo Duplicate Copy:
bpimagelist -l -backupid $i |grep "FRAG 2" |awk '{print $9;}'|sort -u
echo ----------------------------------------------------------------------------
echo Top Level Directory list in this Image
bpflist -U -d $1 -client $3 -backupid $i -option ONLY_DIRS|sed 's/.*P=\(.*\)\ D=.*/\1/;'|egrep '^\/'|sed 1q
echo ----------------------------------------------------------------------------
done
##end of script
The bpflist command used to list out the directory path of the archvie, but now it just spits out "no entity was found". Even if we just run bpflist -client clientname -d date gives the same error. In fact running bpflist with any options gives the same error. This script used to work fine in 4.5, not sure if it worked ever after we upgraded to 5.1
TIA
8 REPLIES 8

Anonymous
Not applicable
Do you get output from the following command run on the master:
../netbackup/bin/admincmd/bpclient -client -L
I assume you got the no entity was found error?

Then you might need to add the Client name(s) to the Client Attributes list on the master:

Open the netbackup Admin console on the master server and go to the properties for the master server.
Add the client(s) to the "Client Attributes" list

You may still need to tweak the settings in here. Sounds like a network/port issue.

My focus would be on network config within Netbackup. I think VNETD was introduced in v5. Maybe create a directory ../netbackup/logs/vnetd and see what the logs show up.

zippy
Level 6
Sto,

I looked into it on my 5.1 server and I had the same problem, but I noticed that it works on some images like STANDARD type, but not on ARCHIVE type.

Aanyhow I tried a few variations and came up with this short script to check.if it works on your system, I also modified your script so you wont have to type so much.

##############--CUT HEAR --#####################################
#!/bin/ksh
media=$1
NBADM=/usr/openv/netbackup/bin/admincmd
echo "Media $media contains following files:"
$NBADM/bpimmedia -l -mediaid $media | grep "^IMAGE" | awk {'print $4'} |
while read BID
do
ctime=`echo $BID | sed 's/^.*_//'`
$NBADM/bpflist -l -backupid $BID -ut $ctime | awk {'print $10'}
done

##############--CUT HEAR --#####################################


##############--CUT HEAR --#####################################
#!/usr/bin/ksh




IM=/tmp/imagelist
TODAYS_DATE=`date +%m/%d/%Y`
OFFSET=${1:-1}

case $OFFSET in
** | ???* | 3? | 29) print -u2 "Invalid input" ; exit 1;;
esac

eval `date "+day=%d; month=%m; year=%Y`
typeset -Z2 day month
typeset -Z4 year
machine=`hostname`

# Subtract offset from day, if it goes below one use 'cal'
# to determine the number of days in the previous month.
day=$((day - OFFSET))
if (( day <= 0 )) ;then
month=$((month - 1))
if (( month == 0 )) ;then
year=$((year - 1))
month=12
fi
set -A days `cal $month $year`
xday=${days}
day=$((xday + day))
fi

#print $year-$month-$day

echo "\nEnter a client to search: \n"
read STUFF
echo "\nAre you sure you want to search this client?\n"

#### Inputs required 1. client name and 4. backup type

bpimagelist -U -d $month/$day/$year -e $TODAYS_DATE -client $STUFF -idonly |awk '{print $8}' >$IM
for i in `cat $IM|sort`
do
echo
echo Backup ID: $i
ctime=`echo $i | sed 's/^.*_//'`
#echo $ctime
bpimagelist -U -backupid $i
#echo ----------------------------------------------------------------------------
echo List of tapes that contain Image $i
echo Primary Copy:
bpimagelist -l -backupid $i |grep "FRAG 1" |awk '{print $9;}'|sort -u
echo ----------------------------------------------------------------------------
echo Duplicate Copy:
bpimagelist -l -backupid $i |grep "FRAG 2" |awk '{print $9;}'|sort -u
echo ----------------------------------------------------------------------------
echo Top Level Directory list in this Image
#bpflist -U -d $month/$day/$year -client $STUFF -backupid $i -option ONLY_DIRS|sed 's/.*P=\(.*\)\ D=.*/\1/;'|egrep '^\/'|sed 1q

bpflist -l -client $STUFF -ut $ctime -option ONLY_DIRS
echo ----------------------------------------------------------------------------
done
##end of script
##############--CUT HEAR --#####################################

JD

Sto_Rage
Level 3
Suart,
Thanks for replying. Yes, we got the same "no entity was found" error when we ran
bclient -client -L
So based on your suggestion, we added the client name to Client Attributes list on the Master and also created the vnetd dir under logs and restarted the entire netbackup services. Now bpclient -client -L produces an output see below (client name has been masked)

#bpclient -client xxxxxxx -L
Client Name: xxxxxxx
Current Host:
Hostname: xxxxxxx
IP Address: 0.0.0.0
Connect on non-reserved port: no
No call-back connections: no
Dynamic Address: no
Free Browse: Allow
List Restore: Not Specified
Max Jobs This Client: Not Specified
WOFB Enabled: yes
WOFB FIM: VSP
WOFB Usage: Individual Drive Snapshot
WOFB Error Control: Abort on Error


Nothing is logged yet in the vnetd directory and we still get "no entity was found" when we run bpflist for MOST of the jobs. So it works for some jobs but not for all jobs. Why?

See example below, first one it finds /E/ as the directory it backed up, the next one its "no entity was found"

Backup ID: xxxxxx_1149059586
Backed Up Expires Files KB C Sched Type Policy
---------------- ---------- -------- -------- - ------------ ------------
05/31/2006 00:13 09/01/2006 25503 13844844 N Full Backup xxxxxx_Data
List of tapes that contain Image xxxxxx_1149059586
Primary Copy:
001991
----------------------------------------------------------------------------
Duplicate Copy:
----------------------------------------------------------------------------
Top Level Directory list in this Image
/E/
----------------------------------------------------------------------------

Backup ID: xxxxxx_1149059573
Backed Up Expires Files KB C Sched Type Policy
---------------- ---------- -------- -------- - ------------ ------------
05/31/2006 00:12 09/01/2006 3 3732 N Full Backup xxxxxx_Data
List of tapes that contain Image xxxxxx_1149059573
Primary Copy:
001991
----------------------------------------------------------------------------
Duplicate Copy:
----------------------------------------------------------------------------
Top Level Directory list in this Image
no entity was found
----------------------------------------------------------------------------


Thanks for looking into to this.

-G

Sto_Rage
Level 3
James,
Thanks for helping me with the script. As I mentioned in the previous post, and as you noticed, it works for some backup jobs but not for all.
Here's an example of where the 2nd script of your worked

./script2.sh

Enter a client to search:

xxxxxx

Are you sure you want to search this client?


Backup ID: xxxxxx_1154487988
Backed Up Expires Files KB C Sched Type Policy
---------------- ---------- -------- -------- - ------------ ------------
08/01/2006 20:06 08/15/2006 59 1653918 N Differential C-unix_main
List of tapes that contain Image xxxxxx_1154487988
Primary Copy:
007398
----------------------------------------------------------------------------
Duplicate Copy:
----------------------------------------------------------------------------
Top Level Directory list in this Image
FILES 7 0 0 1154487988 1 xxxxxx C-unix_main xxxxxx_1154487988 - *NULL* 9 0 unknown unknown 0 0 *NULL*
41 0 1 50 3301307 1 0 0 22282240 / 16877 root root 0 1154455937 1150493090 1150493090
1 0 5 50 1 1 0 0 22282245 /app/ 17407 root root 0 1154401592 1152291513 1152291513
19 0 5 49 3300269 1 0 0 22282243 /var/ 16877 root sys 0 1154402057 1150479059 1150479059
42 0 5 49 3301308 1 0 0 22282240 /etc/ 16877 root sys 0 1154450539 1150487290 1150487290
48 0 5 49 3301314 1 0 0 22282240 /dev/ 16877 root sys 0 1154402058 1150484100 1150484100
50 0 9 49 3301316 1 0 0 22282240 /devices/ 16877 root sys 0 1154402058 1150478880 1150478880
57 0 6 50 3301323 1 0 0 78905344 /proc/ 16749 root root 0 1154488403 1154488403 1154488403
58 0 5 49 3301324 1 0 0 2 /tmp/ 17407 root sys 0 1154487960 1154460483 1154460483
59 0 8 50 3301325 1 0 0 2 /remote/ 16749 root root 0 1154488403 1154488403 1154488403
----------------------------------------------------------------------------
At the same time passing the media ID from the above output to your first script gave:
./script1.sh 007398
Media 007398 contains following files:
no entity was found
no entity was found
no entity was found
no entity was found
no entity was found
no entity was found
no entity was found
no entity was found
no entity was found
no entity was found
no entity was found
no entity was found
no entity was found
no entity was found
no entity was found
no entity was found
no entity was found
no entity was found
no entity was found
no entity was found
no entity was found
no entity was found
no entity was found
no entity was found
no entity was found
no entity was found
no entity was found
no entity was found

Sto_Rage
Level 3
Hi,
Anyone has a solution for this issue? If not what's the best way to list the full path or directories that was archived.
TIA
-G

Stumpr2
Level 6
Sometimes it is better to step back and look at the individual command. Can you get bpflist to work as a CLI outside of any scripts? Perhaps there is a slight syntax change in the command. Try various clients. Beware of case sensitivity. Try enabling the debug logs bpdbm and bprd.

I know this is just basic suggestions, but like I said, perhaps you should take a step back to investigate. I wish you well.

zippy
Level 6
I aggree with Bob!

Sto you need to experiment a bit.

As patches are applied and versions change, then so do the commands within the application.

You wont break anything.

JD

Sto_Rage
Level 3
I finally found the solution to the problem. I had to add the recursion level flag -rl 10 to get it to work.
So this line works fine
bpflist -U -d $1 -client $3 -backupid $i -rl 10 |sed 's/.*P=\(.*\)\ D=.*/\1/;'|egrep '^\/'|sed 1q

Thanks to all.
-G