Skip to content

Data Backup

Dump with DUMP statement

  • Dump everything
DUMP DATABASE school INTO 'school.sql';
xdb_exec (pConn, "DUMP DATABASE school INTO 'school.sql'");
  • Dump schema only
DUMP DATABASE school NODATA INTO 'school.sql';
xdb_exec (pConn, "DUMP DATABASE school NODATA INTO 'school.sql'");
  • Dump data only
DUMP DATABASE school NODROP NOCREATE INTO 'school.sql';
xdb_exec (pConn, "DUMP DATABASE school NODROP NOCREATE INTO 'school.sql'");

Dump with crossdb tool

  • Dump everything
crossdb -e "DUMP DATABASE" school > school.sql
crossdb -e "DUMP DATABASE school INTO 'school.sql'" school
  • Dump schema only
crossdb -e "DUMP DATABASE school NODATA INTO 'school.sql'" school
  • Dump data only
crossdb -e "DUMP DATABASE school NODROP NOCREATE INTO 'school.sql'" school

Comments