Drupal schnell updaten : mit Drush + Composer

Was spricht dagegen, wenn man D8 so updaten würde? :

drush cr && drush ard && drush sset system.maintenance_mode 1 && drush cr

composer update

drush updb && drush entup && drush sset system.maintenance_mode 0 && drush cr

Comments

Sollte Update als root erfolgen, danach nicht zu vergessen:

chown myuser1:myuser1 . -cR

Dadurch wird "myuser1" Besitzer von allen Dateien im aktuellen Ordner.

-c (if) changed

-R rekursive



cp -v .htaccess ".htaccess-$(date +%Y%m%d_%H%M%S)"

drush cr && drush ard && drush sset system.maintenance_mode 1 && drush cr

composer update

drush updb && drush entup && drush sset system.maintenance_mode 0 && drush cr

chown myuser1:myuser1 . -cR

 

Alles auf einer Zeile habe ich schon probiert:


cp -v .htaccess ".htaccess-$(date +%Y%m%d_%H%M%S)" && drush cr && drush ard && drush sset system.maintenance_mode 1 && drush cr && composer update && drush -y updb && drush -y entup && drush sset system.maintenance_mode 0 && drush cr





 

Problem:

 

...

Division by zero paragraphs.install:349

Performing paragraphs_update_8018

Division by zero paragraphs.install:349

Performing paragraphs_update_8018

Division by zero paragraphs.install:349

Performing paragraphs_update_8018

Division by zero paragraphs.install:349

Performing paragraphs_update_8018

Division by zero paragraphs.install:349

Performing paragraphs_update_8018

Division by zero paragraphs.install:349

Performing paragraphs_update_8018

Division by zero paragraphs.install:349

Performing paragraphs_update_8018

Division by zero paragraphs.install:349

Performing paragraphs_update_8018

Division by zero paragraphs.install:349

Performing paragraphs_update_8018

...

 

drush ard benötigt lange Zeiten. Falls man Backups hat und keine Sicherung braucht, kann man schneller updaten ohne drush ard:

cp -v .htaccess ".htaccess-$(date +%Y%m%d_%H%M%S)" && drush cr && drush sset system.maintenance_mode 1 && drush cr && composer update && drush -y updb && drush -y entup && drush sset system.maintenance_mode 0 && drush cr

 

drush sql-dump > /path/to/my-backup-dir/my-database-backup.sql

Starting with 8.7.0, Drupal core no longer provides support for automatic entity updates. Whenever an entity type or field storage definition needs to be created, changed or deleted, it has to be done with an explicit update function as provided by the Update API, and using the API provided by the entity definition update manager.

Restore archive to a custom location.

drush archive-restore ./example.tar.gz --destination=/var/www/example.com/docroot

 

Restore archive to a new database (and customize settings.php to point there.).

drush archive-restore ./example.tar.gz --db-url=mysql://root:pass@127.0.0.1/dbname

Drupal Update mit Composer und Zeitangaben:

echo 'UPDATE START ' $(date +%Y-%m-%d-%H:%M:%S) && drush cr && composer update && drush updb -y && echo 'UPDATE END ' $(date +%Y-%m-%d-%H:%M:%S)

 

Problem:

 

w && drush cr && composer update && drush updb -y && drush cr && w


-bash: w: Kommando nicht gefunden.



Lösung:

 date  && drush cr && composer update && drush updb -y && drush cr && date

 

Neuen Kommentar schreiben

CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.

Suche

Neueste Kommentare

  • 4 weeks 1 day ago
    Transaction isolation level REPEATABLE-READ The recommended level for Drupal is "READ COMMITTED". (Drupal Status Report)

     Edit "/etc/my.cnf" ( under [mysqld] ):

    transaction_isolation="READ-COMMITTED"

    Restart MariaDB / MySQL:

  • 1 month ago
    Wget - Eine Webseite rekursive downloaden

    wget -U 'Mozilla/MyUserAgent' -P MyTempDir123 --wait=0.2 --random-wait -nd -r -x -l 4 -e robots=off --reject

  • 1 month ago
    Wget - Eine Webseite rekursive downloaden

    wget -U 'Mozilla/MyUserAgent2024' -P MyOutPutDirectory --wait=1 --random-wait -nd -r -l 2 -e robots=off --reject

  • 2 months 1 week ago
    CPU benchmarking with sysbench (single-threaded/all cores)

     

    # sysbench --threads="$(nproc)" cpu run

  • 2 months 1 week ago
    CPU benchmarking with sysbench (single-threaded/all cores)

    # sysbench --threads="$(nproc)" cpu run

  • 2 months 1 week ago
    Linux Autovervollständigung - bash autocomplete
    source ~/.bashrc

    Diese Lösung wird empfohlen aber hat bei mir nicht funktioniert.

    Welche Alternative gibt es?

  • 2 months 1 week ago
    PHP-CLI auf PHP8.2 umstellen (für Composer, Drush etc)

    ln -snf /opt/plesk/php/8.3/bin/php /etc/alternatives/php

  • 2 months 1 week ago
    Drush Update failed (require php >=8.2)

    In composer.json, update: 

     

  • 2 months 1 week ago
    Drupal: Anmeldung fehlgeschlagen Es hat mehr als 5 fehlerhafte Anmeldeversuche für dieses Benutzerkonto gegeben. Es ist vorübergehend gesperrt.
    drush sqlq "DELETE FROM flood"
  • 2 months 1 week ago
    Drupal SMTP + Gmail funktioniert nicht mehr (Passwort ist richtig); was ist die Lösung?