I am trying to save a mysql database dump in a python script. Here is what I have:
filepath = os.path.join(BACKUPS_FOLDER, '%s.sql' % date)
print filepath # /Users/david/Desktop/updates/_backups/2013-04-07.sql
subprocess.call(shlex.split('mysqldump -u root updates > %s' % filepath ))
I get the following error:
mysqldump: Couldn't find table: ">"
What I am doing incorrectly here?
"%s">as a parameter (in this case as a table name)