Ask the Community
Groups
Oracle Database Backups Fail Due to "cp: cannot stat `/usr/bp/mnt/<user_directory>': No such file or directory - Connect IT Community | Kaseya
<main> <article class="userContent"> <h2 data-id="summary"><strong>SUMMARY</strong></h2> <p>Oracle backups fail due to local mounted directory (/usr/bp/mnt/</p><h2 data-id="issue"><strong>ISSUE</strong></h2> <p>Oracle backups fail due to local mounted directory (/usr/bp/mnt/<oracle_db_name>/<backup_type>.task) cannot be found. For Instance, customer has an Oracle database called 'test', and we are running a full backup on that database. Error in rae logs would indicate (note: <i>n</i>=the backup number that failed):<br><br>[LOG4] pghelper.c:1861: Executing query with text: SELECT status FROM bp.jobs WHERE job_no = <i>n</i><br>[LOG4] pghelper.c:1247: row 0, col 0(status): '512'<br>[LOG4] pghelper.c:1861: Executing query with text: SELECT status FROM bp.jobs WHERE job_no = <i>n</i><br>[LOG4] pghelper.c:1247: row 0, col 0(status): '512'<br>[LOG4] [methods.c:134] Reading complete. Read 83 bytes<br>[LOG0] [methods.c:597] Command "(no description)" completed with exit code 1<br>[LOG0] [methods.c:604] Details:<br>Method: BP-Proto<br>Execute: cp -f /usr/bp/mnt/test/oracle_full.<i>n</i>.task /tmp/oracle_full.<i>n</i>.task<br>Output:<br>cp: cannot stat `/usr/bp/mnt/test/oracle_full.<i>n</i>.task': No such file or directory<br> </p> <h2 data-id="resolution"><strong>RESOLUTION</strong></h2> <p>Perform the following steps to add fsid=0 to the exportfs command in the /usr/bp/bpinit/rae.conf.d/utilities.conf file: </p> <ol><li>Save current file:</li></ol><pre class="code codeBlock" spellcheck="false" tabindex="0"> cp /usr/bp/bpinit/rae.conf.d/utilities.conf /usr/bp/bpinit/rae.conf.d/utilities.conf.orig</pre> <ol start="2"><li>Open /usr/bp/bpinit/rae.conf.d/utilities.conf for editing:</li></ol><pre class="code codeBlock" spellcheck="false" tabindex="0"> vi /usr/bp/bpinit/rae.conf.d/utilities.conf</pre> <ol start="3"><li>Search for 'exportfs:</li></ol><pre class="code codeBlock" spellcheck="false" tabindex="0"> /exportfs</pre> <ol start="4"><li>Line before change:</li></ol><pre class="code codeBlock" spellcheck="false" tabindex="0"> <Execute>exportfs -o rw,all_squash,anonuid=0,anongid=0 ${ClientName}:${SharePath}</Execute></pre> <ol start="5"><li>Line after change:</li></ol><pre class="code codeBlock" spellcheck="false" tabindex="0"> <Execute>exportfs -o rw,all_squash,anonuid=0,anongid=0,fsid=0 ${ClientName}:${SharePath}</Execute></pre> <ol start="6"><li>Save the file:</li></ol><pre class="code codeBlock" spellcheck="false" tabindex="0"> :wq!</pre> <ol start="7"><li>Restart nfs service on Oracle if stale </li> <li>Run a full backup of the Oracle Database</li> </ol><h2 data-id="cause"><strong>CAUSE</strong></h2> <p>The issue occurs because we are not cleanly unmounting the NFS share, and causing a stale mount. The fix will properly mount and unmount the NFS share used for Oracle database backups.</p> </article> </main>