MSQLDUMP(1)
π NAME π
msqldump (MSQLDUMP(1)) β dump a MonetDB/SQL database. This page lives in the General Commands Manual, and bestie, itβs giving βdatabase dump but make it iconicβ π
β¨
β¨ SYNOPSIS β¨
msqldump [ options ] [ dbname ]
π¦ DESCRIPTION π¦
Okay so first: MonetDB is a database management system built from a main-memory perspective, using a fully decomposed storage model, automatic index management, extensibility of data types and search accelerators, and an SQL front end. Literally the whole package, no cap π
msqldump is the program that dumps a MonetDB/SQL database. That dump can be used to populate a new MonetDB/SQL database. So yes, itβs your little export bestie πΎβ¨
Before msqldump even starts parsing command line options, it reads a configuration file. Hereβs the vibe check on which file it reads:
- If the environment variable
DOTMONETDBFILEis set and not empty, it reads the file pointed to by that variable. - If
DOTMONETDBFILEis set but empty, no configuration file is read. - If
DOTMONETDBFILEis unset,msqldumpfirst looks for a file.monetdbin the current working directory. - If that doesnβt exist, it looks for a file
monetdbin the XDG configuration directory ($XDG_CONFIG_HOME, which defaults to$HOME/.configif not set). - And finally, it looks for a file
.monetdbin the current userβs home directory.
This file can contain defaults for the flags user, password, host, and port. To disable reading the .monetdb file, set the variable DOTMONETDBFILE to the empty string in the environment. Thatβs the off switch, bestie π«Ά
lowkey important: the config file reading happens before option parsing, so itβs not like a little side quest later. Itβs first. periodt π
π OPTIONS π
--help(-?) β print usage information and exit. Like, βwhat are my options?β but itβs literally this page, bestie π--database=database(-d database) β specify the name of the database to connect to. The-dcan be omitted if it is the last option.--host=hostname(-h hostname) β specify the name of the host on which the server runs. Default:localhostπ--port=portnr(-p portnr) β specify the portnumber of the server. Default:50000π₯--user=user(-u user) β specify the user to connect as. If this flag is absent, the client will ask for a user name.--describe(-D) β only dump the database schema. Schema-only, cute and minimal π--inserts(-N) β when dumping the table data, useINSERT INTOstatements, rather thanCOPY INTO+ CSV values.INSERT INTOstatements are more portable, and necessary when the load of the dump is processed by e.g. a JDBC application. When the dump is to be used to feed back into MonetDB,COPY INTOis preferred since that is processed more efficiently. So portable vs. efficient, pick your main character π«--noescape(-e) β when dumping the table data, use theNO ESCAPEoption on theCOPY INTOquery.--functions(-f) β only dump function definitions.--table=[schema.]table(-t [schema.]table) β only dump the specified table. Ifschemais not specified, the userβs current schema is used. When eitherschemaortablecontains percent characters, all tables matching the (SQL) search pattern are dumped.--output=filename(-o filename) β write the dump to the specified file. Iffilenamecontains a recognized compression scheme suffix, the file will be compressed using that scheme.--outputdir=directory(-O directory) β write the dump to the filedump.sqlin the specified directory, which is created if it does not exist. The data of the tables will be stored in separate CSV files in the directory. If the--compressionoption is used, the CSV files will be compressed using the specified compression scheme. If both the--outputdiroption and the--outputoption are specified, the last one is used. The--outputdiroption is not compatible with the--insertsoption.
warning bestie:--outputdirand--insertsare not compatible. Do not try to make them happen ππ
--compression=extension(-x extension) β compress the CSV files produced with the--outputdiroption using the specified compression scheme. Depending on how the program is compiled, the following compression schemes are recognized:gz,bz2,xz, andlz4.--quiet(-q) β donβt print the welcome message. Silent mode, lowkey mysterious π¦--Xdebug(-X) β trace network interaction betweenmclientand the server.
π SEE ALSO π
Go check out mclient(1) and mserver5(1) β thatβs the whole SEE ALSO squad π«Ά
Thatβs the whole page, bestie π source/version: MonetDB Β· manual page: MSQLDUMP(1) Β· date: not printed in the original footer, so Iβm not inventing one ππ
π¦ where this page comes from
- nixpkgs unstable: monetdb 11.55.7
- π the page's license: MPL-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms