How to automatically copy archivelogs from ASM to local disc


This script will create folder on local disk, copy archivelogs of yesterday to this folder and compress folder with zip

#!/bin/bash
. /home/oracle/.bash_profile
cd /home/oracle/backup/rman/archivelogs/
mkdir `date -d "1 day ago" "+%Y_%m_%d"`
. /home/oracle/grid_env
for i in $(asmcmd ls +FRA/TESTDB/ARCHIVELOG/`date -d "1 day ago" "+%Y_%m_%d"`);
do asmcmd cp +FRA/TESTDB/ARCHIVELOG/`date -d "1 day ago" "+%Y_%m_%d"`/$i /home/oracle/backup/rman/archivelogs/`date -d "1 day ago" "+%Y_%m_%d"`;
done
zip -r `date -d "1 day ago" "+%Y_%m_%d"`.zip `date -d "1 day ago" "+%Y_%m_%d"`
rm -r `date -d "1 day ago" "+%Y_%m_%d"`

OCR üçün mirror diskgroup-un yaradılması, OCR backupın alınması


İlk olaraq Virtualbox-da 2 ədəd disk yaradırıq. Bunun üçün VirtualBoxManager-i açıb diski əlavə edəcəyimiz nod-lardan birini seçirik, daha sonra Settings->Storage->Create new disk seçirik:

Image

 

Continue reading “OCR üçün mirror diskgroup-un yaradılması, OCR backupın alınması”