Oracle ODA Virtual Machines Backup

 

In this post, I will share one of the most important script you can use for backup ODA Virtual Machines and also you can use this backups for cloning Virtual Machines.

Before running this script in your own environment, please make sure that all the directories and environments are correct.

Here is the script with explain plan.

 

  1. Change the general Environment directories and names
  2. Change environment for your each Virtual Machine
  3. Below 3 lines are creating snapshot, tar that snapshot files and delete snapshot
  4. Create one “include”  file for each vm, this file will be including snapshot directory path

Note : You can also create Virtual Disk backup with the same script, Just paste Vİrtual disk names into the environments and commands

#######01 – General Environment ######################

BASE_DIR=/NAS/ITTUTORIAL/VMBACKUP
Tarih=`date ‘+%d_%m_%Y’`
BACKUP_DIR=/NAS/ITTUTORIAL/VMBACKUP/$Tarih
mkdir -p $BACKUP_DIR

####### 02 – Virtual Machine Environment ################

BACKUP_NAME=APPLICATION_VM_01
INCLUDE_FILE=$BASE_DIR/scripts/INC_${BACKUP_NAME}_include.lst

###### 03 – Virtual Machine Backup Commands ############

syntax : acfsutil snap create -p <virtualmachinename> <nameofthesnapshot> <snapshotdirectory>

 

acfsutil snap create -p APPLICATION_VM_01 APPLICATION_VM_01_snap /u01/app/sharedrepo/vm_data

tar -cpzvf $BACKUP_DIR/$BACKUP_NAME.tar.gz –files-from=$INCLUDE_FILE

acfsutil snap delete APPLICATION_DATA_snap /u01/app/sharedrepo/vm_data

##### 04 – INCLUDE FILE  ############################

# cat /NAS/ITTUTORIAL/VMBACKUP/scripts/INC_APPLICATION_VM_01_include.lst

/u01/app/sharedrepo/vm_data/.ACFS/snaps/APPLICATION_VM_01_snap

 

 

Cihan Gedik

I am currently working as Senior Oracle Application Database Administrator. I have experienced many EBS database upgrade, migrations, Fresh EBS installations, Solaris to Linux, Windows to Linux replatform migration projects in medium and large companies and also experienced core database migration projects for one of the biggest bank of Katar. With my colleagues we decided to run this platform to share our knowledge and also create network in all over the world.