---
name: "hk_dbcopy"
section: "1"
platform: "linux"
package: "libhk-classes-dev"
version: "0.8.3-4"
release: "Debian 5.0 (Lenny)"
platforms: ["linux"]
url: "https://new.carta.tech/hk_dbcopy"
---

# hk\_dbcopy(1)

copies database elements between different database backends. hk\_dbcopy is part of the hk\_classes package

## NAME

hk\_dbcopy - copies database elements between different database backends. hk\_dbcopy is part of the hk\_classes package

## SYNOPSIS

**hk\_dbcopy -d driver -b database --todriver driver --todatabase database \[OPTIONS\]**

## DESCRIPTION

**hk\_dbcopy** copies database elements between different database backends.

## Example

- hk\_dbcopy -d sqlite3 -b exampledb --todriver mysql --touser MyUsername --topassword Secret --whole-database

  This example will copy all elements of the SQLite database "exampledb" to Mysql

## OPTIONS

- \-b, --database=DATABASE

  database name

- \-d, --driver=DRIVERNAME

  set the SQL-driver (e.g. mysql). You can get a list of all existing SQL-drivers with **-l** or **--list**

- \-h, --host=HOST

  name  or IP-number of the host

- \-l, --list

  List available database drivers

- \-p, --password=PASSWORD

  user password at the SQL server

- \-r, --port=PORT

  TCP-port on host

- \--touser=USERNAME

  user name at the target SQL server

- \--topassword=PASSWORD

  user password name at the target SQL server

- \--todriver=DRIVERNAME

  driver of the target SQL server

- \--tohost=HOST

  name  or IP-number of the target host

- \--toport=port

  TCP-port on target host

- \--all-forms

  copy all forms

- \--all-queries

  copy all queries

- \--all-reports

  copy all reports

- \--all-tables

  copy all tables

- \--all-views

  copy all views

- \--whole-database

  copy all database objects

- \--form=FORM NAME

  the name of a single form that should be copied

- \--query=QUERY NAME

  the name of a single query that should be copied

- \--report=REPORT NAME

  the name of a single report that should be copied

- \--table=TABLE NAME

  the name of a single table that should be copied

- \--view=VIEW NAME

  the name of a single view that should be copied

- \-u, --user=USERNAME

  user name at the sql-server

- \--version

  version and author of hk\_classes

## DIAGNOSTICS

hk\_dbcopy returns 0 if everything was ok, or 1 if an error occured. A clear text error message will be written to stderr.

## AUTHOR

Horst Knorr \<hk\_classes@knoda.org\>

## SEE ALSO

[**hk\_actionquery**(1)](/hk_actionquery/1.md), [**hk\_exportxml**(1)](/hk_exportxml/1.md), [**hk\_importcsv**(1)](/hk_importcsv/1.md), [**hk\_report**(1)](/hk_report/1.md)
