I know this issue has already been submitted #298048: drush update fails with "failed to backup project directory ... to ..." and #368992: Removal of whole sites folder on update with custom module names ), but i am using the HEAD version and comments by moshe suggest that this issue has been resolved with the new version.
I am running Mac OS X 10.5.
When i run drush update, here is what i get :
Update information last refreshed: dim, 04/26/2009 - 18:47
Update status information on all installed and enabled Drupal modules:
[...]
Do you really want to continue? (y/n): y
Project admin_menu was updated successfully. Installed version is now 6.x-1.3.
drush: Failed to backup project directory /Users/jide/Sites/jide/sites/default/modules/content_profile to /Users/jide/Sites/jide/backup/modules/20090426185139/content_profile
It seems that at the first module update, the whole sites folder is moved instead of the module folder and other updates fail because all content has moved :
backup
-modules
--20090426185139
---admin_menu <-- contains the sites folder
----all
----default
-----files
-----modules
-----themes
-----settings.php
Comments
Comment #1
owen barton commentedComment #2
owen barton commentedThanks for raising this issue again with the latest HEAD - I wasn't able to reproduce it previously, and figured it was probably some wierd symlink confusion. Anyway, I actually managed to reproduce it just now - it turns out that in some cases the core update module can return an empty $release['path'] for a project, which messes up the backup path. I haven't dug into how what is happening in update yet, but I am pretty sure it occurs if the module is enabled, but the project directory is no longer found on disk - perhaps other cases too.
Anyway, I have added 2 checks, which (for now) just set errors and continue if things don't look right. At some point I want to refactor this so that "backup" becomes a version_control backend, but for the time being this will stop this problem.
Please retest with the latest CVS HEAD and reopen if needed.
Comment #3
jide commentedThanks for having looked at the issue. I'll test with the latest CVS HEAD and let you know if errors are thrown and the update process stops normally. I'll try to verify if i have some disabled modules that are not present and maybe digg a little more if i can.
Version control for backuped modules would be great !
Comment #5
owen barton commentedIn case anyone is searching, it appears this issue has reappeared over at #496816: drush update google_analytics deletes the sites directory !