Zum Inhalt springen

Showcase: Upgrade of a large city website from TYPO3 version 8 to version 10

Over 16.000 content pages, 500 editors and 16 websites in one TYPO3 installation: in this session from the TYPO3 Online Days 2021 we show how we planned and executed the update of the Pforzheim city website from TYPO3 version 8 to version 10, including a new design.

Download Presentation

  • Upgrade-of-a-complex-website.pdf Upgrading a large, complex website can be a challenge. In this presentation we explain how we upgraded the website pforzheim.de from TYPO3 version 8.7 to version 10.4 with zero downtime.16 MB

Sample dump.sh file to update content every night

#!/usr/bin/env bash
# Dump script generated by initial.sh

absolutePath=$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." >/dev/null 2>&1 && pwd )
scriptPath="${absolutePath}/scripts"

source ${scriptPath}/project.conf
source ${scriptPath}/excludedTables.conf

if [ ${additionalPrefix} ]; then
  echo "It is not allowed to use an additional prefix when calling dump.sh"
  exit 1
fi


# TYPO3 v8 databases (LIVE UNTIL UPGRADE FINISHED)

productionDatabaseHost="${v8_productionDatabaseHost}"
productionDatabaseName="${v8_productionDatabaseName}"
productionDatabaseUsername="${v8_productionDatabaseUsername}"
productionDatabasePassword="${v8_productionDatabasePassword}"
source ${scriptPath}/excludedTables.conf

echo "Dump v8-portale..."
mysqldump --opt -h ${productionDatabaseHost} -u ${productionDatabaseUsername} -p${productionDatabasePassword} ${productionDatabaseName} ${ignoredTablesString} | gzip -v > ${absolutePath}/output/dumps/v8_dump.sql.gz

# UPGRADE to v10

source ${scriptPath}/project.conf
source ${scriptPath}/excludedTables.conf

# Arguments:
#  $1 = path to project current dir
function run_upgrade_tasks {
  oldDir=$PWD
  cd $1

  echo 'Execute database:updateschema...'
  /usr/local/bin/php $1/vendor/bin/typo3cms database:updateschema "*.add,*.change"

  echo 'Execute upgrade:prepare...'
  /usr/local/bin/php $1/vendor/bin/typo3cms upgrade:prepare

  echo 'Execute upgade:run...'
  /usr/local/bin/php $1/vendor/bin/typo3cms upgrade:run -vvv all --confirm all --deny typo3DbLegacyExtension --deny funcExtension --deny adminpanelExtension --deny rsaauthExtension --deny feeditExtension --deny taskcenterExtension --deny sysActionExtension

  echo 'Execute language:update...'
  /usr/local/bin/php $1/vendor/bin/typo3cms language:update

  cd $PWD
}

#echo 'Merge production portale v8 database into production v10 database and run upgrade tasks...'

rsync -av --delete /www/typo3cms/site/production-portale-v8/releases/current/web/fileadmin/ /www/typo3cms/site/production-portale/current/public/fileadmin
rsync -av --delete /www/typo3cms/site/production-portale-v8/releases/current/web/uploads/ /www/typo3cms/site/production-portale/current/public/uploads
gunzip -c ${absolutePath}/output/dumps/v8_dump.sql.gz | mysql -h ${productionDatabaseHost} -u ${productionDatabaseUsername} -p${productionDatabasePassword} ${productionDatabaseName}
mysql -h ${productionDatabaseHost} -u ${productionDatabaseUsername} -p${productionDatabasePassword} ${productionDatabaseName} < ${scriptPath}/modifications_portale.sql
run_upgrade_tasks ${absolutePath}/production-portale/current

# dump newly merged v10

echo "Dump portale..."
mysqldump --opt -h ${productionDatabaseHost} -u ${productionDatabaseUsername} -p${productionDatabasePassword} ${productionDatabaseName} ${ignoredTablesString} | gzip -v > ${absolutePath}/output/dumps/dump.sql.gz

 

Aktualisiert: 18.04.2023