-
I have a script performing a cold backup on my Oracle 8i database on Windows 2000 server. The script calls a script that shuts down the database, copies the datafiles to a backup folder and starts up the database base. I need help making this script delete the old files in the folder before it starts the backup.
Can someone please show how to include this in my script.
Thanks
:)
-
-
Include this line in your script:
ho del filename;
-
If you want to delete ALL files in a directory then:
del /q /f C:\Path\to\some\dir\*
/q disables prompting when deleting all files.
/f forces deleting of read-only files.
--
Paul
-
Are you making sure that those files had been backedup before you delete?
Sam
Thanx
Sam
Life is a journey, not a destination!
-
Thanks everyone. I am testing it right now and it seems to be working. This is on my test server and these files are being picked up and backed up by TSM.
Thanks once again for your assistance.
:)
-
In the case of TSM why not use the TDP for Oracle and backup using the RMAN. That will save you space and backup things directly to the TSM. For deleting the archive logs after backup, rman provides the command "archivelog backup delete" (Check the syntax) and this will delete the archivelogs upon their successfull backup.
Why would you want to wast the time sitting and writing scripts to backup the database to the windows disk and then from disk to the TSM, when you can directly back up to TSM.
Sam
Thanx
Sam
Life is a journey, not a destination!
-
I do not know how to set up TSM to backup my db directly this is the only way I know to do this.
:)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|