1

I have a quick and simple question to clarify. I have medium sized database (400 Gigs) running in MariaDB 10.2 with lots of tables and lots of triggers as well. I am planning to take a mysqldump and import it to another server. So when we take mysqldump, it will be packed with triggers by default as well.

So if I import that dump with triggers to another server, do those triggers fire during the import and create duplicate data?

I know we can take dump without triggers, but I am asking if I import dump with triggers does this create data duplication?

1
  • 1
    Why not do a test with a small sample database?
    – Vérace
    Aug 15, 2019 at 2:44

1 Answer 1

3

If you take time to run mysqldump, even with all default arguments, you will see that triggers in the dump file are created after all insert statements that populate your tables. So no, there will be no duplication, your data after restoring the dump will be the same as in the source database.

1
  • I had this thought and you confirmed it and it does makes sense.
    – SAGAR Nair
    Aug 16, 2019 at 6:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.