<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Archives des backup db system - dbi Blog</title>
	<atom:link href="https://www.dbi-services.com/blog/tag/backup-db-system/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.dbi-services.com/blog/tag/backup-db-system/</link>
	<description></description>
	<lastBuildDate>Tue, 20 Dec 2022 17:03:13 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2025/05/cropped-favicon_512x512px-min-32x32.png</url>
	<title>Archives des backup db system - dbi Blog</title>
	<link>https://www.dbi-services.com/blog/tag/backup-db-system/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>DB Systems backup on ODA</title>
		<link>https://www.dbi-services.com/blog/db-systems-backup-on-oda/</link>
					<comments>https://www.dbi-services.com/blog/db-systems-backup-on-oda/#comments</comments>
		
		<dc:creator><![CDATA[Jérôme Dubar]]></dc:creator>
		<pubDate>Tue, 20 Dec 2022 17:03:12 +0000</pubDate>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[backup db system]]></category>
		<category><![CDATA[backup db-system]]></category>
		<category><![CDATA[backup dbsystem]]></category>
		<category><![CDATA[backup vm]]></category>
		<category><![CDATA[db-system]]></category>
		<category><![CDATA[dbsystem]]></category>
		<category><![CDATA[kvm backup]]></category>
		<category><![CDATA[ODA]]></category>
		<category><![CDATA[odacli backup-dbsystem]]></category>
		<category><![CDATA[Oracle database appliance]]></category>
		<category><![CDATA[X7-2HA]]></category>
		<category><![CDATA[X7-2M]]></category>
		<category><![CDATA[X7-2S]]></category>
		<category><![CDATA[x8-2ha]]></category>
		<category><![CDATA[x8-2m]]></category>
		<category><![CDATA[x8-2s]]></category>
		<category><![CDATA[X9-2HA]]></category>
		<category><![CDATA[X9-2L]]></category>
		<category><![CDATA[X9-2S]]></category>
		<guid isPermaLink="false">https://www.dbi-services.com/blog/?p=21153</guid>

					<description><![CDATA[<p>How to backup DB Systems on Oracle Database Appliance</p>
<p>L’article <a href="https://www.dbi-services.com/blog/db-systems-backup-on-oda/">DB Systems backup on ODA</a> est apparu en premier sur <a href="https://www.dbi-services.com/blog">dbi Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">Introduction</h2>



<p class="wp-block-paragraph">All Oracle Database Appliances running recent versions of the patch (19.1x) are now able to run bare metal databases, virtualized databases or both. A virtualized database is actually a single database in a dedicated VM called a DB System. This is exactly what you can find in OCI, the Oracle public cloud. This feature is very convenient to isolate databases in different networks, and dedicate a limited amount of memory and CPU resources. You may think that these DB Systems have a kind of backup command proposed by odacli, but it does not exist for now.</p>



<pre class="wp-block-code"><code>odacli -h | grep dbsystem | sort | uniq
		create-dbsystem
		delete-dbsystem
		describe-dbsystem
		describe-dbsystem-image
		list-dbsystems
		modify-dbsystem
		start-dbsystem
		stop-dbsystem
	dbsystem-image:
	dbsystem:</code></pre>



<p class="wp-block-paragraph">Is there a solution to make simple backups of these DB Systems? Let&#8217;s try to find out.</p>



<h2 class="wp-block-heading">DB Systems and storage</h2>



<p class="wp-block-paragraph">DB Systems use 2 kind of storages. A vdisk for the system itself, and ASM storage for data and recovery area. The ASM storage proposed in a DB System is nothing else than the ASM storage of your ODA, and it&#8217;s shared accross all VMs. ASM storage is only used for database files, and as you know you will backup your database using classic RMAN scripts or with odacli which rely on RMAN.</p>



<p class="wp-block-paragraph">There is no tool to backup the vdisk, the vdisk being an hidden file on this filesystem: /u05/app/sharedrepo/<code>hostname</code>. It&#8217;s not an issue not having backups of this vdisk because you would normally be able to restore the RMAN backup of your database on another DB System. DB System are not supposed to be tuned manually. The only operation that is normally supported is to modify the DB System with modify-dbsystem, mainly to change its shape (resources allocation).</p>



<p class="wp-block-paragraph">Most probably, nothing will never corrupt or destroy your DB System, but as you never know, it could be nice to do backups from time to time, just in case.</p>



<h2 class="wp-block-heading">Identifying the vdisk</h2>



<p class="wp-block-paragraph">Let&#8217;s list the DB Systems on my ODA:</p>



<pre class="wp-block-code"><code>odacli list-dbsystems
Name                  Shape       Cores  Memory      GI version          DB version          Status           Created                   Updated
--------------------  ----------  -----  ----------  ------------------  ------------------  ---------------  ------------------------  ------------------------
srvdb01               odb2        2      16.00 GB    19.16.0.0.220719    19.16.0.0.220719    CONFIGURED       2022-11-04 15:03:28 CET   2022-11-04 15:29:51 CET</code></pre>



<p class="wp-block-paragraph">Finding the associated vdisk of this unique DB System is quite easy:</p>



<pre class="wp-block-code"><code>odacli describe-dbsystem -n srvdb01 | grep "VM image"
            VM image path:  /u05/app/sharedrepo/srvdb01/.ACFS/snaps/vm_x9622f3fdf/x9622f3fdf</code></pre>



<p class="wp-block-paragraph">My DB System is running, so the vdisk is continuously updated:</p>



<pre class="wp-block-code"><code>ls -lrth /u05/app/sharedrepo/srvdb01/.ACFS/snaps/vm_x9622f3fdf/x9622f3fdf
-rw-r--r-- 1 qemu qemu 53G Dec 20 14:54 /u05/app/sharedrepo/srvdb01/.ACFS/snaps/vm_x9622f3fdf/x9622f3fdf

sleep 60 ; ls -lrth /u05/app/sharedrepo/srvdb01/.ACFS/snaps/vm_x9622f3fdf/x9622f3fdf
-rw-r--r-- 1 qemu qemu 53G Dec 20 14:55 /u05/app/sharedrepo/srvdb01/.ACFS/snaps/vm_x9622f3fdf/x9622f3fdf</code></pre>



<p class="wp-block-paragraph">A clean backup will first need stopping the DB System:</p>



<pre class="wp-block-code"><code>odacli stop-dbsystem -n srvdb01
odacli describe-dbsystem -n srvdb01 | grep "Current State"
            Current State:  OFFLINE</code></pre>



<h2 class="wp-block-heading">Backing up the vdisk</h2>



<p class="wp-block-paragraph">Now let&#8217;s copy the vdisk on a backup location. In this example I will use my ACFS recovery area volume but in real life it will probably be a NFS share:</p>



<pre class="wp-block-code"><code>cp /u05/app/sharedrepo/srvdb01/.ACFS/snaps/vm_x9622f3fdf/x9622f3fdf /u03/app/oracle/`date +"%Y%m%d_%H%M"`_srvdb01_vdisk.bck
</code></pre>



<p class="wp-block-paragraph">Let&#8217;s check if everything is OK with the copy:</p>



<pre class="wp-block-code"><code>md5sum /u03/app/oracle/20221220_1501_srvdb01_vdisk.bck
c00c5d1908eca913b5893c277540439b  /u03/app/oracle/20221220_1501_srvdb01_vdisk.bck

md5sum /u05/app/sharedrepo/srvdb01/.ACFS/snaps/vm_x9622f3fdf/x9622f3fdf
c00c5d1908eca913b5893c277540439b  /u05/app/sharedrepo/srvdb01/.ACFS/snaps/vm_x9622f3fdf/x9622f3fdf</code></pre>



<p class="wp-block-paragraph">Now I can start again my DB System:</p>



<pre class="wp-block-code"><code>odacli start-dbsystem -n srvdb01

odacli describe-dbsystem -n srvdb01 | grep "Current State"
            Current State:  ONLINE
</code></pre>



<h2 class="wp-block-heading">Destroying my DB System</h2>



<p class="wp-block-paragraph">Destroying systems and databases is always easy! Let&#8217;s connect to the DB System using its private IP:</p>



<pre class="wp-block-code"><code>odacli describe-dbsystem -n srvdb01 | grep "ASM:"
                      ASM:  192.168.17.4    / 255.255.255.128 / ens4 / BRIDGE(privasm) VLAN(priv0.100)

ssh 192.168.17.4
FIPS mode initialized
root@192.168.17.4's password:
Last login: Tue Dec 20 14:32:50 2022 from 192.168.17.2
ps -ef | grep pmon
oracle   19650     1  0 15:31 ?        00:00:00 ora_pmon_VDBITST
root     25612 25327  0 15:33 pts/0    00:00:00 grep --color=auto pmon</code></pre>



<p class="wp-block-paragraph">I will create a table before destroying the system:</p>



<pre class="wp-block-code"><code>su - oracle
. oraenv &lt;&lt;&lt; VDBITST
sqlplus / as sysdba
SQL&gt; create table before_the_crash as select sysdate "THE_DATE" from dual;

Table created.

SQL&gt; exit;

exit
</code></pre>



<p class="wp-block-paragraph">My database VDBITST is running fine, but it will end soon.</p>



<p class="wp-block-paragraph">Let&#8217;s destroy the / filesystem:</p>



<pre class="wp-block-code"><code>rm -rf /
rm: it is dangerous to operate recursively on '/'
rm: use --no-preserve-root to override this failsafe
rm -rf / --no-preserve-root
...
df -h
-bash: df: command not found
shutdown -h now
-bash: shutdown: command not found

exit
Connection to 192.168.17.4 closed by remote host.
Connection to 192.168.17.4 closed.</code></pre>



<p class="wp-block-paragraph">My DB System is not working correctly anymore. Let&#8217;s stop it from the ODA:</p>



<pre class="wp-block-code"><code>odacli stop-dbsystem -n srvdb01
odacli describe-dbsystem -n srvdb01 | grep "Current State"
            Current State:  ONLINE
sleep 30 ; odacli describe-dbsystem -n srvdb01 | grep "Current State"
            Current State:  ONLINE
sleep 30 ; odacli describe-dbsystem -n srvdb01 | grep "Current State"
            Current State:  ONLINE

odacli describe-job -i 7a450741-589a-4c6c-9f80-3888a52db91e

Job details
----------------------------------------------------------------
                     ID:  7a450741-589a-4c6c-9f80-3888a52db91e
            Description:  DB System srvdb01 stop
                 Status:  Running
                Created:  December 20, 2022 3:36:46 PM CET
                Message:

Task Name                                Start Time                          End Time                            Status
---------------------------------------- ----------------------------------- ----------------------------------- ----------
Stop DB System                           December 20, 2022 3:36:46 PM CET    December 20, 2022 3:36:46 PM CET    Running

odacli describe-job -i 7a450741-589a-4c6c-9f80-3888a52db91e

Job details
----------------------------------------------------------------
                     ID:  7a450741-589a-4c6c-9f80-3888a52db91e
            Description:  DB System srvdb01 stop
                 Status:  Success
                Created:  December 20, 2022 3:36:46 PM CET
                Message:

Task Name                                Start Time                          End Time                            Status
---------------------------------------- ----------------------------------- ----------------------------------- ----------
Stop DB System                           December 20, 2022 3:36:46 PM CET    December 20, 2022 3:46:50 PM CET    Success
</code></pre>



<p class="wp-block-paragraph">It took 10 minutes to shut down because odacli didn&#8217;t managed to do a clean stop, obviously.</p>



<h2 class="wp-block-heading">Restoring the DB System</h2>



<p class="wp-block-paragraph">Restoring the DB System is actually restoring the vdisk. So let&#8217;s copy back the clean vdisk image from my backup folder:</p>



<pre class="wp-block-code"><code>mv /u05/app/sharedrepo/srvdb01/.ACFS/snaps/vm_x9622f3fdf/x9622f3fdf /u05/app/sharedrepo/srvdb01/.ACFS/snaps/vm_x9622f3fdf/x9622f3fdf.old

cp /u03/app/oracle/20221220_1501_srvdb01_vdisk.bck /u05/app/sharedrepo/srvdb01/.ACFS/snaps/vm_x9622f3fdf/x9622f3fdf</code></pre>



<p class="wp-block-paragraph">Let&#8217;s then start again the DB System:</p>



<pre class="wp-block-code"><code>odacli start-dbsystem -n srvdb01
odacli describe-dbsystem -n srvdb01 | grep "Current State"
            Current State:  ONLINE</code></pre>



<p class="wp-block-paragraph">And finally, let&#8217;s connect to it and check if everything is OK:</p>



<pre class="wp-block-code"><code>ssh 192.168.17.4
FIPS mode initialized
root@192.168.17.4's password:
Last login: Tue Dec 20 14:32:50 2022 from 192.168.17.2
df -h
Filesystem                             Size  Used Avail Use% Mounted on
devtmpfs                               7.7G   16K  7.7G   1% /dev
tmpfs                                  7.8G     0  7.8G   0% /dev/shm
tmpfs                                  7.8G  8.7M  7.7G   1% /run
tmpfs                                  7.8G     0  7.8G   0% /sys/fs/cgroup
/dev/mapper/VolGroupVm-LogVolRoot       30G  3.5G   25G  13% /
/dev/mapper/VolGroupVm-LogVolOpt        25G  5.6G   18G  24% /opt
/dev/mapper/VolGroupVm-LogVolU01        99G   26G   68G  28% /u01
/dev/vda1                              942M  113M  765M  13% /boot
192.168.17.2:/opt/oracle/oak/pkgrepos   50G   38G  9.1G  81% /opt/oracle/oak/pkgrepos
tmpfs                                  1.6G     0  1.6G   0% /run/user/0

ps -ef | grep pmon
oracle   17286     1  0 15:58 ?        00:00:00 ora_pmon_VDBITST
root     18790 14644  0 15:58 pts/0    00:00:00 grep --color=auto pmon</code></pre>



<p class="wp-block-paragraph">It looks fine.</p>



<h2 class="wp-block-heading">What about my table?</h2>



<p class="wp-block-paragraph">Let&#8217;s check if the database is OK and if the table created before the crash but after the vdisk backup is still there:</p>



<pre class="wp-block-code"><code>su - oracle
. oraenv &lt;&lt;&lt; VDBITST
sqlplus / as sysdba
SQL&gt; select status from v$instance;

STATUS
------------
OPEN

SQL&gt; create table back_to_life as select sysdate "THE_DATE" from dual;

Table created.

SQL&gt; alter session set nls_date_format='YYYYMMDD HH24MI';

Session altered.

SQL&gt; select the_date from back_to_life;

THE_DATE
-------------
20221220 1600

SQL&gt; select the_date from before_the_crash;

THE_DATE
-------------
20221220 1536
</code></pre>



<p class="wp-block-paragraph">My DB System is back, and my database is OK. Data created after the vdisk backup was done is still there as expected.</p>



<h2 class="wp-block-heading">Conclusion</h2>



<p class="wp-block-paragraph">odacli may include a backup feature for the DB Systems in a future release. But for now, doing a cold backup of the vdisks from time to time is a nice solution.</p>
<p>L’article <a href="https://www.dbi-services.com/blog/db-systems-backup-on-oda/">DB Systems backup on ODA</a> est apparu en premier sur <a href="https://www.dbi-services.com/blog">dbi Blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbi-services.com/blog/db-systems-backup-on-oda/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/?utm_source=w3tc&utm_medium=footer_comment&utm_campaign=free_plugin

Page Caching using Disk: Enhanced 
Lazy Loading (feed)

Served from: www.dbi-services.com @ 2026-10-18 15:24:22 by W3 Total Cache
-->