DEBCONF-COPYDB(1)

โœจ debconf-copydb โ€” like, the manual page โœจ

okay bestie, so this is debconf-copydb, section 1 of the manual (that's the user commands girlies ๐Ÿ’…). It's part of Debconf, and it does exactly one thing but it does it flawlessly.


๐Ÿ’– NAME ๐Ÿ’–

debconf-copydb โ€” copy a debconf database ๐Ÿซถ


๐ŸŒธ SYNOPSIS ๐ŸŒธ

debconf-copydb sourcedb destdb [--pattern=pattern] [--owner-pattern=pattern] [--config=Foo:bar]

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

so basically debconf-copydb copies items from a debconf database that already exists into another database, which might be brand new (a glow-up from nothing, iconic โœจ).

and here's the cute part: the two databases can be in different formats. If they are, a conversion just... happens. Automatically. No extra steps, no drama. It's giving effortless. ๐Ÿ’…


๐ŸŽ€ OPTIONS ๐ŸŽ€

  • sourcedb โ€” the name of the source database. Usually it's defined in your debconf.conf (or .debconfrc) file. That's where it lives, that's where you'll find it. ๐Ÿ 
  • destdb โ€” the name of the destination database. It can be defined in debconf.conf or .debconfrc, or you can just define it right there on the command line (peep the options below for how, iykyk ๐Ÿ‘€).
  • -p pattern, --pattern pattern โ€” if you set this, only the items in sourcedb whose names match the pattern get copied. Filtered. Curated. Main character items only. โœจ
  • --owner-pattern pattern โ€” if you set this, only the items in sourcedb whose owners match the pattern get copied. Same vibe, different filter. ๐Ÿ’–
  • -c foo:bar, --config Foo:bar โ€” set option Foo to bar. This is basically the same as writing:
Foo: bar

in debconf.conf โ€” except you probably wanna leave off that space when you're on the command line (or quote it, like "Foo: bar"). You'll generally need to use this one multiple times to build up a whole configuration stanza, fr fr. And heads up bestie: in debconf.conf, blank lines are what separate stanzas, but this program instead assumes that "Name:dbname" means a new stanza is starting. No cap. ๐Ÿงš


๐ŸŒˆ EXAMPLES ๐ŸŒˆ

okay this is the fun part, let's go:

debconf-copydb configdb backup

copies all of configdb into backup โ€” assuming you already have the backup database defined in debconf.conf. easy. ate. ๐Ÿ’…


debconf-copydb configdb newdb --pattern='^slrn/' \
      --config=Name:newdb --config=Driver:File \
      --config=Filename:newdb.dat

this one copies slrn's data out of configdb and into newdb. and newdb isn't defined in the rc file at all, so the --config switches build the database on the fly. slay. ๐Ÿ”ฅ


debconf-copydb configdb stdout -c Name:stdout -c Driver:Pipe \
      -c InFd:none --pattern='^foo/'

spits out all the items in the debconf database that are related to package foo. just... out loud. ๐Ÿ—ฃ๏ธ


debconf-copydb configdb pipe --config=Name:pipe \
              --config=Driver:Pipe --config=InFd:none | \
      ssh remotehost debconf-copydb pipe configdb \
              --config=Name:pipe --config=Driver:Pipe

this one uses the special purpose pipe driver to copy a database over to a remote system. ssh girlies, this is your moment. ๐Ÿซถ


๐Ÿ‘‘ SEE ALSO ๐Ÿ‘‘

debconf.conf(5)


๐Ÿ’œ AUTHOR ๐Ÿ’œ

Joey Hess <joeyh@debian.org> โ€” thank u legend ๐Ÿซก


okay that's the whole page, bestie, you're literally a debconf-copydb expert now no cap ๐Ÿ’–โœจ This was the Debconf version, dated 2026-02-16. go forth and copy those databases ๐Ÿฆ‹๐ŸŽ€๐Ÿ’…

๐Ÿ“ฆ where this page comes from