This commit is contained in:
midoks 2022-12-17 20:52:35 +08:00
parent 0596dc243e
commit 1e5ecabbd1
3 changed files with 6 additions and 6 deletions

View File

@ -40,11 +40,11 @@ class backupTools:
"----------------------------------------------------------------------------")
return
backup_path = mw.getRootDir() + '/backup/database'
backup_path = mw.getRootDir() + '/backup/database/mariadb'
if not os.path.exists(backup_path):
mw.execShell("mkdir -p " + backup_path)
filename = backup_path + "/mariadb_" + name + "_" + \
filename = backup_path + "/db_" + name + "_" + \
time.strftime('%Y%m%d_%H%M%S', time.localtime()) + ".sql.gz"
mysql_root = mw.M('config').dbPos(db_path, db_name).where(

View File

@ -44,11 +44,11 @@ class backupTools:
"----------------------------------------------------------------------------")
return
backup_path = mw.getRootDir() + '/backup/database'
backup_path = mw.getRootDir() + '/backup/database/mysql-apt'
if not os.path.exists(backup_path):
mw.execShell("mkdir -p " + backup_path)
filename = backup_path + "/mysql-apt_" + name + "_" + \
filename = backup_path + "/db_" + name + "_" + \
time.strftime('%Y%m%d_%H%M%S', time.localtime()) + ".sql.gz"
mysql_root = mw.M('config').dbPos(db_path, db_name).where(

View File

@ -44,11 +44,11 @@ class backupTools:
"----------------------------------------------------------------------------")
return
backup_path = mw.getRootDir() + '/backup/database'
backup_path = mw.getRootDir() + '/backup/database/mysql-yum'
if not os.path.exists(backup_path):
mw.execShell("mkdir -p " + backup_path)
filename = backup_path + "/mysql-yum_" + name + "_" + \
filename = backup_path + "/db_" + name + "_" + \
time.strftime('%Y%m%d_%H%M%S', time.localtime()) + ".sql.gz"
mysql_root = mw.M('config').dbPos(db_path, db_name).where(