Exporting and importing a database

Database export and import is used to make a copy of a database content in a single file. It can be used to backup a database or to copy a database between computers that do not share file systems.

Exporting a database

Exporting a database is done using the eyedbadmin command:

eyedbadmin
database export {database} {file}

Command arguments are:

  • {database}

    name of database to export

  • {file}

    file for export (- means export to standard output)

Example 3.8. eyedbadmin database export

eyedbadmin database export test2 /var/tmp/test2.dump
	  

Importing a database

Importing a database is done using the eyedbadmin command:

eyedbadmin
database import [options...] {database} {file}

Options are:

  • --filedir=directory

    specifies the directory that will contains the database files

  • --mthdir=directory

    specifies the directory that will contains the database methods

  • --list

    list only, do not import

Command arguments are:

  • {database}

    name of database to import

  • {file}

    file for import (- means import from standard output)

Example 3.9. eyedbadmin database import

eyedbadmin database import test2 /var/tmp/test2.dump