drush – pm-update falla al actualizar drupal-core y elimina todo

Pregunta:

Necesito actualizar la instalación de drupal (archivos principales + algunos módulos contrib) a través de drush, pero cuando ejecuto drush up , primero actualizo correctamente los módulos contrib pero luego falla al actualizar el núcleo.

El problema principal es que todo en el directorio raíz se elimina y también lo es la instalación drush, además de que se crea una nueva carpeta ( drupal 7.39 ) que contiene la nueva instalación parcial en la raíz.

Esta es la salida:

(uiserver):uSOMENUMBER:~ > drush upc
Update information last refreshed: Ven, 08/21/2015 - 00:19
 Name                                  Installed Version  Proposed version  Message                   
 Drupal                                7.38               7.39              SECURITY UPDATE available 
 Advanced CSS/JS Aggregation (advagg)  7.x-2.14           7.x-2.15          Aggiornamento disponibile 
 Chaos tools (ctools)                  7.x-1.7            7.x-1.9           SECURITY UPDATE available 
 Markup (markup)                       7.x-1.1-beta1      7.x-1.2           Aggiornamento disponibile 
 Metatag (metatag)                     7.x-1.5            7.x-1.7           Aggiornamento disponibile 


NOTE: A security update for the Drupal core is available.
Drupal core will be updated after all of the non-core projects are updated.

Security and code updates will be made to the following projects: Advanced CSS/JS Aggregation [advagg-7.x-2.15], Chaos tool suite (ctools) [ctools-7.x-1.9], Markup [markup-7.x-1.2], Metatag [metatag-7.x-1.7]

Note: A backup of your project will be stored to backups directory if it is not managed by a supported version control system.
Note: If you have made any modifications to any file that belongs to one of these projects, you will have to migrate those modifications after updating.
Do you really want to continue with the update process? (y/n): y
Project advagg was updated successfully. Installed version is now 7.x-2.15.
Backups were saved into the directory /*/*/*/*/htdocs/drush-backups/*/*/modules/advagg.                                     [ok]
Project ctools was updated successfully. Installed version is now 7.x-1.9.
Backups were saved into the directory /*/*/*/*/htdocs/drush-backups/*/*/modules/ctools.                                     [ok]
Project markup was updated successfully. Installed version is now 7.x-1.2.
Backups were saved into the directory /*/*/*/*/htdocs/drush-backups/*/*/modules/markup.                                     [ok]
Project metatag was updated successfully. Installed version is now 7.x-1.7.
Backups were saved into the directory /*/*/*/*/htdocs/drush-backups/*/*/modules/metatag.                                    [ok]

Code updates will be made to drupal core.
WARNING:  Updating core will discard any modifications made to Drupal core files, most noteworthy among these are .htaccess and robots.txt.  If you have made any modifications to these files, please back them up before updating so that you can re-create your modifications in the updated version of the file.
Note: Updating core can potentially break your site. It is NOT recommended to update production sites without prior testing.

Do you really want to continue? (y/n): y
Unable to load class \Drush\VersionControl\Backup                                                                                                                         [error]
Unable to load class \Drush\VersionControl\Backup                                                                                                                         [error]
(uiserver):uSOMENUMBER:~ > ls
drupal-7.39  logs  sites

Estoy en un alojamiento compartido 1and1 y seguí esta guía para una instalación adecuada.

Los cambios menores que hice de lo que dice la guía son:

  • Ignorando el párrafo sobre acceso desde máquina remota y alias (ya que no me interesa)
  • Usando php5.5-cli en lugar de php5.5 para la exportación DRUSH_PHP en mi .bash_profile : esto se hizo para solucionar este problema (de todos modos falla incluso usando php5.5).

Estoy usando drush 8.0-dev .

Esta es la estructura del archivo antes de la actualización:

(uiserver):uSOMENUMBER:~ > ls -la
total 39808
drwx---r-t 16 uSOMENUMBER ftpusers     4096 Aug 21 00:56 .
drwxr-xr-t  6 root      root         4096 Aug 21 00:14 ..
-rw-------  1 uSOMENUMBER ftpusers      638 Jul 27 13:23 .bash_history
-rwx---r-x  1 uSOMENUMBER ftpusers      764 Aug 20 22:54 .bash_profile
-rwx---r-x  1 uSOMENUMBER ftpusers      507 Jul  2 15:36 .bashrc
drwx---r-x  4 uSOMENUMBER ftpusers     4096 Jul  2 15:36 .composer
drwx---r-x  3 uSOMENUMBER ftpusers       32 Jul  2 15:36 .drush
-rw----r--  1 uSOMENUMBER ftpusers      174 Jun 21 10:51 .gitignore
-rw----r--  1 uSOMENUMBER ftpusers     5826 Jul  2 15:52 .htaccess
drwx---r-x  3 uSOMENUMBER ftpusers      124 Aug 21 00:46 .subversion
-rw----r--  1 uSOMENUMBER ftpusers    98401 Jun 21 10:51 CHANGELOG.txt
-rw----r--  1 uSOMENUMBER ftpusers     1481 Jun 21 10:51 COPYRIGHT.txt
-rw----r--  1 uSOMENUMBER ftpusers     1717 Jun 21 10:51 INSTALL.mysql.txt
-rw----r--  1 uSOMENUMBER ftpusers     1874 Jun 21 10:51 INSTALL.pgsql.txt
-rw----r--  1 uSOMENUMBER ftpusers     1298 Jun 21 10:51 INSTALL.sqlite.txt
-rw----r--  1 uSOMENUMBER ftpusers    17995 Jun 21 10:51 INSTALL.txt
-rw----r--  1 uSOMENUMBER ftpusers    18092 Jun 21 10:51 LICENSE.txt
-rw----r--  1 uSOMENUMBER ftpusers     8167 Jun 21 10:51 MAINTAINERS.txt
-rw----r--  1 uSOMENUMBER ftpusers     5382 Jun 21 10:51 README.txt
-rw----r--  1 uSOMENUMBER ftpusers     9642 Jun 21 10:52 UPGRADE.txt
-rw----r--  1 uSOMENUMBER ftpusers     6604 Jun 21 10:51 authorize.php
drwx---r-x  2 uSOMENUMBER ftpusers       48 Jul  2 15:34 bin
-rw----r--  1 uSOMENUMBER ftpusers      720 Jun 21 10:51 cron.php
-r-----r--  1 uSOMENUMBER ftpusers 40437884 Aug 20 23:26 d.tgz
-rw----r--  1 uSOMENUMBER ftpusers      872 Jul 28 18:29 drupal-update.sh
drwx---r-x  4 uSOMENUMBER ftpusers       84 Aug 20 22:36 drush-backups
drwx---r-x  4 uSOMENUMBER ftpusers     4096 Jun 21 10:53 includes
-rw----r--  1 uSOMENUMBER ftpusers      529 Jun 21 10:51 index.php
-rw----r--  1 uSOMENUMBER ftpusers      703 Jun 21 10:51 install.php
drwxr-xr-x  3 root      root         4096 Aug 21 00:14 logs
drwx---r-x  4 uSOMENUMBER ftpusers     8192 Jun 21 10:53 misc
drwx---r-x 42 uSOMENUMBER ftpusers     4096 Jun 21 11:00 modules
-rw----r--  1 uSOMENUMBER ftpusers      105 Nov  3  2014 php.ini
drwx---r-x  5 uSOMENUMBER ftpusers       98 Jun 21 10:51 profiles
-rw----r--  1 uSOMENUMBER ftpusers     1479 Jun 21 10:51 robots.txt
drwx---r-x  2 uSOMENUMBER ftpusers     4096 Jun 21 10:52 scripts
drwx---r-x  4 uSOMENUMBER ftpusers      144 Aug 20 22:36 sites
-rwx---r-x  1 uSOMENUMBER ftpusers      128 Aug 20 22:11 test.sh
drwx---r-x  7 uSOMENUMBER ftpusers     4096 Jun 21 10:53 themes
-rw----r--  1 uSOMENUMBER ftpusers    19986 Jun 21 10:52 update.php
-rw----r--  1 uSOMENUMBER ftpusers     2178 Jun 21 10:52 web.config
drwx---r-x  2 uSOMENUMBER ftpusers       74 Nov  3  2014 webscripts
-rw----r--  1 uSOMENUMBER ftpusers      417 Jun 21 10:52 xmlrpc.php

¿Cómo se puede arreglar esto?

Respuesta:

Estaba teniendo un problema similar. Intenté ejecutar drush up drupal y volvía Unable to load class \Drush\VersionControl\Backup . Puedo confirmar que eliminar drush de mi archivo composer.json resolvió este problema. Mis pasos fueron: eliminar drush de composer.json, ejecutar la composer update y luego volver a ejecutar drush up drupal .

También estoy usando Drupal 8.1.9. Recién actualizado a 8.2.

Espero que esto también ayude a otros.

Gracias Marco.

Leave a Comment

Your email address will not be published. Required fields are marked *

web tasarım