Skip to content
Joel Maximilian Mai edited this page Jan 17, 2024 · 2 revisions

Shortcuts

Linting

ddev composer lint; ddev composer phpstan;

Delete DDEV Project

ddev delete --omit-snapshot bld-website;

Snapshots

ddev snapshot working_before_migration

Database import export

Export

mysqldump -u username -p -h host dbname --ignore-table=dbname.sys_history --ignore-table=dbname.sys_log | gzip > backup/2022-05-12-backup-live.sql.gz
typo3cms database:export -c Default -e 'cf_*' -e 'cache_*' -e '[bf]e_sessions' -e sys_log | gzip > ~/backup/2022-05-12-backup-live.sql.gz

Import

gzip -d backup-20100910164109.sql.gz => .sql
mysql --host=host --user=user -p dbname < 2022-08-11-db-for-dev.sql
ddev import-db --src=2022-09-29-backup-live.sql.gz

Fileadmin import export

tar -cvz --exclude='*/_processed_/*' --exclude='*/_temp_/*' -f 2023-03-01-fileadmin-live.tar.gz fileadmin/ uploads/;
tar xfvz
gzip -d

Download files from Server

wget https://user:pw@domain.com/fileadmin/file.tar.gz

SQL

SELECT backend_layout, COUNT(backend_layout) as Anzahl, GROUP_CONCAT(uid) as uids FROM `pages` GROUP BY backend_layout;

SELECT ExtractValue(pi_flexform, '//field[@index="switchableControllerActions"]/value') AS ActionValue, COUNT(*) AS Anzahl
FROM `tt_content` WHERE CType='list' AND list_type='news_pi1' AND deleted=0
GROUP BY ActionValue;

SELECT uid, pid, pi_flexform, ExtractValue(pi_flexform, '//field[@index="switchableControllerActions"]/value') AS ActionValue
FROM `tt_content` WHERE CType='list' AND list_type='news_pi1' AND deleted=0;

SOLR

sudo chmod -R 777 .ddev/solr