For sake of completeness, here is a script which actually could be a one-liner to get a backup from a database, excluding (ignoring) all the views. The db name is assumed to be employees:
ignore=$(mysql --login-path=root1 INFORMATION_SCHEMA \ --skip-column-names --batch \ -e "select group_concat( concat('--ignore-table=', table_schema, '.', table_name) SEPARATOR ' ' ) from tables where table_type = 'VIEW' and table_schema = 'employees'") mysqldump --login-path=root1 --column-statistics=0 --no-data employees $ignore > "./backups/som_file.sql" You can update the logic of the query. In general using group_concat and concat you can generate almost any desired string or shell command.