Exadata Taking a Snapshot-based Backup

Taking a Snapshot-based Backup

The following procedure describes how to take a snapshot-based backup. The values shown in the procedure are examples.

1.Prepare a destination to hold the backup, as follows. The destination can be a large, writable NFS location. The NFS location should be large enough to hold the backup tar files. For uncustomized partitions, 145 GB should be adequate.

a.Create a mount point for the NFS share using the following command:

mkdir -p /root/tar

b.Mount the NFS location using the following command:

mount -t nfs -o ro,intr,soft,proto=tcp,nolock ip_address:/nfs_location/ /root/tar

In the preceding command, ip_address is the IP address of the NFS server, and nfs_location is the NFS location.

2.Take a snapshot-based backup of the / (root), /u01, and /boot directories, as follows:

a.Create a snapshot named root_snap for the root directory using the following command:

lvcreate -L1G -s -n root_snap /dev/VGExaDb/LVDbSys1

b.Label the snapshot using the following command:

e2label /dev/VGExaDb/root_snap DBSYS_SNAP

c.Mount the snapshot using the following commands:

mkdir /root/mnt

mount /dev/VGExaDb/root_snap /root/mnt -t ext3

d.Create a snapshot named u01_snap for the /u01 directory using the following command:

lvcreate -L5G -s -n u01_snap /dev/VGExaDb/LVDbOra1

e.Label the snapshot using the following command:

e2label /dev/VGExaDb/u01_snap DBORA_SNAP

f.Mount the snapshot using the following commands:

mkdir -p /root/mnt/u01

mount /dev/VGExaDb/u01_snap /root/mnt/u01 -t ext3

g.Change to the directory for the backup using the following command:

cd /root/mnt

h.Create the backup file using one of the following commands:

–System does not have NFS mount points:

# tar -pjcvf /root/tar/mybackup.tar.bz2 * /boot –exclude \

tar/mybackup.tar.bz2 > /tmp/backup_tar.stdout 2> /tmp/backup_tar.stderr

–System has NFS mount points:

# tar -pjcvf /root/tar/mybackup.tar.bz2 * /boot –exclude \

tar/mybackup.tar.bz2 –exclude nfs_mount_points > \

/tmp/backup_tar.stdout 2> /tmp/backup_tar.stderr

In the preceding command, nfs_mount_points are the NFS mount points. Excluding the mount points prevents the generation of large files and long backup times.

i.Check the /tmp/backup_tar.stderr file for any significant errors. Errors about failing to tar open sockets, and other similar errors, can be ignored.

3.Unmount the snapshots and remove the snapshots for the root and /01 directories using the following commands:

cd /

umount /root/mnt/u01

umount /root/mnt

/bin/rm -rf /root/mnt

lvremove /dev/VGExaDb/u01_snap

lvremove /dev/VGExaDb/root_snap

4.Unmount the NFS share using the following command:

umount /root/tar

Sobre Alexandre Pires

ORACLE OCS Goldengate Specialist, OCE RAC 10g R2, OCP 12C, 11g, 10g , 9i e 8i - Mais de 25 anos de experiência na área de TI. Participei de projetos na G&P alocado na TOK STOK, EDINFOR alocado na TV CIDADE "NET", 3CON Alocado no PÃO DE AÇUCAR, DISCOVER alocado na VIVO, BANCO IBI e TIVIT, SPC BRASIL, UOLDIVEO alocado no CARREFOUR e atualmente na ORACLE ACS atendendo os seguintes projetos: VIVO, CLARO, TIM, CIELO, CAIXA SEGUROS, MAPFRE, PORTO SEGURO, SULAMERICA, BRADESCO SEGUROS, BANCO BRADESCO, BASA, SANTANDER, CNJ, TSE, ELETROPAULO, EDP, SKY, NATURA, ODEBRESHT, NISSEI, SICREDI, CELEPAR, TAM, TIVIT, IBM, SMILES, CELEPAR, SERPRO,OKI,BANCO PAN, etc
Esse post foi publicado em EXADATA. Bookmark o link permanente.

Deixe um comentário