7
In Mysql we can perform backups via terminal as follows:
Database
mysqldump nomeBaseDados > meuFicheiroBackup.sql
Table
mysqldump nomeBaseDados nomeTabela > meuFicheiroBackupDaTabelaX.sql
How can I backup all tables in my database nomeBaseDados
with the exception of a call tabelaCorrupta
?
In Mariadb I did as follows: mysqldump -u root -p <dbname> -ignore-table=<dbname>. {Tabela1,table2,Tabela3} > backup.sql
– dark777
@dark777 this is a feature of the shell used (parameter expansion), not a Mariadb feature. If you give a
echo a.{1,2,3}
in the same shell the result will also bea.1 a.2 a.3
, because the expansion occurs before the execution. In practice you generated a line with--ignore-table=
several times, as mentioned in the answer.– Bacco
yes I did it so I wouldn’t have to write --ignore-table several times.
– dark777