2.10.2 Creating a Snapshot-Based Backup of Exadata X8 or Earlier Database Servers with Uncustomized Partitions

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

If you have not customized the database server partitions from their original shipped configuration, then use the procedures in this section to take a backup and use the backup to restore the database server using the backup.

Note:

  • The recovery procedure restores the exact partitions, including the name and sizes, as they were originally shipped. If you modified the partitions in any way, then you cannot use this procedure. Modifications include changing sizes, renaming, addition or removal of partitions.

  • All steps must be performed as the root user.

  1. Prepare a destination to hold the backup.

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

    1. Create a mount point for the NFS share.
      mkdir -p /root/tar
    2. Mount the NFS location.

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

      mount -t nfs -o rw,intr,soft,proto=tcp,nolock
      ip_address:/nfs_location/ /root/tar
      
  2. Take a snapshot-based backup of the / (root) and /u01 directories.
    1. Create a snapshot named root_snap for the root directory.

      LVDbSys1 is used in the example below, but you should use the value based on the output of imageinfo. If the active image is on LVDbSys2, then the command would be: lvcreate -L1G -s -c 32K -n root_snap /dev/VGExaDb/LVDbSys2.

      lvcreate -L1G -s -c 32K -n root_snap /dev/VGExaDb/LVDbSys1
    2. Label the snapshot.
      e2label /dev/VGExaDb/root_snap DBSYS_SNAP
      
    3. Determine the file system type of the / (root) and /u01 directories.
      • InfiniBand Network Fabric-based servers running Oracle Exadata System Software release 12.1.2.1.0 or later use the ext4 file system type.
      • InfiniBand Network Fabric-based servers running a release of Oracle Exadata System Software earlier than 12.1.2.1.0 use the ext3 file system type.
      • Exadata X5 servers or earlier server models that were updated to Oracle Exadata System Software release 12.1.2.1.0 or later also use ext3 file system type.
      # mount -l
      /dev/mapper/VGExaDb-LVDbSys1 on / type ext4 (rw) [DBSYS]
      ...
      
    4. Mount the snapshot.

      In the mount command below, filesystem_type_of_root_directory is a placeholder for the file system type as determined in the previous step.

      mkdir /root/mnt
      mount /dev/VGExaDb/root_snap /root/mnt -t filesystem_type_of_root_directory
    5. Create a snapshot named u01_snap for the /u01 directory.
      lvcreate -L5G -s -c 32K -n u01_snap /dev/VGExaDb/LVDbOra1
    6. Label the snapshot.
      e2label /dev/VGExaDb/u01_snap DBORA_SNAP
    7. Mount the snapshot.

      In the mount command below, filesystem_type_of_u01_directory is a placeholder for the file system type as determined in step 2.c above.

      mkdir -p /root/mnt/u01
      mount /dev/VGExaDb/u01_snap /root/mnt/u01 -t filesystem_type_of_u01_directory
    8. Change to the directory for the backup.
      cd /root/mnt
    9. 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:

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

        # 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
    10. Check the /tmp/backup_tar.stderr file for any significant errors.
      Errors about failing to archive open sockets, and other similar errors, can be ignored.
  3. Unmount the snapshots and remove the snapshots for the / (root) and /u01 directories.
    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.
    umount /root/tar