Veritas-bu

[Veritas-bu] ARchiving Old Data

2005-12-06 11:35:55
Subject: [Veritas-bu] ARchiving Old Data
From: dave.markham AT fjserv DOT net (Dave Markham)
Date: Tue, 06 Dec 2005 16:35:55 +0000
I have read the threads here and no-one has mentioned the simple 
scripting technique.

I use bparchive quite a bit to archive logs and other things older than 
x days on various servers. If its any use this is how i do things using 
netbackup and solaris.

Netbackup :-

Standard policy with a volume pool of log_archive

A schedule of type User_Archive with a long retention period and using 
log_archive tape pool

Have a backup window of 2200 -> 1200am

No backup selections and all clients added i want to be able to archive data


Clients :-

On each client i have a simple shell script called from cron each night 
around 11pm.
This simply finds files older than x amount of time and puts them in a 
list to be archived.
Then if the list is > 0 bytes it invokes bparchive with the file list.
This then backs files up to tape and removes them from the server 
automatically.
Its a fully automated system and reports through netbackup as a separate 
job. I find it very useful for archiving of data to tape and removing 
from server in the same go.

Example of the dead simple shell script to use :-



#!/bin/sh
WR=/usr/openv/netbackup/bin
hostname=`hostname`

#########################################################
#
# Make sure to check when directing find command to file.
# >> /tmp/cout is to be DELETED
# >> /tmp/fout is to be ARCHIVED TO TAPE
#
#########################################################


 > /tmp/fout
 > /tmp/cout

#archive files
find /opt/HTTPD/logs/access_log* -type f -mtime +30 >> /tmp/fout 2>/dev/null
find /opt/HTTPD/logs/error_log* -type f -mtime +30 >> /tmp/fout 2>/dev/null
find /opt/HTTPD/logs/error-ssl_log* -type f -mtime +30 >> /tmp/fout 
2>/dev/null
find /var/audit/*$hostname -type f -mtime +14 |grep -v not >> /tmp/fout 
2>/dev/null

# Delete files older than 30 days in tmp
find /tmp/ -mtime +30 -type f >> /tmp/cout


if [ -s /tmp/cout ];then
        cat /tmp/cout | xargs rm
fi

if [ -s /tmp/fout ];then
        $WR/bparchive -L /var/log/arch.log -f /tmp/fout
fi




WEAVER, Simon wrote:

> Guys
> Does NBU 5.x or later provide a facility to ARCHIVE OLD Data? For 
> example, if we have data unused since 2003, is there a way I can tell 
> NBU to move this data off to another drive or SAN?
>  
> Any input is appreciated?
>  
>
> *Simon Weaver*
> *Technical Support*
> *Windows Domain Administrator*
>
> */EADS Astrium/*
> */Tel: 02392-708598/*
>
> *Email: Simon.Weaver AT Astrium.eads DOT net*
>
>  
> This email is for the intended addressee only.
> If you have received it in error then you must not use, retain, 
> disseminate or otherwise deal with it.
> Please notify the sender by return email.
> The views of the author may not necessarily constitute the views of 
> EADS Astrium Limited.
> Nothing in this email shall bind EADS Astrium Limited in any contract 
> or obligation.
>
> EADS Astrium Limited, Registered in England and Wales No. 2449259
> Registered Office: Gunnels Wood Road, Stevenage, Hertfordshire, SG1 
> 2AS, England
>


<Prev in Thread] Current Thread [Next in Thread>