Runbook » History » Revision 4
« Previous |
Revision 4/26
(diff)
| Next »
Enis Nuredini, 02.06.2023 13:49
Migration to Production¶
This is a step by step instruction to migrate a new tested dev instance with upgraded typo3 cms to production. Used as example is the geolean tool.
Preparation on production¶
Switch to production server:
ssh lean.geo.uzh.ch
ssh lean-gate.geo.uzh.ch
Create dump files from databases:
mysqldump lean_prod_db > /var/www/lean_prod_db_dump.sql mysqldump lean_prod_t3 > /var/www/lean_prod_t3_dump.sql mysqldump lean_gate_prod_t3 > /var/www/lean_gate_t3_dump.sql
Move instance folder as backup from /var/www/html/ to /var/www/
mv /var/www/html/prod /var/www mv /var/www/html/preview /var/www
Do the same for other pages.
Preparation on dev¶
Switch to dev server:
exit webwork22r
Create dump of typo3 database:
mysqldump lean_dev_t3 > /var/tmp/lean_prod_t3_v11.sql mysqldump lean_gate_t3 > /var/tmp/lean_gate_t3_v11.sql
Archive sql dump files:
cd /var/tmp tar -czf lean_gate_db_t3_v11.tar.gz lean_prod_t3_v11.sql lean_gate_t3_v11.sql
Archive page instance:
cd /var/www/html tar -czf /var/tmp/lean.tar.gz lean/ tar -czf /var/tmp/leangate.tar.gz leangate/
Archive new typo3 v11 (In this example the feLogin templates for geolean are included):
cd /var/www tar -czf /var/tmp/typo3_v11.tar.gz typo3_src-11.5.25 exit
File transfer: Dev to Production¶
Transfer archived page instance to production server:
scp -r root@webwork22:/var/tmp/lean.tar.gz root@lean.geo.uzh.ch:/var/tmp scp -r root@webwork22:/var/tmp/leangate.tar.gz root@lean-gate.geo.uzh.ch:/var/tmp
Transfer typo3 v11 to production server:
scp -r root@webwork22:/var/tmp/typo3_v11.tar.gz root@lean.geo.uzh.ch:/var/tmp scp -r root@webwork22:/var/tmp/typo3_v11.tar.gz root@lean-geo.uzh.ch:/var/tmp
Transfer typo3 database dump files to production server:
scp -r root@webwork22:/var/tmp/lean_gate_db_t3_v11.tar.gz root@lean.geo.uzh.ch:/var/tmp
Setup Production¶
Unpack page instance for prod and preview. Rename them to original name and check the right permissions:
ssh lean.geo.uzh.ch cd /var/tmp tar -xzf lean.tar.gz -C /var/www/html/ mv lean prod tar -xzf lean.tar.gz -C /var/www/html/ mv lean preview
Unpack typo3 v11 and check the right permissions:
tar -xzf typo3_v11.tar.gz -C /var/www/
Unpack typo3 database dump files and use them in production and preview:
tar -xzf lean_gate_db_t3_v11.tar.gz -C ./ mysql lean_prod_t3 < /var/tmp/lean_prod_t3_v11.sql mysql lean_preview_t3 < /var/tmp/lean_prod_t3_v11.sql mysql lean_gate_prod_t3 < /var/tmp/lean_gate_t3_v11.sql
Do the same for all existing page instances. (lean-gate)
Configuraiton: qfq.json and LocalConfiguration.php¶
Now we need to change the used credentials from dev to the original ones from production. Btw best practice would be to refresh the used passwords. This will improve the security.Change the typo3 database credentials in LocalConfiguration.php for production and preview:
- dbname
- password
- user
- DB_1_USER
- DB_1_PASSWORD
- DB_1_NAME
- baseUrl
- wkhtmltopdf (for geolean would be: LD_LIBRARY_PATH=/opt/wkhtmltox/lib /opt/wkhtmltox/bin/wkhtmltopdf)
- remove redirect E-Mail
Do the same for all other instances. (lean-gate)
Maybe its necessary to refresh ldap password? Would help to improve security.
Updated by Enis Nuredini about 1 year ago · 4 revisions