I am using mysqldump to backup a database containing several tables (say tables D, E, F). I use the following command: mysqldump -uuser -ppassword SourceDatabase > file.sql to backup these tables.
I would like to know if I restored this backup, would it overwrite other tables? For example, if I have a database DestinationDatabase, containing tables A, B and C, and after running the command "mysql -uuser -ppassword DestinationDatabase < file.sql", would I lose the tables A, B and C on the destination database (and be left with just D, E and F) or would I be left with A, B, C, D, E and F (with the original tables present in DestinationDatabase left untouched)?
Thanks in advance, Tim
With the default options, it will not delete tables A
, B
and C
. It will however overwrite (delete current data that is not in the backup) tables D
, E
and F
.
To see the list of available options see here.