Wrote dumpscript & updated/fixed mysqldump

This commit is contained in:
Torsten 2022-04-04 13:09:21 +02:00
parent 09e41822c9
commit 90bcf51317
4 changed files with 268 additions and 0 deletions

12
tools/dump_motorradig.py Normal file
View file

@ -0,0 +1,12 @@
# 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)