Shell output in code tags so it's a bit easier to read.
root:/home/drupal5# ls -al
total 284
drwxrwxr-x 12 drupal developers 4096 2009-03-16 13:09 ./
drwxr-xr-x 61 root root 4096 2009-02-26 11:03 ../
drwxr-xr-x 3 root root 4096 2008-12-12 10:12 backup/
-rw-rw-r-- 1 drupal developers 32996 2009-01-15 08:32 CHANGELOG.txt
-rw-rw-r-- 1 drupal developers 262 2006-08-09 15:42 cron.php
-rwxrwxr-x 1 drupal developers 822 2007-05-03 01:00 favicon.ico*
drwxrwxrwx 12 drupal developers 4096 2009-02-26 21:55 files/
-rw-rw-r-- 1 drupal developers 4005 2008-12-11 05:12 .htaccess
drwxr-xr-x 4 root root 4096 2009-03-16 12:56 imagefield/
drwxrwxr-x 2 drupal developers 4096 2009-01-15 08:40 includes/
-rw-rw-r-- 1 drupal developers 872 2006-12-12 18:32 index.php
-rw-rw-r-- 1 drupal developers 1431 2006-09-09 00:29 INSTALL.mysql.txt
-rw-rw-r-- 1 drupal developers 1073 2006-09-09 00:29 INSTALL.pgsql.txt
-rw-rw-r-- 1 drupal developers 22305 2008-07-10 05:48 install.php
-rw-rw-r-- 1 drupal developers 9263 2008-01-11 07:14 INSTALL.txt
-rw-rw-r-- 1 drupal developers 18049 2009-01-14 14:56 LICENSE.txt
-rw-rw-r-- 1 drupal developers 1778 2006-12-12 02:09 MAINTAINERS.txt
drwxrwxr-x 3 drupal developers 4096 2009-01-15 08:40 misc/
drwxrwxr-x 31 drupal developers 4096 2009-01-15 08:40 modules/
drwxrwxr-x 3 drupal developers 4096 2009-01-15 08:40 profiles/
-rw-rw-r-- 1 drupal developers 1591 2008-12-11 05:24 robots.txt
drwxrwxr-x 2 drupal developers 4096 2009-01-15 08:40 scripts/
drwxrwxr-x 14 drupal developers 4096 2009-02-19 15:27 sites/
drwxrwxr-x 7 drupal developers 4096 2009-01-15 08:40 themes/
-rw-rw-r-- 1 drupal developers 30842 2008-12-11 07:21 update.php
-rw-rw-r-- 1 drupal developers 2941 2007-01-09 18:16 UPGRADE.txt
-rw-rw-r-- 1 drupal developers 352 2005-12-11 03:26 xmlrpc.php
root:/home/drupal5# cp -a sites sitesbackup
root:/home/drupal5# drush -l http://example.com pm update
PHP Warning: Module 'json' already loaded in Unknown on line 0
Update information last refreshed: Mon, 03/16/2009 - 04:12
Update status information on all installed and enabled Drupal modules:
Name Installed version Recommended version Status
---- ----------------- ------------------- ------
Content Construction Kit (CCK) 5.x-1.10 5.x-1.10 OK
contemplate 5.x-1.9 Unknown Ignored:
CVS deploy 5.x-1.1 5.x-1.1 OK
Drupal 5.15 5.16 SECURITY UPDATE available
Drush 5.x-1.4 5.x-1.4 OK
FileField 5.x-2.3 5.x-2.4 Update available
ImageAPI 5.x-1.2 5.x-1.4 Update available
ImageCache 5.x-2.2 5.x-2.3 Update available
ImageField 5.x-2.1 5.x-2.5 Update available
jQuery Update 5.x-1.0 5.x-1.0 OK
MimeDetect 5.x-1.0 5.x-1.0 OK
Pathauto 5.x-2.3 5.x-2.3 OK
Token 5.x-1.11 5.x-1.11 OK
Update Status 5.x-2.3 5.x-2.3 OK
Views 5.x-1.6 5.x-1.6 OK
Webform 5.x-2.3 5.x-2.6 Update available
NOTE: An update for the Drupal core is available.
Drupal itself can't yet be updated by this tool. Please update Drupal manually.
Updates will be made to the following projects:
FileField [filefield-5.x-2.4], ImageAPI [imageapi-5.x-1.4], ImageCache [imagecache-5.x-2.3], ImageField [imagefield-5.x-2.5], Webform [webform-5.x-2.6]
Note: Updated modules can potentially break your site. It's not recommended to update production sites without prior testing.
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? (y/n): y
Project filefield was updated successfully. Installed version is now 5.x-2.4.
Project imageapi was updated successfully. Installed version is now 5.x-1.4.
Project imagecache was updated successfully. Installed version is now 5.x-2.3.
Project imagefield was updated successfully. Installed version is now 5.x-2.5.
drush: Failed to backup project directory /home/drupal5.15/sites/all/modules/webform to /home/drupal5.15/backup/modules/20090316121405/webform
root:/home/drupal5# ls -al < bender >
total 284
drwxrwxr-x 12 drupal developers 4096 2009-03-16 13:14 ./
drwxr-xr-x 61 root root 4096 2009-02-26 11:03 ../
drwxr-xr-x 3 root root 4096 2008-12-12 10:12 backup/
-rw-rw-r-- 1 drupal developers 32996 2009-01-15 08:32 CHANGELOG.txt
-rw-rw-r-- 1 drupal developers 262 2006-08-09 15:42 cron.php
-rwxrwxr-x 1 drupal developers 822 2007-05-03 01:00 favicon.ico*
drwxrwxrwx 12 drupal developers 4096 2009-02-26 21:55 files/
-rw-rw-r-- 1 drupal developers 4005 2008-12-11 05:12 .htaccess
drwxr-xr-x 4 root root 4096 2009-03-16 13:14 imagefield/
drwxrwxr-x 2 drupal developers 4096 2009-01-15 08:40 includes/
-rw-rw-r-- 1 drupal developers 872 2006-12-12 18:32 index.php
-rw-rw-r-- 1 drupal developers 1431 2006-09-09 00:29 INSTALL.mysql.txt
-rw-rw-r-- 1 drupal developers 1073 2006-09-09 00:29 INSTALL.pgsql.txt
-rw-rw-r-- 1 drupal developers 22305 2008-07-10 05:48 install.php
-rw-rw-r-- 1 drupal developers 9263 2008-01-11 07:14 INSTALL.txt
-rw-rw-r-- 1 drupal developers 18049 2009-01-14 14:56 LICENSE.txt
-rw-rw-r-- 1 drupal developers 1778 2006-12-12 02:09 MAINTAINERS.txt
drwxrwxr-x 3 drupal developers 4096 2009-01-15 08:40 misc/
drwxrwxr-x 31 drupal developers 4096 2009-01-15 08:40 modules/
drwxrwxr-x 3 drupal developers 4096 2009-01-15 08:40 profiles/
-rw-rw-r-- 1 drupal developers 1591 2008-12-11 05:24 robots.txt
drwxrwxr-x 2 drupal developers 4096 2009-01-15 08:40 scripts/
drwxrwxr-x 14 drupal developers 4096 2009-02-19 15:27 sitesbackup/
drwxrwxr-x 7 drupal developers 4096 2009-01-15 08:40 themes/
-rw-rw-r-- 1 drupal developers 30842 2008-12-11 07:21 update.php
-rw-rw-r-- 1 drupal developers 2941 2007-01-09 18:16 UPGRADE.txt
-rw-rw-r-- 1 drupal developers 352 2005-12-11 03:26 xmlrpc.php
root:/home/drupal5# cp -a sitesbackup sites
root:/home/drupal5#
I will leave the server in its current state so I can reproduce the problem if there are specific debug steps you need me to take, but right now, this is looking like a pretty serious goddamn problem. I had to restore my original sites folder from backup. So you know, drupal5 is a symlink to drupal5.15, this shouldn't matter though, as it works perfectly well with the same setup in the drupal6 -> drupal6.9 directory.
Oh. The backup dir is being created fine. Here's the ls...
root:/home/drupal5# ls -al /home/drupal5.15/backup/modules/20090316121405/
total 24
drwxr-xr-x 6 root root 4096 2009-03-16 13:14 ./
drwxr-xr-x 6 root root 4096 2009-03-16 13:14 ../
drwxrwxr-x 6 drupal developers 4096 2008-06-12 13:45 filefield/
drwxrwxr-x 3 drupal developers 4096 2008-08-19 15:24 imageapi/
drwxr-xr-x 4 root root 4096 2008-12-12 11:43 imagecache/
drwxrwxr-x 14 drupal developers 4096 2009-02-19 15:27 imagefield/
It seems to be failing when it has a crack at backing up webform, but then instead of not deleting the entire sites folder, it seems to just go right on ahead and delete the entire sites folder. No big deal or anything.
Comments
Comment #1
moshe weitzman commentedPlease use HEAD drush and D5 dev snapshot of drush_extras. We will soon be releasing all that code.
Comment #2
moshe weitzman commentedAnd we will unsupport all old releases.
Comment #3
moshe weitzman commentedall that code has changed.
Comment #5
Andric Villanueva commentedToo bad it happens on version 6. I am on Drupal 6 and did it. I did some fixes on some custom code that I have and it couldn't find a file then everything was deleted. No big deal it's just the entire sites folder. It's not like I need it or anything.
This has effectively soured me on drush. And I loved doing everything through the terminal ...
Comment #6
EvanDonovan commentedLooks like the issue should be reopened if it happens on 6 as well. Andric, could you report what version you were using when this occurred?
Comment #7
EvanDonovan commentedApparently from the source output it was 2.x-dev (module manager). Maybe this won't happen on 3.x, so if so, feel free to close again. Just wanted to confirm.
Comment #8
greg.1.anderson commentedI believe this has been fixed in drush-3.x. Please re-open if reproducible on drush-HEAD (drush-4).
Comment #9
themselves commentedI'm not 100% sure on this, but I think the problem arose in my case because of some of the modules in my sites/all directory being simlinks and not actual directories. Maybe someone who knows the guts of drush can see how that might result in deleting sites/