{"id":267,"date":"2024-11-25T21:48:10","date_gmt":"2024-11-25T21:48:10","guid":{"rendered":"https:\/\/test5.samplewebsitelink.com\/cassandra\/?p=267"},"modified":"2024-12-02T20:49:36","modified_gmt":"2024-12-02T20:49:36","slug":"azure-blob-storage-for-oracle-rman-backups","status":"publish","type":"post","link":"https:\/\/test5.samplewebsitelink.com\/cassandra\/2024\/11\/25\/azure-blob-storage-for-oracle-rman-backups\/","title":{"rendered":"Azure Blob Storage for Oracle RMAN Backups."},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"267\" class=\"elementor elementor-267\" data-elementor-post-type=\"post\">\n\t\t\t\t<div class=\"elementor-element elementor-element-c66518d e-flex e-con-boxed e-con e-parent\" data-id=\"c66518d\" data-element_type=\"container\" data-settings=\"{&quot;background_background&quot;:&quot;classic&quot;}\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t<div class=\"elementor-element elementor-element-6d54d2e e-con-full e-flex e-con e-child\" data-id=\"6d54d2e\" data-element_type=\"container\">\n\t\t<div class=\"elementor-element elementor-element-eb85fe8 e-flex e-con-boxed e-con e-child\" data-id=\"eb85fe8\" data-element_type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-551fe7a elementor-widget elementor-widget-heading\" data-id=\"551fe7a\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h1 class=\"elementor-heading-title elementor-size-default\">Azure Blob Storage for Oracle RMAN Backups.<\/h1>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-542f708 e-flex e-con-boxed e-con e-parent\" data-id=\"542f708\" data-element_type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-9611f92 elementor-widget elementor-widget-text-editor\" data-id=\"9611f92\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>Azure provides a very powerful open source-based feature for its IaaS Linux based VM\u2019s. It is called <a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/storage\/blobs\/storage-how-to-mount-container-linux\">BlobFuse for Azure<\/a>.<\/p><p>With BlobFuse for Azure installed on your Linux VM, Blob \u00a0storage can be presented to a Linux- based VM as a file system. Why is Blob \u00a0storage of interest to the Oracle DBA? It is cheap, plentiful, sturdy, and remote storage for archival backup. 500 Terabytes of Azure GRS Blob storage is around $2300\/month list price. This will give you great redundancy and durability to supplement the near online backups that would be utilized for most restore events except the most grievous. Ideally, you\u2019ll never want to have to go to your \u2018off site\u2019 RMAN backups but having them can be a career and even company saving long term strategy. Stuff breaks &#8211;sometimes quite badly.<\/p><p>Oracle OCI approaches provisioning this type of storage differently. They have created a special SBT type driver that masquerades their \u00a0\u00a0BLOB storage as an RMAN tape device. \u2013 another driver\/library to support. With Azure \u00a0BlobFuse, the RMAN target device type remains disk. To this humble DBA, It seems a simpler, \u00a0more simpler, more maintainable backup software stack can be achieved with \u00a0BlobFuse. Yum can maintain \u00a0BlobFuse while SBT tape library driver management is a manual process.<\/p><p>\u00a0BlobFuse is installed via the rpm RPM Utility for the Fedora\/RedHat\/OEL branch of Linux. A number of dependencies need to be installed first. Here is an example for a Fedora based Linux install.<\/p><p>First, these library dependencies need to be pre-installed:<\/p><p>sudo yum install git cmake fuse-devel libcurl-devel gcc gcc-c++ gnutls-devel libgcrypt-devel libuuid-devel boost-devel fuse -y<\/p><p>And then the actual rpm RPM for blobfuseBlobFuse:<\/p><p>rpm -i \u00a0BlobFuse-1.4.3-RHEL-7.8-x86_64.rpm<\/p><p>warning: \u00a0BlobFuse-1.4.3-RHEL-7.8-x86_64.rpm: Header V4 RSA\/SHA256 Signature, key ID be1229cf: NOKEY<\/p><p>Confirm installation:<\/p><p>yum install \u00a0BlobFuse fuse<\/p><p>Loaded plugins: langpacks, ulninfo<\/p><p>Package matching \u00a0BlobFuse-1.4.1-1.el8.x86_64 already installed. Checking for update.<\/p><p>Package fuse-2.9.4-1.0.9.el7.x86_64 already installed and latest version<\/p><p>(Your particular RPM\u2019s and versions will vary based on the Linux flavor and version.)<\/p><p>Once installed a command like the following below ephemerally mounts the container as a file system. I\u2019ve pre- created the directory\/mount point \u00a0\/mnt\/BlobFusetemp:<\/p><p>BlobFuse\u00a0\u00a0 \/BlobFuse\u00a0 &#8211;tmp-path=\/mntBlobFusetmp -o attr_timeout=240 -o entry_timeout=240 -o negative_timeout=120 &#8211;\u2013config-file=.\/connection.cfg &#8211;\u2013log-level=LOG_DEBUG &#8211;\u2013file-cache-timeout-in-seconds=120.<\/p><p>Here are the contents of the connection.cfg file. This has account and security specific information in it.<\/p><p>Connection.cfg:<\/p><p>accountName bjltest<\/p><p>authType SAS<\/p><p>sasToken sp=racwdlmeop&amp;st=2022-05-25T15:25:56Z&amp;se=2022-05-25T23:25:56Z&amp;spr=https&amp;sv=2020-08-04&amp;sr=c&amp;sig=XAXL4i7urPOv0KNSBhII8bGmtp4wNsW4B9tPZ9Wn4PQ%3D<\/p><p>containerName bjltest<\/p><p>Once this is configured, we can check and see if our mount is working.<\/p><p>touch \/blobfuseBlobFuse\/foo<\/p><p>[root@swingbench2 tmp]# ls \/blobfuseBlobFuse<\/p><p>foo<\/p><p>Now we can persist this mount through reboots by configuring the following in \/etc\/fstab:<\/p><p>blobfuseBlobFuse \/blobfuseBlobFuse fuse delay_connect,defaults,_netdev,&#8211;tmp-path=\/home\/azureuser\/tmppath,&#8211;config-file=\/home\/oracle\/connection.cfg,&#8211;log-level=LOG_DEBUG,allow_other 0 0<\/p><p>This script will run each time as fstab is evaluated during boot or mount commands.<\/p><p>We can now configure RMAN to use Blob \u00a0storage via this file system we have created to interface to it. Again, in RMAN our device type will be DISK not SBT. This is very straight forward as the default target type is disk.<\/p><p>RMAN&gt; connect target \/<\/p><p>connected to target database: SWING1 (DBID=1694798414)<\/p><p>RMAN&gt; show all<\/p><p>2&gt; ;<\/p><p>using target database control file instead of recovery catalog<\/p><p>RMAN configuration parameters for database with db_unique_name SWING1 are:<\/p><p>CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default<\/p><p>CONFIGURE BACKUP OPTIMIZATION OFF; # default<\/p><p>CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default<\/p><p>CONFIGURE CONTROLFILE AUTOBACKUP ON; # default<\/p><p>CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO &#8216;%F&#8217;; # default<\/p><p>CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default<\/p><p>CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default<\/p><p>CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default<\/p><p>CONFIGURE MAXSETSIZE TO UNLIMITED; # default<\/p><p>CONFIGURE ENCRYPTION FOR DATABASE OFF; # default<\/p><p>CONFIGURE ENCRYPTION ALGORITHM &#8216;AES128&#8217;; # default<\/p><p>CONFIGURE COMPRESSION ALGORITHM &#8216;BASIC&#8217; AS OF RELEASE &#8216;DEFAULT&#8217; OPTIMIZE FOR LOAD TRUE ; # default<\/p><p>CONFIGURE RMAN OUTPUT TO KEEP FOR 7 DAYS; # default<\/p><p>CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default<\/p><p>CONFIGURE SNAPSHOT CONTROLFILE NAME TO &#8216;\/u01\/app\/oracle\/product\/19.0.0\/dbhome_1\/dbs\/snapcf_SWING1.f&#8217;; # default<\/p><p>We next set the RMAN default device type to DISK (in this case it already was).<\/p><p>\u2026.<\/p><p>RMAN&gt; CONFIGURE DEFAULT DEVICE TYPE TO DISK;<\/p><p>new RMAN configuration parameters:<\/p><p>CONFIGURE DEFAULT DEVICE TYPE TO DISK;<\/p><p>new RMAN configuration parameters are successfully stored<\/p><p>Then we specify our target format and destination:<\/p><p>RMAN&gt; CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT &#8216;\/mnt\/BlobFusetmp\/%U&#8217;;<\/p><p>new RMAN configuration parameters:<\/p><p>CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT\u00a0\u00a0 &#8216;\/mnt\/BlobFusetmp\/%U&#8217;;<\/p><p>new RMAN configuration parameters are successfully stored<\/p><p>Here we have set the device type disk to place files on the \/mnt\/BlobFuse filesystem and to include time\/data stamp information (%U).<\/p><p>Now we can execute an Oracle backup to Azure Blob storage via RMAN.<\/p><p>Here is the simplest of all RMAN backups:<\/p><p>backup database;<\/p><p>Starting backup at 25-MAY-22<\/p><p>allocated channel: ORA_DISK_1<\/p><p>channel ORA_DISK_1: SID=10735 device type=DISK<\/p><p>channel ORA_DISK_1: starting full datafile backup set<\/p><p>channel ORA_DISK_1: specifying datafile(s) in backup set<\/p><p>input datafile file number=00003 name=\/oradata1\/swing1\/undo_01.dbf<\/p><p>input datafile file number=00001 name=\/oradata1\/swing1\/system1.dbf<\/p><p>input datafile file number=00002 name=\/oradata1\/swing1\/sysaux1.dbf<\/p><p>input datafile file number=00004 name=\/oradata1\/swing1\/user01.dbf<\/p><p>channel ORA_DISK_1: starting piece 1 at 25-MAY-22<\/p><p>channel ORA_DISK_1: finished piece 1 at 25-MAY-22<\/p><p>piece handle=\/mnt\/BlobFusetmp\/010ude7o_1_1 tag=TAG20220525T180752 comment=NONE<\/p><p>channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01<\/p><p>Finished backup at 25-MAY-22<\/p><p>Starting Control File Autobackup at 25-MAY-22<\/p><p>piece handle=\/u01\/app\/oracle\/product\/19.0.0\/dbhome_1\/dbs\/c-1694798414-20220525-00 comment=NONE<\/p><p>Finished Control File Autobackup at 25-MAY-22<\/p><p>Here are the files on the BLOB mount point:<\/p><p>df<\/p><p>Filesystem\u00a0\u00a0\u00a0\u00a0\u00a0 1K-blocks\u00a0\u00a0\u00a0\u00a0 Used\u00a0 Available Use% Mounted on<\/p><p>devtmpfs\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 8122612\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 0\u00a0\u00a0\u00a0 8122612\u00a0\u00a0 0% \/dev<\/p><p>tmpfs\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 8133424\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 0\u00a0\u00a0\u00a0 8133424\u00a0\u00a0 0% \/dev\/shm<\/p><p>tmpfs\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 8133424\u00a0\u00a0\u00a0\u00a0 9340\u00a0\u00a0\u00a0 8124084\u00a0\u00a0 1% \/run<\/p><p>tmpfs\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 8133424\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 0\u00a0\u00a0\u00a0 8133424\u00a0\u00a0 0% \/sys\/fs\/cgroup<\/p><p>\/dev\/sda2\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 30431232 23108940\u00a0\u00a0\u00a0 5709396\u00a0 81% \/<\/p><p>\/dev\/sda1\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 508588\u00a0\u00a0 244212\u00a0\u00a0\u00a0\u00a0 264376\u00a0 49% \/boot<\/p><p>\/dev\/sda15\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 506608\u00a0\u00a0\u00a0 \u00a07664\u00a0\u00a0\u00a0\u00a0 498944\u00a0\u00a0 2% \/boot\/efi<\/p><p>\/dev\/sdb1\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 77275908\u00a0 2150432\u00a0\u00a0 71177036\u00a0\u00a0 3% \/mnt\/resource<\/p><p>tmpfs\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 1626688\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 0\u00a0\u00a0\u00a0 1626688\u00a0\u00a0 0% \/run\/user\/54321<\/p><p>tmpfs\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 16777216\u00a0\u00a0 710960\u00a0\u00a0 16066256\u00a0\u00a0 5% \/mnt\/BlobFusetmp<\/p><p>\/dev\/sdc1\u00a0\u00a0\u00a0\u00a0\u00a0 2113645484\u00a0 5833748 2000421224\u00a0\u00a0 1% \/oradata1<\/p><p>[oracle@swingbench2 dbs]$ cd \/mnt\/BlobFusetmp\/<\/p><p>[oracle@swingbench2 BlobFusetmp]$ ls -lrt<\/p><p>total 710960<\/p><p>drwxrwx&#8212;. 2 root\u00a0\u00a0 root\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 40 May 25 15:35 root<\/p><p>-rw-r&#8212;&#8211;. 1 oracle asmadmin 728023040 May 25 18:07 010ude7o_1_1<\/p><p>So that is how (relatively) easy it is to utilize Azure Blob storage for RMAN based Oracle backups. Once BlobFuse is configured the familiar RMAN interface and features take over. Having an out of region backup for true disaster recovery (DR)DR is a real necessity for any mission critical app. This architecture provides a cost-effective means to do so.<\/p><p>The idea is to have your near online backups and archivelogarchive log files on the very fast, capable such as premium or ultra disk but to store backups on cheaper storage. . Ideally there will be two different Silk Data Pods for supporting a DataGuard installation. The suspenders to the belt is the Aazure Bblob storage that gets your backed up data to another system and gegraphic region.<\/p><p>Conclusion:<\/p><p>It is is great to have a backup of your database available on durable media remote from your primary site. This is an ideal cost effective way to get your data into an Azure multi-region resiliency mode for cheap money. An ideal \u201cbelt and suspenders\u201d solution though would provision a 3rd third Oracle server to serve as the second standby cascading out of the first. The first would be in synchronous mode and the standby would span into another availability zone. Active DataGuard would be used for some reporting and &#8212; most key&#8211; the backup would take place from this server. Ideally an asynchronous DataGuard configuration would cascade off this first standby and be located in another Azure region. There are however significant costs associated with that. The RMAN backup to regionally replicated object storage is significantly less costly and gives a good degree of durability. The cost of recovery time RTO will be higher but day to day operating costs much less.<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Azure provides a very powerful open source-based feature for its IaaS Linux based VM\u2019s. It is called BlobFuse for Azure. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":30,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[1],"tags":[],"class_list":["post-267","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/test5.samplewebsitelink.com\/cassandra\/wp-json\/wp\/v2\/posts\/267","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/test5.samplewebsitelink.com\/cassandra\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/test5.samplewebsitelink.com\/cassandra\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/test5.samplewebsitelink.com\/cassandra\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/test5.samplewebsitelink.com\/cassandra\/wp-json\/wp\/v2\/comments?post=267"}],"version-history":[{"count":7,"href":"https:\/\/test5.samplewebsitelink.com\/cassandra\/wp-json\/wp\/v2\/posts\/267\/revisions"}],"predecessor-version":[{"id":372,"href":"https:\/\/test5.samplewebsitelink.com\/cassandra\/wp-json\/wp\/v2\/posts\/267\/revisions\/372"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/test5.samplewebsitelink.com\/cassandra\/wp-json\/wp\/v2\/media\/30"}],"wp:attachment":[{"href":"https:\/\/test5.samplewebsitelink.com\/cassandra\/wp-json\/wp\/v2\/media?parent=267"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/test5.samplewebsitelink.com\/cassandra\/wp-json\/wp\/v2\/categories?post=267"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/test5.samplewebsitelink.com\/cassandra\/wp-json\/wp\/v2\/tags?post=267"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}