Mysqldump no-data and ignore-table


I need to dump database which some of the tables comes empty.

Ignore-table parameter does not make empty table, and no-data parameter is per database?

So am I right, but it is not possible to dump database where some of the tables comes empty, using oneliner script ? So I need from 200 tables only 198 with data and the rest 2 tables should be empty.

EDIT: this is the sqldump clause:
mysqldump -u root -pPassword –single-transaction db_name –ignore-table={dbname.table_name,dbname.table_name} | gzip | openssl enc -aes-256-cbc -pbkdf2 -k password > /mounted/dbname_$(date +%Y-%m-%d-%H).xb.enc -md md5

And the requirements are,

  • the db can’t be saved unencrypted anywhere even for 1 second.
  • and not on local machine, straight to that “mounted” folder.

submitted by /u/SusLaw
[link] [comments]

Go to Source of this post
Author Of this post: /u/SusLaw
Title Of post: Mysqldump no-data and ignore-table
Author Link: {authorlink}