Copy and Delete Dumpfiles from ASM to Local Filesystem Automatically
Hello Everyone, So someone ask you to create a script to take a logical backup of your database and store it in ASM. You decided to create an Export DataPump script that will: 1. Take a full export of the database to +FRA 2. Take a full metadata export of the database and store it in +FRA 3. Copy the dumpfiles in +FRA to your local disk (in case the ASM instace fails) 4. Delete old dumpfiles in +FRA and in the local disk if they are past the retention period. The script provided below will: 1. Perform export datapump and store the dumpfiles in ASM 2. The dumpfiles stored in ASM will be copied to the local disk. The script will read the logfile generated by the export job. If you will take a look at the end of the export logfile, you will see there the list of dumpfiles generated, we just need to extract these string and process it using Unix scripts. Then we can form an ASMCMD command from here. When running ASMCMD command, just make sure you switch to the GRID environmen...