0

I'm new to monet. When it comes to dump/restore activities I would like to use the same functionality of mysqldump. I tried the following:

mclient -u monetdb -lsql --database=my_db --dump > ~/my_db.sql

However, when restoring with:

mclient -u monetdb  -lsql --database=my_db ~/my_db.sql

I came across the following error:

CREATE SEQUENCE: name 'seq_6620' already in use
current transaction is aborted (please ROLLBACK)

What am I missing? Does this mean I can only feed dumped data to an empty db? Thanks in advance for your hints.

andtorg
  • 179
  • 1
  • 6

2 Answers2

0

Have you tried using the dedicated tool "msqldump"? It should come with your MonetDB installation.

In your case,

msqldump -d my_db > ~/my_db.sql

If the issue with the sequence name persists, try restoring in a completely new database.

Hannes Mühleisen
  • 2,542
  • 11
  • 13
  • Thanks for reply. Unfortunately, I got the same issue from msqldump. @Holger, apparently, the dump does not contain any DROP statement. So, my guess, it can only be used to populate an empty db. – andtorg Dec 02 '13 at 20:13
0

It seems that you are dumped an object (the sequence) that already exists in the target database. Since dumps are plain sql you could just edit it and remove the offending statement(s).

Holger
  • 1,648
  • 1
  • 16
  • 26