Bug #108504 Add a where option to util.dumpSchema
Submitted: 15 Sep 2022 23:49 Modified: 5 Dec 2022 10:42
Reporter: Arnaud Adant Email Updates:
Status: Closed Impact on me:
None 
Category:Shell Dump & Load Severity:S4 (Feature request)
Version:8.0 OS:Any
Assigned to: CPU Architecture:Any

[15 Sep 2022 23:49] Arnaud Adant
Description:
Similar to mysqldump, add a where option

https://dev.mysql.com/doc/refman/8.0/en/mysqldump.html#option_mysqldump_where

How to repeat:
util.dumpSchemas(["sakila"], "/home/aadant/dbdumps/sakila", {"where":"1=1"});
Util.dumpSchemas: Argument #3: Invalid options: where (ArgumentError)

Suggested fix:
Add a where option. This is useful to backup partitions using this tool.
[16 Sep 2022 4:06] MySQL Verification Team
Dear Arnaud,

Thank you for the report and feature request!

Thanks,
Umesh
[5 Dec 2022 10:42] Edward Gilmore
Posted by developer:
 
The following options were added to the exportTable(),
       dumpInstance(), dumpSchemas(), and dumpTables()
       utilities:

          + where: enables you to export the data which
            satisifies a SQL condition.

          + partitions: enables you to export named partitions.

       For information on exportTable(), see Options
       (https://dev.mysql.com/doc/mysql-shell/8.0/en/mysql-shell-utilities-table-export.html#mysql...)

       For information on dumpInstance(), dumpSchemas(), and
       dumpTables(), see Options for Filtering
       (https://dev.mysql.com/doc/mysql-shell/8.0/en/mysql-shell-utilities-dump-instance-schema.ht...).