|
|
@ -44,11 +44,11 @@ class backupTools: |
|
|
|
"----------------------------------------------------------------------------") |
|
|
|
"----------------------------------------------------------------------------") |
|
|
|
return |
|
|
|
return |
|
|
|
|
|
|
|
|
|
|
|
backup_path = mw.getRootDir() + '/backup/database' |
|
|
|
backup_path = mw.getRootDir() + '/backup/database/mysql-apt' |
|
|
|
if not os.path.exists(backup_path): |
|
|
|
if not os.path.exists(backup_path): |
|
|
|
mw.execShell("mkdir -p " + 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" |
|
|
|
time.strftime('%Y%m%d_%H%M%S', time.localtime()) + ".sql.gz" |
|
|
|
|
|
|
|
|
|
|
|
mysql_root = mw.M('config').dbPos(db_path, db_name).where( |
|
|
|
mysql_root = mw.M('config').dbPos(db_path, db_name).where( |
|
|
|