You are on page 1of 1

Document 2568676.1 https://support.oracle.com/epmos/faces/DocumentDisplay?...

<HOSTNAME6>01vm02-vip 10800 IN A 192.0.2.35


<HOSTNAME6>01vm03-vip 10800 IN A 192.0.2.67
<HOSTNAME6>-scan1 10800 IN A 192.0.2.6
<HOSTNAME6>-scan2 10800 IN A 192.0.2.38
<HOSTNAME6>-scan3 10800 IN A 192.0.2.70
<HOSTNAME3> 10800 IN CNAME
<HOSTNAME1>.<CLOUD_IDENTIFIER>.oraclecloudatcustomer.com.
<HOSTNAME4> 10800 IN CNAME
<HOSTNAME1>.<CLOUD_IDENTIFIER>.oraclecloudatcustomer.com.
<HOSTNAME8> 10800 IN CNAME
<HOSTNAME2>.<CLOUD_IDENTIFIER>.oraclecloudatcustomer.com.
<HOSTNAME9> 10800 IN CNAME
<HOSTNAME10>.<CLOUD_IDENTIFIER>.oraclecloudatcustomer.com.

The ParseExtract.sh script was written to run in Linux and uses the BIND utility named-checkzone to validate the
generated BIND formatted file. This script can be modified to run into the OS and DNS system you have.

Before executing the contained scripts, please review Document 225559.1.

#!/bin/bash
#########################################################
# Copyright: 2019 by Oracle America,
Inc. All Rights Reserved.
# Purpose: Parses Oracle Cloud at
customer DNS extract file
# File: ParseExtract.sh
# Usage: ParseExtract.sh [ Input file ]
[ Domain ] [ Controldns1 ] \
# [ Controldns2 ] [ Output prefix ]
#
#########################################################
UPDATE_DATE='19-JUN-2019'
VERSION="1.0"
ECHO="/bin/echo -e "
DATE='date +%m%d%Y'
INPUTFILE=$1
DOMAIN=$2
DNSIP1=$3
DNSIP2=$4
PREFIX=$5
CHECKZONE=/usr/sbin/named-checkzone
version() {
$ECHO
$ECHO "Cloud at customer DNS Extract to
BIND Converter"
$ECHO "Copyright Oracle, Inc 2019"
$ECHO "Version $VERSION Dated
$UPDATE_DATE"
$ECHO
}
#########################################################
# usage_function ()
#########################################################
usage_function () {
$ECHO " Usage: 'basename $0' [ Input
file ] [ Domain ] [ Controldns1 ] [
Controldns2 ] [ Output prefix ] "
$ECHO " "
$ECHO " Input file : The OCC DNS
extract file from Oracle Support."
$ECHO " Domain : The name of the Cloud
at Customer Domain. "
$ECHO "Controldns1 Controldns2 : The IP
addresses of the Control DNS."
$ECHO " Output prefix : A name to be
prepended to the file _BIND_$2_$DATE.db
"
$ECHO " "
$ECHO "Example: 'basename $0' occ-
dns_export.conf

Стр. 6 из 11 18.10.2023, 10:03

You might also like