[Veritas-bu] BPARCHIVE using a PRE-SCRIPT

2013-02-01 Thread sruffolo
This is the first time I am trying to use BPARCHIVE and we would like to use a 
pre-script that creates a text file that will be used to tell the BPARCHIVE 
what to back up and then delete. The documentation tells us to run it from the 
Backup Selection screen but the instructions are not very clear, can anyone 
give me a nudge here.

Policy - UNIX_uwwdwprod_file_arch1_tws
Backup Selection: /dwprod_arch_backup

Command: 
/usr/openv/netbackup/bin/bpbackup -i -p UNIX_uwwdwprod_file_arch1_t1_tws -s 
ARCHIVE -h uwwstgdb01 -S uwpatlnbmst01 -wundefined

+--
|This was sent by steven.ruff...@unisourceworldwide.com via Backup Central.
|Forward SPAM to ab...@backupcentral.com.
+--


___
Veritas-bu maillist  -  Veritas-bu@mailman.eng.auburn.edu
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu


Re: [Veritas-bu] BPARCHIVE using a PRE-SCRIPT

2013-02-01 Thread Patrick
Don't you mean /usr/openv/netbackup/bparchive  -p 
UNIX_uwwdwprod_file_arch1_t1_tws -s ARCHIVE -S uwpatlnbmst01 -L 
/tmp/logfile /dwprod_arch_backup

-- Original Message --
From: sruffolo nbu-fo...@backupcentral.com
To: VERITAS-BU@MAILMAN.ENG.AUBURN.EDU
Sent: 01/02/2013 14:46:29
Subject: [Veritas-bu] BPARCHIVE using a PRE-SCRIPT
This is the first time I am trying to use BPARCHIVE and we would like 
to use a pre-script that creates a text file that will be used to tell 
the BPARCHIVE what to back up and then delete. The documentation tells 
us to run it from the Backup Selection screen but the instructions are 
not very clear, can anyone give me a nudge here.

Policy - UNIX_uwwdwprod_file_arch1_tws
Backup Selection: /dwprod_arch_backup

Command:
/usr/openv/netbackup/bin/bpbackup -i -p 
UNIX_uwwdwprod_file_arch1_t1_tws -s ARCHIVE -h uwwstgdb01 -S 
uwpatlnbmst01 -wundefined

+--
|This was sent by steven.ruff...@unisourceworldwide.com via Backup 
Central.
|Forward SPAM to ab...@backupcentral.com.
+--


___
Veritas-bu maillist - Veritas-bu@mailman.eng.auburn.edu
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu

___
Veritas-bu maillist  -  Veritas-bu@mailman.eng.auburn.edu
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu


[Veritas-bu] BPARCHIVE using a PRE-SCRIPT

2013-02-01 Thread sruffolo
Don't you mean /usr/openv/netbackup/bparchive -p 
UNIX_uwwdwprod_file_arch1_t1_tws -s ARCHIVE -S uwpatlnbmst01 -L 
/tmp/logfile /dwprod_arch_backup 

We ran it and get the follwoing error:

root@uwwprd22:/usr/openv/netbackup/bin # ./bparchive -p 
UNIX_uwwdwprod_file_arch1_t1_tws -s ARCHIVE 
Specify either a listfile or a list of files on the command line.
USAGE: bparchive [-p policy] [-s schedule] [-k keyword phrase]
   [-L progress_log [-en]] [-S master_server...]
   [-t policy_type] [-w [hh:mm:ss]]
   -f listfile | filenames
EXIT STATUS 144: invalid command usage

We were told to use a BPSTART.NOTIFY File to run a script, then use the -f to 
reference the files being arcived example -f DWARCHIVE.txt

bpnotify.start.UNIX_uwwdwprod_file_arch1_tws

Thanks for your help in advance, we are new at this and trying.

+--
|This was sent by steven.ruff...@unisourceworldwide.com via Backup Central.
|Forward SPAM to ab...@backupcentral.com.
+--


___
Veritas-bu maillist  -  Veritas-bu@mailman.eng.auburn.edu
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu


Re: [Veritas-bu] BPARCHIVE using a PRE-SCRIPT

2013-02-01 Thread Patrick
You did put a space before /dwprod_arch_backup , yes.
I agree that bpstart_notify is the way to go, but for testing purposes 
you can try the bparchive command alone. -L is for an optional log file 
that can be any path you want, but it must start with a /

-- Original Message --
From: sruffolo nbu-fo...@backupcentral.com
To: VERITAS-BU@MAILMAN.ENG.AUBURN.EDU
Sent: 01/02/2013 21:00:55
Subject: [Veritas-bu] BPARCHIVE using a PRE-SCRIPT
Don't you mean /usr/openv/netbackup/bparchive -p
UNIX_uwwdwprod_file_arch1_t1_tws -s ARCHIVE -S uwpatlnbmst01 -L
/tmp/logfile /dwprod_arch_backup

We ran it and get the follwoing error:

root@uwwprd22:/usr/openv/netbackup/bin # ./bparchive -p 
UNIX_uwwdwprod_file_arch1_t1_tws -s ARCHIVE 
Specify either a listfile or a list of files on the command line.
USAGE: bparchive [-p policy] [-s schedule] [-k keyword phrase]
[-L progress_log [-en]] [-S master_server...]
[-t policy_type] [-w [hh:mm:ss]]
-f listfile | filenames
EXIT STATUS 144: invalid command usage

We were told to use a BPSTART.NOTIFY File to run a script, then use the 
-f to reference the files being arcived example -f DWARCHIVE.txt

bpnotify.start.UNIX_uwwdwprod_file_arch1_tws

Thanks for your help in advance, we are new at this and trying.

+--
|This was sent by steven.ruff...@unisourceworldwide.com via Backup 
Central.
|Forward SPAM to ab...@backupcentral.com.
+--


___
Veritas-bu maillist - Veritas-bu@mailman.eng.auburn.edu
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu

___
Veritas-bu maillist  -  Veritas-bu@mailman.eng.auburn.edu
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu


Re: [Veritas-bu] BPARCHIVE using a PRE-SCRIPT

2013-02-01 Thread Peacock Dennis - dpeaco
Try this by calling is from the root crontab and pass it the backup policy name 
on the command line in the crontab. Put in your policy..say you wanted to 
archive everything under /u02/archive/1yr
Then you'd put in your policy for the Selection to backup would be: 
/u02/archive/1yr/*
Don't forget the * at the end so it won't delete your 1yr directory.

-- script begins here --

#!/bin/ksh

### When running this script you must include the policy at the end of the run. 
### The script uses the policy so to determine the which policy should be used 
during the archive. 
### example sudo ./script.sh 24_week_backup

# Get the policy name
NETBACKUP_POLICY=${1}

if [ ${NETBACKUP_POLICY} =  ];then
   echo Netbackup policy not include please add policy
   exit 1
fi

# Vars
NETBACKUP_LOG=/var/tmp/${NETBACKUP_POLICY}.archive.log
NETBACKUP_SCHEDULE=### SCHEDULE GOES HERE

# Rename the old log file
mv ${NETBACKUP_LOG} ${NETBACKUP_LOG}.prev 2/dev/null

#  Verify params
if [ ! ${NETBACKUP_POLICY} -o ! ${NETBACKUP_SCHEDULE} -o ! ${NETBACKUP_LOG} 
];then
  echo Error with Netbackup paramaters | tee -a ${NETBACKUP_LOG}
  exit 1
fi

# Clients are defined in the policy. This creates a list of those clients
echo Determing client list
CLIENTS=`/usr/openv/netbackup/bin/admincmd/bppllist ${NETBACKUP_POLICY} | grep 
CLIENT | awk '{print $2}'`

if [ ${CLIENTS} =  ];then
   echo Could not determine client list from policy ${NETBACKUP_POLICY} | tee 
-a ${NETBACKUP_LOG}
   exit 1
fi

# files are also defined in the policy
FILES=`/usr/openv/netbackup/bin/admincmd/bppllist ${NETBACKUP_POLICY} | grep 
INCLUDE | awk '{print $2}'`

if [ ${FILES} =  ];then
   echo Could not determine file list from policy ${NETBACKUP_POLICY} | tee 
-a ${NETBACKUP_LOG}
   exit 1
fi

# run each client one at a time.

for client in $CLIENTS;do

   # Kick off the backup process
   echo Performing backup of archive location ${FILES} on ${client}.
   /usr/openv/netbackup/bin/bparchive -w -p ${NETBACKUP_POLICY} -s 
${NETBACKUP_SCHEDULE} -L ${NETBACKUP_LOG} ${FILES}
   NB_EXIT_CODE=$?
   echo Backup for ${client} completed with code of ${NB_EXIT_CODE}
   if [ ${NB_EXIT_CODE} -ne 0 ];then
  FINAL_EXIT=${NB_EXIT_CODE}
   fi

done

if [ ${FINAL_EXIT} -ne 0 -a ${FINAL_EXIT} -ne 71 ];then
   exit ${FINAL_EXIT}
else
   exit 0
fi
-- script ends here --

DENNIS PEACOCK
MDP
Systems  Data Protection Engineer
Acxiom Corporation
EML   dennis.peac...@acxiom.com 
TEL    501-342-6232
CELL 501-343-3366
301 E. Dave Ward Drive, Conway, AR, 72032, U.S.A.
WWW.ACXIOM.COM

-Original Message-
From: veritas-bu-boun...@mailman.eng.auburn.edu 
[mailto:veritas-bu-boun...@mailman.eng.auburn.edu] On Behalf Of sruffolo
Sent: Friday, February 01, 2013 3:01 PM
To: VERITAS-BU@MAILMAN.ENG.AUBURN.EDU
Subject: [Veritas-bu] BPARCHIVE using a PRE-SCRIPT

Don't you mean /usr/openv/netbackup/bparchive -p 
UNIX_uwwdwprod_file_arch1_t1_tws -s ARCHIVE -S uwpatlnbmst01 -L /tmp/logfile 
/dwprod_arch_backup 

We ran it and get the follwoing error:

root@uwwprd22:/usr/openv/netbackup/bin # ./bparchive -p 
UNIX_uwwdwprod_file_arch1_t1_tws -s ARCHIVE  Specify either a listfile or a 
list of files on the command line.
USAGE: bparchive [-p policy] [-s schedule] [-k keyword phrase]
   [-L progress_log [-en]] [-S master_server...]
   [-t policy_type] [-w [hh:mm:ss]]
   -f listfile | filenames
EXIT STATUS 144: invalid command usage

We were told to use a BPSTART.NOTIFY File to run a script, then use the -f to 
reference the files being arcived example -f DWARCHIVE.txt

bpnotify.start.UNIX_uwwdwprod_file_arch1_tws

Thanks for your help in advance, we are new at this and trying.

+--
|This was sent by steven.ruff...@unisourceworldwide.com via Backup Central.
|Forward SPAM to ab...@backupcentral.com.
+--


___
Veritas-bu maillist  -  Veritas-bu@mailman.eng.auburn.edu 
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu
***
The information contained in this communication is confidential, is
intended only for the use of the recipient named above, and may be legally
privileged.

If the reader of this message is not the intended recipient, you are
hereby notified that any dissemination, distribution or copying of this
communication is strictly prohibited.

If you have received this communication in error, please resend this
communication to the sender and delete the original message or any copy
of it from your computer system.

Thank You.


___
Veritas-bu maillist  -  Veritas-bu@mailman.eng.auburn.edu
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu