From 7353e3a7a377f72a35931208fc949a408bf5a3ea Mon Sep 17 00:00:00 2001 From: usmannasir Date: Wed, 17 Apr 2024 16:12:34 +0400 Subject: [PATCH] bug fix: backup copy issue ref https://community.cyberpanel.net/t/aborted-failed-to-run-cp-command-during-backup-generation/52556/6 --- plogical/backupUtilities.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plogical/backupUtilities.py b/plogical/backupUtilities.py index 7338567e2..1a880937d 100755 --- a/plogical/backupUtilities.py +++ b/plogical/backupUtilities.py @@ -379,10 +379,10 @@ class backupUtilities: #copytree('/home/%s/public_html' % domainName, '%s/%s' % (tempStoragePath, 'public_html')) #command = f'cp -R /home/{domainName}/public_html {tempStoragePath}/public_html' ### doing backup of whole dir and keeping it in public_html folder will restore from here - ref https://github.com/usmannasir/cyberpanel/issues/1196 - command = f"rsync -av --exclude=.wp-cli --exclude=logs --exclude=backup --exclude=lscache /home/{domainName}/ {tempStoragePath}/public_html/" - - if ProcessUtilities.normalExecutioner(command) == 0: - raise BaseException(f'Failed to run cp command during backup generation.') + command = f"rsync -av --ignore-errors --exclude=.wp-cli --exclude=logs --exclude=backup --exclude=lscache /home/{domainName}/ {tempStoragePath}/public_html/" + ProcessUtilities.normalExecutioner(command) + # if ProcessUtilities.normalExecutioner(command) == 0: + # raise BaseException(f'Failed to run cp command during backup generation.') # make_archive(os.path.join(tempStoragePath,"public_html"), 'gztar', os.path.join("/home",domainName,"public_html"))