title: how to ignore (_log) tables while taking backup of MySQL database using Python 3?
body: <p><strong>My question is : I have a 10 databases (a,b,c,d ....etc) and every database have 2 or 4 logs tables ( a_admin_log, a_status_log , a_api_log).
  So, when i want to take backup of single DB which is enter by the user input.
  Like ( a) then start taking backup but ignore all logs table). Code is working fine but how to implement for ignore _log tables? please help me</strong></p>
  <pre><code>import mysql.connector as m
  import os
  import time
  import datetime
  import pipes
  import array
  
  connection =m.connect(host='localhost',user='root',password='')
  cursor = connection.cursor()
  data = (&quot;show databases&quot;)
  cursor.execute(data)
  
  dblist = []
  for data in cursor:
          st = (str(data).lstrip(&quot;('&quot;)).rstrip(&quot;',)&quot;)
          dblist.append(st)
  
  print(dblist)
  
  def check_user_input(input):
  
          try:
                  val = input
                  if val in dblist:
                          print(&quot;Given Database &quot; + val + &quot; has matched&quot;)
                          dumpcmd = &quot;mysqldump -h localhost -u root -p &quot; + val + &quot; &gt; &quot; + val + &quot;.sql&quot;
                          os.system(dumpcmd)
                          print(&quot;Backup has been completed&quot;)
                  else:
                          print(&quot;Given Database Name &quot; + dbname + &quot;has not matched&quot;)
          except NameError:
                  print(&quot;Something else went wrong&quot;)
  
  input1 = input(&quot;Enter DB Name for Export:&quot;)
  check_user_input(input1)
  
  def check_user_input(input2):
      try:
          val2 = (input2)
          dumpcm = &quot;mysql -hlocalhost -uroot -p &quot; + val2 + &quot;  &lt; &quot; + val2 + &quot;.sql&quot;
          os.system(dumpcm)
          print (&quot;Restoration has been completed&quot;)
      except ValueError:
          print(&quot;nottt&quot;)
  
  input2 = input(&quot;Enter DB Name for Import:&quot;)
  check_user_input(input2)
  </code></pre>