mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-08 14:26:16 +01:00
This commit is contained in:
@@ -478,6 +478,8 @@ class backupUtilities:
|
|||||||
|
|
||||||
## shutil.make_archive. Creating final package.
|
## shutil.make_archive. Creating final package.
|
||||||
|
|
||||||
|
logging.CyberCPLogFileWriter.statusWriter(status, "Preparing final compressed package..\n")
|
||||||
|
|
||||||
make_archive(os.path.join(backupPath, backupName), 'gztar', tempStoragePath)
|
make_archive(os.path.join(backupPath, backupName), 'gztar', tempStoragePath)
|
||||||
rmtree(tempStoragePath)
|
rmtree(tempStoragePath)
|
||||||
|
|
||||||
@@ -485,8 +487,6 @@ class backupUtilities:
|
|||||||
|
|
||||||
backupObs = Backups.objects.filter(fileName=backupName)
|
backupObs = Backups.objects.filter(fileName=backupName)
|
||||||
|
|
||||||
## adding backup data to database.
|
|
||||||
|
|
||||||
filePath = '%s/%s.tar.gz' % (backupPath, backupName)
|
filePath = '%s/%s.tar.gz' % (backupPath, backupName)
|
||||||
totalSize = '%sMB' % (str(int(os.path.getsize(filePath) / 1048576)))
|
totalSize = '%sMB' % (str(int(os.path.getsize(filePath) / 1048576)))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user