| 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> |
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 3 | <html xmlns="http://www.w3.org/1999/xhtml"> |
| 4 | <head> |
| 5 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
| 6 | <title>Database upgrade</title> |
| 7 | <link rel="stylesheet" href="gettingStarted.css" type="text/css" /> |
| 8 | <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /> |
| 9 | <link rel="start" href="index.html" title="Berkeley DB Programmer's Reference Guide" /> |
| 10 | <link rel="up" href="am.html" title="Chapter 3. Access Method Operations" /> |
| 11 | <link rel="prev" href="am_truncate.html" title="Database truncation" /> |
| 12 | <link rel="next" href="am_verify.html" title="Database verification and salvage" /> |
| 13 | </head> |
| 14 | <body> |
| 15 | <div xmlns="" class="navheader"> |
| 16 | <div class="libver"> |
| 17 | <p>Library Version 11.2.5.3</p> |
| 18 | </div> |
| 19 | <table width="100%" summary="Navigation header"> |
| 20 | <tr> |
| 21 | <th colspan="3" align="center">Database upgrade</th> |
| 22 | </tr> |
| 23 | <tr> |
| 24 | <td width="20%" align="left"><a accesskey="p" href="am_truncate.html">Prev</a> </td> |
| 25 | <th width="60%" align="center">Chapter 3. |
| 26 | Access Method Operations |
| 27 | </th> |
| 28 | <td width="20%" align="right"> <a accesskey="n" href="am_verify.html">Next</a></td> |
| 29 | </tr> |
| 30 | </table> |
| 31 | <hr /> |
| 32 | </div> |
| 33 | <div class="sect1" lang="en" xml:lang="en"> |
| 34 | <div class="titlepage"> |
| 35 | <div> |
| 36 | <div> |
| 37 | <h2 class="title" style="clear: both"><a id="am_upgrade"></a>Database upgrade</h2> |
| 38 | </div> |
| 39 | </div> |
| 40 | </div> |
| 41 | <p> |
| 42 | |
| 43 | When upgrading to a new release of Berkeley DB, it may be necessary to |
| 44 | upgrade the on-disk format of already-created database files. |
| 45 | <span class="bold"><strong>Berkeley DB database upgrades are done in place, |
| 46 | and so are potentially destructive.</strong></span> This means that if |
| 47 | the system crashes during the upgrade |
| 48 | procedure, or if the upgrade procedure runs out of disk space, the |
| 49 | databases may be left in an inconsistent and unrecoverable state. To guard |
| 50 | against failure, the procedures outlined in the <a href="../upgrading/upgrade_process.html" class="olink">Upgrading Berkeley DB installations</a> chapter of the |
| 51 | Berkeley DB Installation and Build Guide should be carefully followed. If you are not performing |
| 52 | catastrophic archival as part of your application upgrade process, you |
| 53 | should at least copy your database to archival media, verify that your |
| 54 | archival media is error-free and readable, and that copies of your backups |
| 55 | are stored offsite! |
| 56 | </p> |
| 57 | <p> |
| 58 | The actual database upgrade is done using the <a href="../api_reference/C/dbupgrade.html" class="olink">DB->upgrade()</a> method, or by |
| 59 | dumping the database using the old version of the Berkeley DB software |
| 60 | and reloading it using the current version.</p> |
| 61 | <p>After an |
| 62 | upgrade, Berkeley DB applications must be recompiled to use the new |
| 63 | Berkeley DB library before they can access an upgraded database. |
| 64 | <span class="bold"><strong>There is no guarantee that applications compiled |
| 65 | against previous releases of Berkeley DB will work correctly with |
| 66 | an upgraded database format. Nor is there any guarantee that |
| 67 | applications compiled against |
| 68 | newer releases of Berkeley DB will work correctly with the previous |
| 69 | database format.</strong></span> We do guarantee that any archived database may |
| 70 | be upgraded using a current Berkeley DB software release and the |
| 71 | <a href="../api_reference/C/dbupgrade.html" class="olink">DB->upgrade()</a> method, and there is no need to step-wise upgrade the database |
| 72 | using intermediate releases of Berkeley DB. Sites should consider |
| 73 | archiving appropriate copies of their application or application sources if |
| 74 | they may need to access archived databases without first upgrading them. |
| 75 | </p> |
| 76 | </div> |
| 77 | <div class="navfooter"> |
| 78 | <hr /> |
| 79 | <table width="100%" summary="Navigation footer"> |
| 80 | <tr> |
| 81 | <td width="40%" align="left"><a accesskey="p" href="am_truncate.html">Prev</a> </td> |
| 82 | <td width="20%" align="center"> |
| 83 | <a accesskey="u" href="am.html">Up</a> |
| 84 | </td> |
| 85 | <td width="40%" align="right"> <a accesskey="n" href="am_verify.html">Next</a></td> |
| 86 | </tr> |
| 87 | <tr> |
| 88 | <td width="40%" align="left" valign="top">Database truncation </td> |
| 89 | <td width="20%" align="center"> |
| 90 | <a accesskey="h" href="index.html">Home</a> |
| 91 | </td> |
| 92 | <td width="40%" align="right" valign="top"> Database verification and salvage</td> |
| 93 | </tr> |
| 94 | </table> |
| 95 | </div> |
| 96 | </body> |
| 97 | </html> |