ConfD User Community

Tailf:cdb-oper question in 7.2.x/7.6.5

tailf:cdb-oper {
tailf:persistent true;
}

Based on my understanding from the user’s guide. The attribute above will not survive db backup and restore.
Is there a workaround? Thanks.

From User’s Guide:
–cdb-backup File Save a snapshot of the CDB database into a GZipp:ed tar archive
file (given by the File argument). If the File argument is a relative
path, the file will be saved relative the ConfD daemon’s current
working directory . Only configuration data stored in CDB is saved
(persistent CDB operational data is not). Note: if the database is
locked for writing, the command will fail.

You can do something like

$ confd_load -O -Fp -p /oper-data-root > oper_data_backup.xml

This would create a XML file consisting only of operational data under /oper-data-root, but it would include also those that are handled by a callpoint, not just CDB-stored. Can you use such approach?

Thanks for the reply. What is the directory of /oper-data-root? The directory where confd stores the database (*.cdb) files?

confd_load: 723: maapi_save_config() failed: badly formatted or nonexistent path (8): Bad path element “oper-data-root” after: /

From the confd_load(1) man page:


The confd_load command is a command line interface to the functions maapi_save_config(), maapi_load_config(), and maapi_load_config_stream() respectively.

From the confd_lib_maapi(3) man page under maapi_save_config():


The provided path indicates which part(s) of the configuration to save. By default it is interpreted as a keypath as for other MAAPI functions, and thus identifies the root of a subtree to save.

See the respective man page, the examples.confd/dp/generic_perf/src/maapi-save.c example, and source code for the confd_load tool src/confd/tools/confd_load.c for more details.

Thanks for the info.

After I save the xml file, how do I load the xml file into cdb-oper database?
confd_load?

The issue I am dealing with is that the db backup does not store the cdb-oper attribute. I need a workaround solution.

Any help is greatly appreciated.

Yes, using something like

$ confd_load -O -l -m < oper_data_backup.xml

is probably the simplest option.