craftcms / docker

Craft CMS Docker images.
104 stars 38 forks source link

Upgrade pgdump to 15.3 #80

Open GalaxyCP opened 1 year ago

GalaxyCP commented 1 year ago

Description

Update pgdump to latest

failed with exit code 1: pg_dump: error: server version: 15.3; pg_dump version: 14.8

Steps to reproduce

  1. Go to http://localhost/admin/utilities/db-backup
  2. Check "Download backup" and click on button backup

Then i get There was a problem backing up your database. Please check the Craft logs.

Additional info

ERROR LOG

2023-07-12 22:16:02 [web.ERROR] [yii\base\Exception] yii\base\Exception: Could not create backup: The shell command "PGPASSWORD="••••••••••••••••••••••••••••••••" pg_dump --dbname=craftcms --host=devcrafthost-postgres --port=5432 --username=craftcms --if-exists --clean --no-owner --no-privileges --no-acl --file="/app/storage/backups/devcrafthost--2023-07-12-221602--v4.4.15.sql" --schema=public --column-inserts --exclude-table-data 'public.craft_assetindexdata' --exclude-table-data 'public.craft_imagetransformindex' --exclude-table-data 'public.craft_resourcepaths' --exclude-table-data 'public.craft_sessions' --exclude-table-data 'public.craft_cache'" failed with exit code 1: pg_dump: error: server version: 15.3; pg_dump version: 14.8
pg_dump: error: aborting because of server version mismatch in /app/vendor/craftcms/cms/src/controllers/UtilitiesController.php:226
Stack trace:
#0 [internal function]: craft\controllers\UtilitiesController->actionDbBackupPerformAction()
#1 /app/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#2 /app/vendor/yiisoft/yii2/base/Controller.php(178): yii\base\InlineAction->runWithParams(Array)
#3 /app/vendor/yiisoft/yii2/base/Module.php(552): yii\base\Controller->runAction('db-backup-perfo...', Array)
#4 /app/vendor/craftcms/cms/src/web/Application.php(304): yii\base\Module->runAction('utilities/db-ba...', Array)
#5 /app/vendor/craftcms/cms/src/web/Application.php(607): craft\web\Application->runAction('utilities/db-ba...', Array)
#6 /app/vendor/craftcms/cms/src/web/Application.php(283): craft\web\Application->_processActionRequest(Object(craft\web\Request))
#7 /app/vendor/yiisoft/yii2/base/Application.php(384): craft\web\Application->handleRequest(Object(craft\web\Request))
#8 /app/web/index.php(12): yii\base\Application->run()
#9 {main} {"memory":18545120,"exception":"[object] (yii\\base\\Exception(code: 0): Could not create backup: The shell command \"PGPASSWORD=\"••••••••••••••••••••••••••••••••\" pg_dump --dbname=craftcms --host=devcrafthost-postgres --port=5432 --username=craftcms --if-exists --clean --no-owner --no-privileges --no-acl --file=\"/app/storage/backups/devcrafthost--2023-07-12-221602--v4.4.15.sql\" --schema=public --column-inserts --exclude-table-data 'public.craft_assetindexdata' --exclude-table-data 'public.craft_imagetransformindex' --exclude-table-data 'public.craft_resourcepaths' --exclude-table-data 'public.craft_sessions' --exclude-table-data 'public.craft_cache'\" failed with exit code 1: pg_dump: error: server version: 15.3; pg_dump version: 14.8
pg_dump: error: aborting because of server version mismatch at /app/vendor/craftcms/cms/src/controllers/UtilitiesController.php:226)"} 
2023-07-12 22:16:02 [web.INFO] [application] Request context:
jawys commented 1 year ago

@GalaxyCP if this is still a thing for you I suggest you upgrade your

PHP version: 8.0.29

since 8.0 has its EOL in 2 months anyway.

Versions 8.1 + 8.2 are based on alpine3.18 which gives you pg_dump (PostgreSQL) 15.4 😉

cpboyd commented 8 months ago

It'd be nice if the Docker images could be updated to alphine3.19 to support postgres16.