debconf-copydb
Copy debconf database from one format to another
SYNOPSIS
debconf-copydb [--frontend=frontend] fromdb todb [type]
PARAMETERS
-h, --help
Show command usage and options
--frontend=frontend
Specify debconf frontend (default: noninteractive)
DESCRIPTION
debconf-copydb copies configuration data between debconf database backends. Debconf manages Debian package configurations using pluggable backends like passwd (file-based), mysql (database), or dump (text dump). This tool reads owner:template pairs and responses from a source backend (fromdb) and writes them to a target backend (todb).
An optional type argument limits copying to specific template types (e.g., package/config). It supports interactive frontends via --frontend, but defaults to noninteractive for scripting.
Common uses include migrating data during upgrades, creating backups, or converting formats. Source and target must be valid backend names; full format is backend:database, but simple names like passwd imply defaults. Templates are not copied unless in a separate templatedb.
CAVEATS
Overwrites all data in target database without prompting. Verify backends are accessible and writable. No progress indicator for large databases.
EXAMPLES
debconf-copydb passwd mysql
Copies full passwd backend to mysql backend.
debconf-copydb passwd mysql pkg/config
Copies only 'pkg/config' type entries.
debconf-copydb --frontend=readline passwd dump
Interactive copy to dump format.
HISTORY
Developed by Joey Hess for debconf (circa 2000); part of Debian's cdebconf/debconf since version 1.0, evolved for backend flexibility.
SEE ALSO
debconf(7), debconf-dumpdb(1), debconf-loadtemplate(1)


