Hello Richard,
we have implemented something similar to what you want onto one of ours AIX
hosts.
We have two scripts - one for files backup and one for files deletion. Both
are invoked by crontab.
The backup script do dsmc incremental onto specific directory. In the
dsm.sys we have defined include/exclude and resoureutilization:
backup script:
LOGDIR=/dsmcOutputLogDirectory
LOGFILE=$LOGDIR/BackupLog.log
BACKUP_DIR1="/FilesToBackup/"
DSM_DIR=/usr/tivoli/tsm/client/ba/bin64
DSMC=$DSM_DIR/dsmc
DSM_LOG=/usr/tivoli/tsm/client
DSM_CONFIG=$DSM_DIR/dsmNode.opt
export DSM_CONFIG DSM_LOG DSM_DIR DSMC
$DSMC incremental "$BACKUP_DIR1" >> $LOGFILE
The script for deletions queries TSM for every single file (older than 7
days in our case) in the directory for successful backup. If the file
exists, then it's deleted. As far as the Oracle archive logs are with
unique filenames, this is a working solution.
deletion script:
WORKDIR="/BackedUpFiles/"
DSM_DIR=/usr/tivoli/tsm/client/ba/bin64
DSMC="$DSM_DIR/dsmc"
DSM_CONFIG="$DSM_DIR/dsmNode.opt"
FIND=/usr/bin/find
export DSM_CONFIG DSM_DIR
Delete( ) {
F=$1
echo "Checking $F ..."
$DSMC query backup $F -inactive
ERR=$?
if [ $ERR -ne 0 ]
then
echo "$F seems not to be backuped up. Could not be deleted!"
else
echo "Deleting $F... \c"
rm $F
echo "Done."
fi
}
for file in $($FIND $WORKDIR -mtime +7)
do
Delete "$file"
done
You can gather log file for the delete process by defining it in the
crontab
00 * * * * /del_script.sh >> /del_script.log
Not sure if this will help if you don't have enough space to hold the
archive logs.
Best Regards,
Maria
On Wed, Feb 22, 2017 at 10:27 PM, Rhodes, Richard L. <
rrhodes AT firstenergycorp DOT com> wrote:
> Our DBA's have scripts that backup their Oracle archive logs.
> It causes us pain.
>
> (AIX 7.1 with BA clients 6.4 and up)
>
> Their scripts run from cron every few minutes.
> If it finds archive logs, it processes as below:
>
> For each archive log (individual log file)
> run dsmc on the log file
> check dsmc output for whether it worked or failed
> delete the log file if backup worked
>
> So they process the log files one at a time on separate dsmc cmds.
>
> Now, if there are a bunch of files (30, 40, 100, or multiple 100's), it
> kicks into high
> gear and runs up to 8 dsmc cmds in parallel.
>
> What I'd like to know is, if they were to put all
> the log file names into a filelist, and run ONE dsmc cmd
> specifying the filelist along with -resourceutilization=10,
> will dsmc parallel some number of files concurrently back to
> the TSM server?
>
>
> The DBA's really, really want to get the archive logs
> off the server and into TSM ASAP! We have big Oracle
> servers that do several thousand TSM session per day
> with this processing.
>
>
> Note: all log files are in the same filesystem
>
>
>
> -----------------------------------------
>
> The information contained in this message is intended only for the
> personal and confidential use of the recipient(s) named above. If the
> reader of this message is not the intended recipient or an agent
> responsible for delivering it to the intended recipient, you are hereby
> notified that you have received this document in error and that any review,
> dissemination, distribution, or copying of this message is strictly
> prohibited. If you have received this communication in error, please notify
> us immediately, and delete the original message.
>
|