Dump of database

how to take dump of all tables in a database and restore it again. i am using mapd 5.0 version

It depends on your goals. If you want to backup a database, you can copy the entire directory your data is in, and that would work as a backup.

We also provide dump table which will export a single table in the OmniSci binary format (which includes the schema), so if you wanted to move a table between two OmniSci databases, you could use that. It is recommended that you use the lz4 compression argument here to both save space and to be faster than using gzip.

If you are looking for something like postgres or sql server where the data are stored in a sql file with a bunch of insert statements in plain text, we don’t support functionality like that.

i need to take dump of all tables in a database to move to another mapd db both are in different host so i need to copy from one host to another. i used dump table but it needs to take for each and every table. how can i restore that in simple way

is there any commad like dump database like dump table in mapd

Hi @nagulan,

We currently do not support dump database. If you want to dump the database, I suggest just copying your data directory over. You could also copy the data directory on the original host, start a new omnisci_server instance pointed to the data dir copy, and drop the databases you do not need. Then move the copied data dir to the cloned host. Just make sure to drop from the cloned data dir and not the original!