13 lines
383 B
Python
Executable file
13 lines
383 B
Python
Executable file
#!/usr/bin/python3
|
|
# This script needs mysqldump to be installed
|
|
# apt install mysql-client
|
|
|
|
import os
|
|
import datetime
|
|
|
|
str_now=datetime.datetime.now().strftime('%Y-%m-%d_%H%M%S')
|
|
|
|
filename="motorradig_"+str_now+".sql"
|
|
print("Dumping "+filename)
|
|
cmd="""mysqldump --no-tablespaces --column-statistics=0 -ud0304938 -phubbabubba -h motorrad-ig.de d0304938 > """+filename
|
|
os.system(cmd)
|