Unsolved
This post is more than 5 years old
16 Posts
0
5829
July 15th, 2015 00:00
Looking for script to find last night backup status for all client
Hi All,
I was trying to create a script to find the backup status for each client, instead of savesets.
What is noticed in networker, its possible to get the backup status with ssflags.
could you please provide some command, that should provide an output like this.
Ex:
GroupName ClientName BackupStartDate Backupcompletiondate Status
Daily_Full abcd 14/June/2015 18:00 15/June/2015 3:00 completed/incompleted/failed/interrupted
No Events found!


3ksuresh
16 Posts
0
July 15th, 2015 03:00
Thanks for your response.
I am looking for an command to get the out in notepad format, which would help me to prepare the daily backup report with script. so, we can reduce the manual invention to update the daily report on daily basis..
ble1
6 Operator
•
14.4K Posts
•
56.2K Points
0
July 15th, 2015 03:00
You can extract this via jobdb.
ble1
6 Operator
•
14.4K Posts
•
56.2K Points
0
July 15th, 2015 04:00
How you wish to format it is your thing - you can do whatever you want when scripting this as you define output format as well.
3ksuresh
16 Posts
0
July 15th, 2015 04:00
I tried it , but i am not able to get the output in the below format. If you take other backup tool, like netbackup and symantec, we can get the output in the below format using CLI.
But, in Network, i dont find a command to get the report in below format.
so, could you please help, if there is any command available in networker to print the report in below format from CLI.
Ex:
GroupName ClientName BackupStartDate Backupcompletiondate Status
Daily_Full abcd 14/June/2015 18:00 15/June/2015 3:00 completed/incompleted/failed/interrupted
crazyrov
6 Operator
•
1.3K Posts
0
July 15th, 2015 05:00
As H already stated, you are writing a script so you can format is as you wanted you view it as but for the status of the jobs you can use jobquery.
3ksuresh
16 Posts
0
July 15th, 2015 07:00
Sorry Buddy,, i missed it..
actually i am not good in command line..
if you have any jobquery command , could you please share it..
crazyrov
6 Operator
•
1.3K Posts
0
July 16th, 2015 00:00
For the start and end time you could use the following syntax (assuming that you are on a unix system)
printf ". type: nsr group; name: group_name\n name; last start; last end\n print\n " | nsradmin -i-
To get what client ran in the respective group and what is the status of that group
printf ". type: savegroup job; name: group_name; start time: unix_start_time\n show clients list; completion status\n print\n" | jobquery -i-
HTH
3ksuresh
16 Posts
0
July 16th, 2015 01:00
Thanks a lot for your details.
Hope this command will work in windows system as well. as we are using w2k8 server as a backup server.
3ksuresh
16 Posts
0
July 24th, 2015 06:00
I tried the command and its not working.
could you please help me with the correct command.
jobquery> printf". type:savegroup job; name:AMS1-Databases-Daily-001; start time: Tue Jul 21 18:00:01 2015\n show clients list; completion status\n print\n
unknown command: printf".
jobquery> p type:savegroup job; name:AMS1-Databases-Daily-001; start time: Tue Jul 21 18:00:01 2015\n show clients list; completion status\n print\n
Resource parse error: Unterminated resource value list
type:savegroup job; name:AMS1-Databases-Daily-001; start time: Tue Jul 21 18:00:01 2015\n show clients list; completion status\n print\n
^
usage: print [query] (set current query)
jobquery> p type:savegroup job; name:AMS1-Databases-Daily-001; start time: Tue Jul 21 18:00:01 2015\n show clients list; completion status\n print\n" | jobquery -i-
Resource parse error: Unterminated resource value list
type:savegroup job; name:AMS1-Databases-Daily-001; start time: Tue Jul 21 18:00:01 2015\n show clients list; completion status\n print\n" | jobquery -i-
^
crazyrov
6 Operator
•
1.3K Posts
0
July 24th, 2015 07:00
Do not use printf within the jobquery command. This is to be used from your command prompt
ClaudioA1
5 Posts
0
August 9th, 2018 07:00
Hello,
i re-open this topic becouse i have same problem.
I need to find information about Backup-Process.
Who can help me?
bingo.1
2.4K Posts
0
August 10th, 2018 06:00
Please be more precise what exactly you are looking for.
And you should also state the NW version.
ClaudioA1
5 Posts
0
August 10th, 2018 07:00
Hello bingo,
I have this Script:
In every situation i have "Errore message": The chain of backup of A Its not OK. Check
Can you help me?
# Stop di Apache
echo " Stop Apache "
/usr/bin/ssh CLIENT /etc/init.d/httpd stop
/usr/bin/ssh CLIENT /etc/init.d/httpd stop
sleep 60
# Stop di JBOSS
echo " Stop Jboss "
/usr/bin/ssh CLIENT /etc/init.d/jboss stop
/usr/bin/ssh CLIENT /etc/init.d/jboss stop
/usr/bin/ssh CLIENT /etc/init.d/jboss stop
/usr/bin/ssh CLIENT /etc/init.d/jboss stop
sleep 60
#
# Variables
G2Stat=/tmp/G2Status$$.tmp
NmdaStat=/tmp/NmdaStatus$$.tmp
G2Exit=/tmp/G2ExitStatus$$.tmp
NmdaExit=/tmp/NmdaExitStatus$$.tmp
# run of 2 Groups A e B
for GRUPPO in A B
do
echo "
. type: NSR group;
name: $GRUPPO
update Autostart: Start now" | /usr/sbin/nsradmin -s -i -
done
# Check of Groups
echo "show completion
print type: NSR group;
name: A" | /usr/sbin/nsradmin -s -i - |grep -v index |grep succeeded > $G2Exit
if grep "succeeded" $G2Exit
then
G2Status=1
echo "Group A its OK"
fi
echo "show completion
print type: NSR group;
name: B" | /usr/sbin/nsradmin -s -i - |grep -v index |grep succeeded > $NmdaExit
if grep "succeeded" $NmdaExit
then
NMDAStatus=1
echo "Group B its ok"
fi
# Start JBOSS
echo " Restart of Jboss "
/usr/bin/ssh CLIENT /etc/init.d/jboss start
/usr/bin/ssh CLIENT /etc/init.d/jboss start
/usr/bin/ssh CLIENT /etc/init.d/jboss start
/usr/bin/ssh CLIENT /etc/init.d/jboss start
sleep 60
# Start Apache
echo " Restart of Apache "
/usr/bin/ssh CLIENT /etc/init.d/httpd start
/usr/bin/ssh CLIENT /etc/init.d/httpd start
sleep 60
if [ $((G2Status + NMDAStatus)) -eq 2 ]
then
echo "The chain of backup of A Its OK"
exit 0
else
echo "The chain of backup of A Its not OK. Check"
exit 1
fi
rm -f $G2Stat $NmdaStat $G2Exit $NmdaExit
exit 0
ClaudioA1
5 Posts
0
August 23rd, 2018 04:00
Hello Hrvoje Crvelin,
can you give me more information about?
Have you a Guide or Video or other?
/Claudio
ble1
6 Operator
•
14.4K Posts
•
56.2K Points
0
August 23rd, 2018 04:00
Why simply not make pre/post actions in NW and have notification emails out?