Home About BC DR HA Support Training Download
You are here: Home/ GlobalSysAdmin/ AIX/ Please Login or Register

-
Current Location
-

js
  GlobalSysAdmin
    AIX
-
AIX Admin Methodology
Global Consolidation Project
All AIX admins should join
www.aixexpert.com


Join our LinkedIn Group
AIX Advanced Technical Experts
Contract Opportunities

www.LinkedIn.com

-
digg Digg this page
del.icio.us Post to del.icio.us
Slashdot Slashdot it!


LPAR Leasing
Lease an AIX / i5 LPAR
Reduce your costs

www.mtxia.com

Server Leasing
Lease a Server off-site
Reduce your costs

www.mtxia.com

Data Center Automation
Business Continuity and DR
Virtualization/Consolidation

www.mtxia.com

HMC Service
Hardware Management Console
Manage Remote AIX / i5 LPARs

www.siteox.com

Business Web Site Hosting
$3.99 / month includes Tools,
Shopping Cart, Site Builder

www.siteox.com

Disaster Recovery
Small Business Oriented
Off-Site Facilities

www.mtxia.com

IBM pSeries / iSeries
Reduce your Costs
Off-Site Server Hosting

www.mtxia.com

Script Source Code for "cimage_migrate.ksh.orig"

This document contains the source code for the Disaster Recovery script "cimage_migrate.ksh.orig".



#!/bin/ksh

#### 
#### Check the time of day
#### If it is 1700 or later then schedule the script to begin execution
#### the next day at 0500
####  

if [[ `date +%H` -gt 16 ]]

	then
		echo /usr/local/scripts/cimage_migrate.ksh | at 5:00 am tomorrow
fi
#### 
#### Check to see if the COUNTER control file exists
#### If if exists, then user the value inside the COUNTER control file
#### If it does not exits, default to a COUNTER value of 10
#### 

if [[ -f /usr/local/scripts/counter ]]
	
	then
		count=`cat /usr/local/scripts/counter`

	else
		count=11
fi

# If the COUNTER value is less that 100 then execute the following lines

#if [[ ${count} -lt 100 ]]

while [[ ${count} -lt 100 ]]

do	
		/usr/lpp/adsm/bin/dsmmigrate -R -D /cimage/storage/arms/${count}*

#### 	
#### Check the time, if after 1600, then schedule script to execute
#### the next day at 0500 
#### 

		if [[ `date +%H` -gt 16 ]]
			
			then 
				echo /usr/local/scripts/cimage_migrate.ksh | at 5:00 am tomorrow
				print $((count = count + 1)) > /usr/local/scripts/counter
				kill $$
				exit 0
		fi

		print $((count = count + 1)) > /usr/local/scripts/counter

	else
	
		if [[ `date +%H` -gt 16 ]]
         
		               then 
                                echo /usr/local/scripts/cimage_migrate.ksh | at 5:00 am tomorrow
                               	print $((count = count + 1)) > /usr/local/scripts/counter 
				kill $$
                                exit 0
		fi

		count=10
		/usr/lpp/adsm/bin/dsmmigrate -R -D /cimage/storage/arms/${count}*
		print $((count = count + 1)) > /usr/local/scripts/counter
done

exit 0

This file last modified 11/02/10

-
Cimage Migration Script
-
 


LPAR Leasing
Lease an AIX / i5 LPAR
Reduce your costs

www.mtxia.com

Server Leasing
Lease a Server off-site
Reduce your costs

www.mtxia.com

Data Center Automation
Business Continuity and DR
Virtualization/Consolidation

www.mtxia.com

HMC Service
Hardware Management Console
Manage Remote AIX / i5 LPARs

www.siteox.com

Business Web Site Hosting
$3.99 / month includes Tools,
Shopping Cart, Site Builder

www.siteox.com

FREE Domain Registration
included with Web Site Hosting
Tools, Social Networking, Blog

www.siteox.com

Disaster Recovery
Small Business Oriented
Off-Site Facilities

www.mtxia.com

IBM pSeries / iSeries
Reduce your Costs
Off-Site Server Hosting

www.mtxia.com