11-19-2014 09:58 AM
Geeks !
I have never worked on setting up the archive backup ,can you guide me setting up one.
All i have to do is to schedule the automatic run of archive backup to delete archive logs which which be on mount /archive_log on server sarchive
I need to backup logs older than 3 days and delete them.
Policy type will be standard and both master and client on solaris sparcx 64.
Can you please advise the setup.
bparchive -p archive_test -s test -L /tmp/archive -S master -t 0 -f /tmp/batra_test1
Thanks,
Pb
Solved! Go to Solution.
11-25-2014 04:03 AM
To add: bprachive takes -f filelist option, so why not...
Execute find command to populate filelist, then use it in the bparchive cmd?
find /my/archive/target -mtime +3 -ls > /tmp/my-archivelist
...
bparchive ........ -f /tmp/my-archivelist
Done.
jim
11-19-2014 11:11 AM
Have a look at the manpage for it:
http://www.symantec.com/business/support/index?page=content&id=HOWTO43638
Not sure if you can determine the age of the files.
You could run a find . -mtime script to find files older than 3 days, put them into an include file and back them up. then delete them after. You are then left with files of 3 days old. Then run a backup every 3 days to back up in the same manner (for example), that leaves that most recent 3 days of files on the system.
11-19-2014 12:21 PM
You will first need to make the policy that describes the client, backup selection and retention required for this data. Then you need to make a schedule of type "User Archive". This is the policy and schedule name you will call out with the bparchive command.
Here is the TECHNOTE about archive automation:
http://www.symantec.com/business/support/index?page=content&id=TECH28918
11-19-2014 11:17 PM
What kind of archive logs?
Anything to do with database archive logs?
If so - they should be handled by the database backup utilities, not NBU.
Archiving in NBU is a manual process and cannot be scheduled.
Best you can do is to script the process and automate it via cron as per revaroo's advice.
Use Unix 'find' command to list all files older than 3 days and add this to a file.
Use the file above with -f option to bparchive.
In your example, schedule 'test' must of User Archive type and there must be an open window to allow the User Archive.
/tmp/batra_test1 will contain the list of filenames produced by 'find' command.
11-24-2014 07:20 AM
They are oracle archive logs generated by many diffrent applications which we store at a single mount point.
Now we need to backups logs older than 3 dats to tape and delete them.
bparchive -p archive_test -s test -L /tmp/archive.txt -S stcssrybkp039 -t 0 /tmp/pranav_archive/*
Command is working fine and deleting all logs.
all i need is to setup this so it can only sort out logs older than 3 days and backup and delete them.
Can you please help in this ?
11-24-2014 07:29 AM
NOT a good idea to take care of Oracle archive logs like this!
Oracle dba's need to use RMAN scripts to backup and truncate (delete) archive logs.
revaroo has suggested 'find' command with -mtime. Have you tried that?
Use 'man find' to see online OS manual pages for find command.
Look at the difference between
-mtime 3
-mtime -3
-mtime +3
(These options and what they do may be slightly different between the various *nix OS's)
11-25-2014 03:58 AM
Netbackups Oracle agent can deal with archive logs as part of its scope, but its entirely possible you dont use it. The archived logs are nothing but a set of stand alone files, but you do need to consider with your DBA on how best to deal with them to ensure integrity of restore and recovery.
So yes netbackup can do the archive aka: backup and if successful delete but I recall this is not schedulable. But you can do it with a backup policy that backs up whatever it finds, and use an unrelated process eg in cron to do the delete, but you run the risk of deleting something that wasnt backed up. Or use a backup policy/schedule to automate backup and then after in the post script and on success of that backup run your delete script.
So many choices.
Jim
11-25-2014 04:03 AM
To add: bprachive takes -f filelist option, so why not...
Execute find command to populate filelist, then use it in the bparchive cmd?
find /my/archive/target -mtime +3 -ls > /tmp/my-archivelist
...
bparchive ........ -f /tmp/my-archivelist
Done.
jim