Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backup Failed #51

Open
CreateSean opened this issue Nov 21, 2023 · 2 comments
Open

Backup Failed #51

CreateSean opened this issue Nov 21, 2023 · 2 comments
Assignees

Comments

@CreateSean
Copy link

Description

I set up a new client site and when I run the backup it fails. Have attached the error message from the CP

error log:

02 - Could not create Enupal Backup: The shell command "cd /home/site/site.com/vendor/enupal/backup/src/resources && php phpbu.phar --configuration=/home/site/site.com/storage/enupalbackup/config.json --debug" failed with exit code 2: phpbu 6.0.20 by Sebastian Feldmann and contributors. Runtime: PHP 8.2.12 Configuration: /home/site/site.com/storage/enupalbackup/config.json backup: [mysqldump] ******************************************************* ("/usr/bin/mysqldump" --user='torquest' --password='******' --host='localhost' --port='3306' 'torquest' --no-data && "/usr/bin/mysqldump" --user='torquest' --password='******' --host='localhost' --port='3306' 'torquest' --ignore-table='torquest.assetindexdata' --ignore-table='torquest.assettransformindex' --ignore-table='torquest.cache' --ignore-table='torquest.sessions' --ignore-table='torquest.templatecaches' --ignore-table='torquest.templatecachecriteria' --ignore-table='torquest.templatecacheelements' --skip-add-drop-table --no-create-db --no-create-info) | "/usr/bin/bzip2" > /home/site/site.com/storage/enupalbackup/databases/database-english_20231121110656_n4yr2g2v8v.sql.bz2 ok sync: [amazons3] ********************************************************** Deprecated: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in phar:///home/site/site.com/vendor/enupal/backup/src/resources/phpbu.phar/Util/Str.php on line 31 Deprecated: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in phar:///home/site/site.com/vendor/enupal/backup/src/resources/phpbu.phar/Util/Str.php on line 33 Deprecated: Use of "self" in callables is deprecated in phar:///home/site/site.com/vendor/enupal/backup/src/resources/phpbu.phar/lib/aws-sdk/S3/RegionalEndpoint/ConfigurationProvider.php on line 83 Deprecated: Use of "self" in callables is deprecated in phar:///home/site/site.com/vendor/enupal/backup/src/resources/phpbu.phar/lib/aws-sdk/DefaultsMode/ConfigurationProvider.php on line 85 Deprecated: Use of "self" in callables is deprecated in phar:///home/site/site.com/vendor/enupal/backup/src/resources/phpbu.phar/lib/aws-sdk/Endpoint/UseFipsEndpoint/ConfigurationProvider.php on line 82 Deprecated: Use of "self" in callables is deprecated in phar:///home/site/site.com/vendor/enupal/backup/src/resources/phpbu.phar/lib/aws-sdk/Endpoint/UseDualstackEndpoint/ConfigurationProvider.php on line 83 Deprecated: Use of "self" in callables is deprecated in phar:///home/site/site.com/vendor/enupal/backup/src/resources/phpbu.phar/lib/aws-sdk/EndpointDiscovery/ConfigurationProvider.php on line 86 Deprecated: Use of "self" in callables is deprecated in phar:///home/site/site.com/vendor/enupal/backup/src/resources/phpbu.phar/lib/aws-sdk/Retry/ConfigurationProvider.php on line 88 Deprecated: Use of "self" in callables is deprecated in phar:///home/site/site.com/vendor/enupal/backup/src/resources/phpbu.phar/lib/aws-sdk/ClientSideMonitoring/ConfigurationProvider.php on line 90 Deprecated: Use of "self" in callables is deprecated in phar:///home/site/site.com/vendor/enupal/backup/src/resources/phpbu.phar/lib/aws-sdk/S3/UseArnRegion/ConfigurationProvider.php on line 83 Deprecated: Creation of dynamic property GuzzleHttp\Handler\CurlMultiHandler::$_mh is deprecated in phar:///home/site/site.com/vendor/enupal/backup/src/resources/phpbu.phar/lib/guzzlehttp/guzzle/Handler/CurlMultiHandler.php on line 103 create s3 bucket exception: Error executing "CreateBucket" on "https://torquest-backup.s3.ca-central-1.amazonaws.com/"; AWS HTTP error: Client error: `PUT https://torquest-backup.s3.ca-central-1.amazonaws.com/` resulted in a `403 Forbidden` response: <?xml version="1.0" encoding="UTF-8"?> <Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>RCZ64S (truncated...) AccessDenied (client): Access Denied - <?xml version="1.0" encoding="UTF-8"?> <Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>RCZ64SDWRRMBDXXN</RequestId><HostId>FbTSaoewzUrJfsjTm9z6lYY2RLvWlGozku9Qt8de0s4l6oQPFXiGDJoW24LYVSZSlxaSWUyVW2Y=</HostId></Error> failed Warning: file_get_contents(http://torquest.com/enupal-backup/finished?backupId=english_20231121110656_n4yr2g2v8v&status=1&timestamp=1700582816&duration=7.2131&err-cnt=1&bak-cnt=1&bak-fail=1): Failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden in phar:///home/site/site.com/vendor/enupal/backup/src/resources/phpbu.phar/Log/Webhook.php on line 252 Time: 7 seconds, Memory: 18.43MB Exception 'Aws\S3\Exception\S3Exception' with message 'Error executing "CreateBucket" on "https://torquest-backup.s3.ca-central-1.amazonaws.com/"; AWS HTTP error: Client error: `PUT https://torquest-backup.s3.ca-central-1.amazonaws.com/` resulted in a `403 Forbidden` response: <?xml version="1.0" encoding="UTF-8"?> <Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>RCZ64S (truncated...) AccessDenied (client): Access Denied - <?xml version="1.0" encoding="UTF-8"?> <Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>RCZ64SDWRRMBDXXN</RequestId><HostId>FbTSaoewzUrJfsjTm9z6lYY2RLvWlGozku9Qt8de0s4l6oQPFXiGDJoW24LYVSZSlxaSWUyVW2Y=</HostId></Error>' in phar:///home/site/site.com/vendor/enupal/backup/src/resources/phpbu.phar/lib/aws-sdk/WrappedHttpHandler.php:195 backup Database: FAILED | executed | skipped | failed | ----------+----------+---------+--------+ checks | 0 | | 0 | crypts | 0 | 0 | 0 | syncs | 1 | 0 | 0 | cleanups | 0 | 0 | 0 | ----------+----------+---------+--------+ FAILURE! Backups: 1, failed Checks: 0, failed Crypts: 0, failed Syncs: 0, failed Cleanups: 0. --Trace: #0 /home/site/site.com/vendor/enupal/backup/src/services/Backups.php(279): craft\errors\ShellCommandException::createFromCommand() #1 /home/site/site.com/vendor/enupal/backup/src/jobs/CreateBackup.php(51): enupal\backup\services\Backups->enupalBackup() #2 /home/site/site.com/vendor/yiisoft/yii2-queue/src/Queue.php(243): enupal\backup\jobs\CreateBackup->execute() #3 /home/site/site.com/vendor/yiisoft/yii2-queue/src/cli/Queue.php(147): yii\queue\Queue->handleMessage() #4 /home/site/site.com/vendor/craftcms/cms/src/queue/Queue.php(190): yii\queue\cli\Queue->handleMessage() #5 /home/site/site.com/vendor/craftcms/cms/src/queue/Queue.php(165): craft\queue\Queue->executeJob() #6 [internal function]: craft\queue\Queue->craft\queue\{closure}() #7 /home/site/site.com/vendor/yiisoft/yii2-queue/src/cli/Queue.php(114): call_user_func() #8 /home/site/site.com/vendor/craftcms/cms/src/queue/Queue.php(163): yii\queue\cli\Queue->runWorker() #9 /home/site/site.com/vendor/craftcms/cms/src/controllers/QueueController.php(82): craft\queue\Queue->run() #10 [internal function]: craft\controllers\QueueController->actionRun() #11 /home/site/site.com/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array() #12 /home/site/site.com/vendor/yiisoft/yii2/base/Controller.php(178): yii\base\InlineAction->runWithParams() #13 /home/site/site.com/vendor/yiisoft/yii2/base/Module.php(552): yii\base\Controller->runAction() #14 /home/site/site.com/vendor/craftcms/cms/src/web/Application.php(305): yii\base\Module->runAction() #15 /home/site/site.com/vendor/craftcms/cms/src/web/Application.php(606): craft\web\Application->runAction() #16 /home/site/site.com/vendor/craftcms/cms/src/web/Application.php(284): craft\web\Application->_processActionRequest() #17 /home/site/site.com/vendor/yiisoft/yii2/base/Application.php(384): craft\web\Application->handleRequest() #18 /home/site/site.com/public/index.php(21): yii\base\Application->run() #19 {main}

logs file

{"status":1,"timestamp":1700582816,"duration":7.2142,"backupCount":1,"backupFailed":1,"errorCount":1,"errors":[{"class":"Aws\\S3\\Exception\\S3Exception","message":"Error executing \"CreateBucket\" on \"https:\/\/torquest-backup.s3.ca-central-1.amazonaws.com\/\"; AWS HTTP error: Client error: `PUT https:\/\/torquest-backup.s3.ca-central-1.amazonaws.com\/` resulted in a `403 Forbidden` response:\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Error><Code>AccessDenied<\/Code><Message>Access Denied<\/Message><RequestId>RCZ64S (truncated...)\n AccessDenied (client): Access Denied - <?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Error><Code>AccessDenied<\/Code><Message>Access Denied<\/Message><RequestId>RCZ64SDWRRMBDXXN<\/RequestId><HostId>FbTSaoewzUrJfsjTm9z6lYY2RLvWlGozku9Qt8de0s4l6oQPFXiGDJoW24LYVSZSlxaSWUyVW2Y=<\/HostId><\/Error>","file":"phar:\/\/\/home\/torquest\/torquest.com\/vendor\/enupal\/backup\/src\/resources\/phpbu.phar\/lib\/aws-sdk\/WrappedHttpHandler.php","line":195}],"backups":[{"name":"Database","status":1,"checks":{"executed":0,"failed":0},"crypt":{"executed":0,"skipped":0,"failed":0},"syncs":{"executed":1,"skipped":0,"failed":0},"cleanup":{"executed":0,"skipped":0,"failed":0}}],"debug":["(\"\/usr\/bin\/mysqldump\" --user='torquest' --password='******' --host='localhost' --port='3306' 'torquest' --no-data && \"\/usr\/bin\/mysqldump\" --user='torquest' --password='******' --host='localhost' --port='3306' 'torquest' --ignore-table='torquest.assetindexdata' --ignore-table='torquest.assettransformindex' --ignore-table='torquest.cache' --ignore-table='torquest.sessions' --ignore-table='torquest.templatecaches' --ignore-table='torquest.templatecachecriteria' --ignore-table='torquest.templatecacheelements' --skip-add-drop-table --no-create-db --no-create-info) | \"\/usr\/bin\/bzip2\" > \/home\/torquest\/torquest.com\/storage\/enupalbackup\/databases\/database-english_20231121110656_n4yr2g2v8v.sql.bz2","create s3 bucket","exception: Error executing \"CreateBucket\" on \"https:\/\/torquest-backup.s3.ca-central-1.amazonaws.com\/\"; AWS HTTP error: Client error: `PUT https:\/\/torquest-backup.s3.ca-central-1.amazonaws.com\/` resulted in a `403 Forbidden` response:\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Error><Code>AccessDenied<\/Code><Message>Access Denied<\/Message><RequestId>RCZ64S (truncated...)\n AccessDenied (client): Access Denied - <?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Error><Code>AccessDenied<\/Code><Message>Access Denied<\/Message><RequestId>RCZ64SDWRRMBDXXN<\/RequestId><HostId>FbTSaoewzUrJfsjTm9z6lYY2RLvWlGozku9Qt8de0s4l6oQPFXiGDJoW24LYVSZSlxaSWUyVW2Y=<\/HostId><\/Error>"]}

Steps to reproduce

  1. Run backup
  2. fails

Additional info

  • Craft version: 4.5.11
  • PHP version: 8.2.12
  • Database driver & version: mysql 8.0.35
  • Plugin version: 2.2.0
@CreateSean
Copy link
Author

Any update? @andrelopez

@andrelopez
Copy link
Member

Hi @CreateSean sounds like a permissions issue? could you please double check your keys?

AWS HTTP error: Client error: `PUT https:\/\/torquest-backup.s3.ca-central-1.amazonaws.com\/` resulted in a `403 Forbidden` response:\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Error><Code>AccessDenied<\/Code><Message>Access Denied<\/Message><RequestId>RCZ64S (truncated...)\n AccessDenied (client): Access Denied 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants