tippspiel/tools/dump_pfosten.py
2025-05-31 10:57:18 +02:00

16 lines
455 B
Python
Executable file

# This script needs mysqldump to be installed
# apt install mysql-client
import os
import datetime
from pathlib import Path
homedir = Path.home()
str_now=datetime.datetime.now().strftime('%Y-%m-%d_%H%M%S')
filename="pfosten_"+str_now+".sql"
print("Dumping "+filename)
cmd="""mysqldump --no-tablespaces --column-statistics=0 -ud0274241 -psuperpfosten! -h hoschis-tippspiel.de d0274241 > """+f"{homedir}/repos/tippspiel/tools/"+filename
os.system(cmd)