---
name: "opensipsdbctl"
section: "8"
platform: "linux"
package: "opensips"
version: "2.2.2-3"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/opensipsdbctl"
---

# opensipsdbctl(8)

control tool for maintaining OpenSIPS databases

## NAME

opensipsdbctl - control tool for maintaining OpenSIPS databases

## SYNOPSIS

**opensipsdbctl**

**opensipsdbctl** **command** \[ **parameters** \]

## DESCRIPTION

**opensipsdbctl** is a control tool for maintaining **OpenSIPS SIP server** databases. It can be used to create, migrate, copy, delete, dump and restore the persistence databases for OpenSIPS, on the supported Engines.

## FILES

*/etc/opensips/opensipsdbctlrc*\
 *~/.opensipsdbctlrc*\

## COMMANDS

- *OpenSIPS databases management:*

  - **db create \<db name or db\_path, optional\>**

  creates a new database

- **db presence**

  adds the presence related tables

- **db extra**

  adds the extra tables

- **db migrate \<old\_db\> \<new\_db\>**

  migrates DB from 1.5 to 1.6

- **db drop \<db name or db\_path, optional\>**

  !entirely deletes tables!

- **db reinit \<db name or db\_path, optional\>**

  !entirely deletes and than re-creates tables!

- **db backup \<file\>**

  dumps current database to file

- **db restore \<file\>**

  restores tables from a file

- **db copy \<new\_db\>**

  creates a new db from an existing one

- *OpenSIPS Berkeley DB tables management:*

  - **bdb \| db\_berkeley list**

  lists the underlying db files in DB\_PATH

- **bdb \| db\_berkeley cat \<db\>**

  db\_dump the underlying db file to STDOUT

- **bdb \| db\_berkeley swap \<db\>**

  installs db.new by db -\> db.old; db.new -\> db

- **bdb \| db\_berkeley append \<db\> \<datafile\>**

  appends data to an existing db;output DB\_PATH/db.new

- **bdb \| db\_berkeley newappend \<db\> \<datafile\>**

  appends data to a new instance of db; output DB\_PATH/db.new

- **bdb \| db\_berkeley export \<dump\_dir\>**

  exports table data to plain-txt files in dump\_dir

- **bdb \| db\_berkeley import \<dump\_dir\>**

  imports plain-txt table data and creates new db tables in db\_path

## AUTHORS

see  **/usr/share/doc/opensips/AUTHORS**

This manual page was written by Alejandro Rios P. \<alerios@debian.org\>, based on opensipsctl manpage by Bogdan-Andrei Iancu \<bogdan@opensips.org\>, for the Debian project (and may be used by others).

## SEE ALSO

**[opensips(8)](/opensips/8.md),**[opensips.cfg(5)](/opensips.cfg/5.md),**[opensipsctl(8)](/opensipsctl/8.md),**[osipsconsole(8)](/osipsconsole/8.md)

Full documentation on opensips is available at *http://www.opensips.org/.*

Mailing lists:

```
users@lists.opensips.org - opensips user community
devel@lists.opensips.org - opensips development, new features and unstable version
```
