From 37f615e757f2b95215c6e7273f396a95544d923c Mon Sep 17 00:00:00 2001 From: Hassan Hashmi <75794688+habbi-hb@users.noreply.github.com> Date: Fri, 17 Jun 2022 20:50:56 +0500 Subject: [PATCH] backuptestDataBase --- plogical/applicationInstaller.py | 14 +++++------ .../websiteFunctions/WPsitesList.html | 23 ++++++++++++++++++- 2 files changed, 29 insertions(+), 8 deletions(-) diff --git a/plogical/applicationInstaller.py b/plogical/applicationInstaller.py index 8803bb03e..3fc6b5bcb 100755 --- a/plogical/applicationInstaller.py +++ b/plogical/applicationInstaller.py @@ -2747,11 +2747,11 @@ $parameters = array( newWPpath = wpsite.path newurl = wpsite.FinalURL - ### get WPsite Database name and usr + ## get WPsite Database name and usr php = PHPManager.getPHPString(PhpVersion) FinalPHPPath = '/usr/local/lsws/lsphp%s/bin/php' % (php) - ######Get DBname + #####Get DBname command = 'sudo -u %s %s -d error_reporting=0 /usr/bin/wp config get DB_NAME --skip-plugins --skip-themes --path=%s' % ( VHuser, FinalPHPPath, newWPpath) result, stdout = ProcessUtilities.outputExecutioner(command, None, None, None, 1) @@ -2761,7 +2761,7 @@ $parameters = array( else: raise BaseException(stdout) - ######Get DBuser + #####Get DBuser command = 'sudo -u %s %s -d error_reporting=0 /usr/bin/wp config get DB_USER --skip-plugins --skip-themes --path=%s' % ( VHuser, FinalPHPPath, newWPpath) result, stdout = ProcessUtilities.outputExecutioner(command, None, None, None, 1) @@ -2781,7 +2781,7 @@ $parameters = array( else: raise BaseException(stdout) - ### Create secure folder + ### ##Create secure folder ACLManager.CreateSecureDir() RandomPath = str(randint(1000, 9999)) @@ -2801,7 +2801,7 @@ $parameters = array( logging.statusWriter(self.tempStatusPath, 'Extracting Backup File...,30') - ###First copy backup file to temp and then Unzip + #####First copy backup file to temp and then Unzip command = "sudo -u %s cp -R /home/backup/%s* %s" % (VHuser, BackUpFileName, self.tempPath) result, stdout = ProcessUtilities.outputExecutioner(command, None, None, None, 1) @@ -2823,8 +2823,8 @@ $parameters = array( raise BaseException(stdout) # dump Mysql file in unzippath path - unzippath2 = "%s/ab/usr/local/CyberCP/tmp/%s/%s" % (self.tempPath, oldtemppath, DumpFileName) - command = "mysql -u root %s < %s" % (Finaldbname, unzippath2) + unzippathdb = "%s/ab/usr/local/CyberCP/tmp/%s/%s" % (self.tempPath, oldtemppath, DumpFileName) + command = "mysql -u root %s < %s" % (Finaldbname, unzippathdb) result, stdout = ProcessUtilities.outputExecutioner(command, None, None, None, 1) if result == 0: diff --git a/websiteFunctions/templates/websiteFunctions/WPsitesList.html b/websiteFunctions/templates/websiteFunctions/WPsitesList.html index 44ce35825..3c5bc8c39 100644 --- a/websiteFunctions/templates/websiteFunctions/WPsitesList.html +++ b/websiteFunctions/templates/websiteFunctions/WPsitesList.html @@ -101,6 +101,8 @@
{{ sub.title }}
+ + +