<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Global Database Settings — Bcfg2 1.3.0 documentation</title> <link rel="stylesheet" href="../_static/default.css" type="text/css" /> <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT: '../', VERSION: '1.3.0', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true }; </script> <script type="text/javascript" src="../_static/jquery.js"></script> <script type="text/javascript" src="../_static/underscore.js"></script> <script type="text/javascript" src="../_static/doctools.js"></script> <script type="text/javascript" src="../_static/sidebar.js"></script> <link rel="shortcut icon" href="../_static/favicon.ico"/> <link rel="top" title="Bcfg2 1.3.0 documentation" href="../index.html" /> <link rel="up" title="The Bcfg2 Server" href="index.html" /> <link rel="next" title="Server-side Caching" href="caching.html" /> <link rel="prev" title="Server Configuration" href="configuration.html" /> <link rel="stylesheet" href="../_static/bcfg2.css" type=""/> </head> <body> <div style="text-align: left; padding: 10px 10px 15px 15px"> <a href="../index.html"><img src="../_static/bcfg2_logo.png" border="0" alt="sampledoc"/></a> </div> <div class="related"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="../genindex.html" title="General Index" accesskey="I">index</a></li> <li class="right" > <a href="../py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > <a href="caching.html" title="Server-side Caching" accesskey="N">next</a> |</li> <li class="right" > <a href="configuration.html" title="Server Configuration" accesskey="P">previous</a> |</li> <li><a href="../index.html">home</a> | </li> <!--<li><a href="../search.html">search</a> | </li>--> <li><a href="../help/index.html">help</a> | </li> <li><a href="../contents.html">documentation </a> »</li> <li><a href="../contents.html" >Bcfg2 documentation 1.3.0</a> »</li> <li><a href="index.html" accesskey="U">The Bcfg2 Server</a> »</li> </ul> </div> <div class="document"> <div class="documentwrapper"> <div class="bodywrapper"> <div class="body"> <div class="section" id="global-database-settings"> <span id="server-database"></span><h1>Global Database Settings<a class="headerlink" href="#global-database-settings" title="Permalink to this headline">¶</a></h1> <p class="versionadded"> <span class="versionmodified">New in version 1.3.0.</span></p> <p>Several Bcfg2 plugins, including <a class="reference internal" href="plugins/grouping/metadata.html#server-plugins-grouping-metadata"><em>Metadata</em></a>, <a class="reference internal" href="plugins/probes/index.html#server-plugins-probes-index"><em>Probes</em></a>, and <a class="reference internal" href="plugins/statistics/reporting.html#server-plugins-statistics-reporting"><em>Reporting</em></a>, can connect use a relational database to store data. They use the global database settings in <tt class="docutils literal"><span class="pre">bcfg2.conf</span></tt>, described in this document, to connect.</p> <div class="admonition note"> <p class="first admonition-title">Note</p> <p class="last">Although SQLite is supported as a database, it may cause significant thread contention (and a performance penalty) if you use SQLite with <a class="reference internal" href="plugins/grouping/metadata.html#server-plugins-grouping-metadata"><em>Metadata</em></a> or <a class="reference internal" href="plugins/probes/index.html#server-plugins-probes-index"><em>Probes</em></a>. If you are using the database-backed features of either of those plugins, it’s recommended that you use a higher performance database backend.</p> </div> <div class="section" id="configuration-options"> <h2>Configuration Options<a class="headerlink" href="#configuration-options" title="Permalink to this headline">¶</a></h2> <p>All of the following options should go in the <tt class="docutils literal"><span class="pre">[database]</span></tt> section of <tt class="docutils literal"><span class="pre">/etc/bcfg2.conf</span></tt>.</p> <table border="1" class="docutils"> <colgroup> <col width="13%" /> <col width="58%" /> <col width="30%" /> </colgroup> <thead valign="bottom"> <tr class="row-odd"><th class="head">Option name</th> <th class="head">Description</th> <th class="head">Default</th> </tr> </thead> <tbody valign="top"> <tr class="row-even"><td>engine</td> <td>The full name of the Django database backend to use. See <a class="reference external" href="https://docs.djangoproject.com/en/dev/ref/settings/#engine">https://docs.djangoproject.com/en/dev/ref/settings/#engine</a> for available options</td> <td>“django.db.backends.sqlite3”</td> </tr> <tr class="row-odd"><td>name</td> <td>The name of the database</td> <td>“/var/lib/bcfg2/bcfg2.sqlite”</td> </tr> <tr class="row-even"><td>user</td> <td>The user to connect to the database as</td> <td>None</td> </tr> <tr class="row-odd"><td>password</td> <td>The password to connect to the database with</td> <td>None</td> </tr> <tr class="row-even"><td>host</td> <td>The host to connect to</td> <td>“localhost”</td> </tr> <tr class="row-odd"><td>port</td> <td>The port to connect to</td> <td>None</td> </tr> </tbody> </table> </div> <div class="section" id="database-schema-sync"> <h2>Database Schema Sync<a class="headerlink" href="#database-schema-sync" title="Permalink to this headline">¶</a></h2> <p>After making changes to the configuration options or adding a plugin that uses the global database, you should run <tt class="docutils literal"><span class="pre">bcfg2-admin</span> <span class="pre">syncdb</span></tt> to resync the database schema.</p> </div> </div> </div> </div> </div> <div class="sphinxsidebar"> <div class="sphinxsidebarwrapper"> <h3><a href="../index.html">Table Of Contents</a></h3> <ul> <li><a class="reference internal" href="#">Global Database Settings</a><ul> <li><a class="reference internal" href="#configuration-options">Configuration Options</a></li> <li><a class="reference internal" href="#database-schema-sync">Database Schema Sync</a></li> </ul> </li> </ul> <h4>Previous topic</h4> <p class="topless"><a href="configuration.html" title="previous chapter">Server Configuration</a></p> <h4>Next topic</h4> <p class="topless"><a href="caching.html" title="next chapter">Server-side Caching</a></p> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="../_sources/server/database.txt" rel="nofollow">Show Source</a></li> </ul> <div id="searchbox" style="display: none"> <h3>Quick search</h3> <form class="search" action="../search.html" method="get"> <input type="text" name="q" /> <input type="submit" value="Go" /> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> <p class="searchtip" style="font-size: 90%"> Enter search terms or a module, class or function name. </p> </div> <script type="text/javascript">$('#searchbox').show(0);</script> </div> </div> <div class="clearer"></div> </div> <div class="related"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="../genindex.html" title="General Index" >index</a></li> <li class="right" > <a href="../py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > <a href="caching.html" title="Server-side Caching" >next</a> |</li> <li class="right" > <a href="configuration.html" title="Server Configuration" >previous</a> |</li> <li><a href="../index.html">home</a> | </li> <!--<li><a href="../search.html">search</a> | </li>--> <li><a href="../help/index.html">help</a> | </li> <li><a href="../contents.html">documentation </a> »</li> <li><a href="../contents.html" >Bcfg2 documentation 1.3.0</a> »</li> <li><a href="index.html" >The Bcfg2 Server</a> »</li> </ul> </div> <div class="footer"> © Copyright 2009-2013, Narayan Desai. Last updated on Mar 20, 2013. Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3. </div> </body> </html>