# How to identify configuration stored in external database only?

**URL:** <https://dmap-community.ductus.global/t/how-to-identify-configuration-stored-in-external-database-only/1435>\
**Category:** General\
**Created:** [July 28, 2017, 4:46am UTC](https://dmap-community.ductus.global/t/how-to-identify-configuration-stored-in-external-database-only/1435 "2017-07-28T04:46:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![prasanthrp](https://avatars.discourse-cdn.com/v4/letter/p/bbe5ce/32.png) [@prasanthrp](https://dmap-community.ductus.global/u/prasanthrp)\
**Post date:** [July 28, 2017, 4:46am UTC](https://dmap-community.ductus.global/t/how-to-identify-configuration-stored-in-external-database-only/1435/1 "2017-07-28T04:46:50Z")

</div>

Hi,

We have configuration stored in confd, external database and (confd and  
external database together). Is there any easy way to identify configuration stored  
ONLY in external database?

Thanks, Prasanth

---

<div class="post-metadata">

**Author:** ![waitai](https://yyz2.discourse-cdn.com/flex010/user_avatar/dmap-community.ductus.global/waitai/32/436_2.png) [@waitai](https://dmap-community.ductus.global/u/waitai)\
**Post date:** [July 28, 2017, 3:50pm UTC](https://dmap-community.ductus.global/t/how-to-identify-configuration-stored-in-external-database-only/1435/2 "2017-07-28T15:50:26Z")

</div>

Not sure if you are asking for a way to find out from ConfD’s northbound interfaces.

External to ConfD, the only way to find out if configuration data is stored in an external database is by looking for the tailf:callpoint annotation in the YANG models.

To find out if callpoints are being used in a running instance of ConfD, you can invoke it from for example through NETCONF as follows:

netconf-console --get -x confd-state/internal/callpoints

However, it won’t tell you which part of the data model makes use of those callpoints.

If you would like the ability to find out if a configurable data node in your YANG models is being stored in an external database, you may want to consider annotating it with meta-data which allows you to query from the northbound interface at runtime. Chapter 8 of the ConfD UG describes how to use the configuration meta-data feature of ConfD.

---

<div class="post-metadata">

**Author:** ![prasanthrp](https://avatars.discourse-cdn.com/v4/letter/p/bbe5ce/32.png) [@prasanthrp](https://dmap-community.ductus.global/u/prasanthrp)\
**Post date:** [August 3, 2017, 8:23am UTC](https://dmap-community.ductus.global/t/how-to-identify-configuration-stored-in-external-database-only/1435/3 "2017-08-03T08:23:57Z")

</div>

> [@waitai](#):
>
> feature

I need this info for debugging purpose. Also don’t need this info from northbound interfaces. Basically I want to find out from confd setup, if the CONFIGURATION is stored in external database or cdb or on both.

The callpoint in yang file alone doesn’t say where is it stored.

Can I get this info from confd with confd --status or something like that?  
How does ConfD achieve storing configuration on both external database as well as cdb?

Thanks

---

<div class="post-metadata">

**Author:** ![waitai](https://yyz2.discourse-cdn.com/flex010/user_avatar/dmap-community.ductus.global/waitai/32/436_2.png) [@waitai](https://dmap-community.ductus.global/u/waitai)\
**Post date:** [August 4, 2017, 9:19pm UTC](https://dmap-community.ductus.global/t/how-to-identify-configuration-stored-in-external-database-only/1435/4 "2017-08-04T21:19:23Z")

</div>

You can find out about the callpoints and whether CDB is being used or not by using either “confd --status” or NETCONF through the netconf-console.

Using intro/6-c\_config as an example, here’s an illustration of how to use the two suggested mechanisms:

> $ confd --status

> …  
> callpoints:  
> id=hcp daemonId=0 daemonName=hosts\_daemon  
> id=icp daemonId=0 daemonName=hosts\_daemon  
> …  
> cdb:  
> current transaction id: 1501-880807-768995  
> running:  
> filename: ./confd-cdb/A.cdb  
> disk size: 1.3 kB  
> ram size: 8.8 kB  
> read locks: 0  
> write lock: unset  
> operational:  
> filename: ./confd-cdb/O.cdb  
> disk size: 4 bytes  
> ram size: 136 bytes  
> subscription lock: unset  
> no pending subscription notifications  
> no registered cdb clients

```
$ netconf-console --get -x /confd-state/internal
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1">
  <data>
    <confd-state xmlns="http://tail-f.com/yang/confd-monitoring">
      <internal>
        <callpoints>
          <callpoint>
            <id>hcp</id>
            <daemon>
              <id>0</id>
              <name>hosts_daemon</name>
            </daemon>
          </callpoint>
          <callpoint>
            <id>icp</id>
            <daemon>
              <id>0</id>
              <name>hosts_daemon</name>
            </daemon>
          </callpoint>
        </callpoints>
        <cdb>
          <datastore>
            <name>running</name>
            <transaction-id>1501-880807-768995</transaction-id>
            <filename>./confd-cdb/A.cdb</filename>
            <disk-size>1428</disk-size>
            <ram-size>9081</ram-size>
            <read-locks>0</read-locks>
            <write-lock-set>false</write-lock-set>
            <waiting-for-replication-sync>false</waiting-for-replication-sync>
          </datastore>
          <datastore>
            <name>operational</name>
            <filename>./confd-cdb/O.cdb</filename>
            <disk-size>4</disk-size>
            <ram-size>136</ram-size>
            <subscription-lock-set>false</subscription-lock-set>
          </datastore>
        </cdb>
      </internal>
    </confd-state>
  </data>
</rpc-reply>

```
