The backup dir should be a tree reflecting drupal-root/sites like ie

drupal-root/backup/all/modules
drupal-root/backup/example.com/modules
drupal-root/backup/default/modules

Doing an drush pm update shows message Backups were saved into 'backups' directory.

The directory mentioned is drupal-root/backup without 's'.

Doing this on a multisite installation all backups end into this location.

I guess either the directory names should change ie longer timestamp names like (yyyymmddhhnnss) 20080209071123 or a tree like metioned above or a different tree into the sites/example.com/backup/modules is created.

I'm about to move drupal core into /usr/local/lib/drupal/core/drupal-version which is not writeable (sites is a symlink to a writable location)

So i'm in favour of sites/*/backup/modules

Regards,
Clemens Tolboom

CommentFileSizeAuthor
#2 drush_pm_backups.patch2.37 KBmarcp

Comments

Leeteq’s picture

Subscribing.

marcp’s picture

Version: 5.x-1.0-rc3 » 5.x-1.1
Status: Active » Needs review
StatusFileSize
new2.37 KB

Having the backups go to sites/*/backup/modules, where * is the directory the modules came from initially, makes sense, as does extending the timestamp on the directory name.

Attached is a patch that attempts to do both of these things. It has worked in the few tests that I've done on it.

moshe weitzman’s picture

nice. could you try on both php4 and php5? we have some error reports from php4 users.

marcp’s picture

No, it doesn't fix the problems in http://drupal.org/node/218740 on PHP4. I'm still investigating, but at first glance, it seems that we might be better served by calling drupal_install_mkdir() either via drush_op or directly rather than mkdir via drush_op, if that's even possible.

marcp’s picture

Status: Needs review » Active

Setting this back to Active. The patch I provided earlier works in the generic case where all contrib modules are in sites/all/modules but breaks down a bit when you go to another scheme like sites/all/modules/contrib and sites/all/modules/my_company.

However, see http://drupal.org/node/218740#comment-787810 for a patch that sneaks in the timestamp-to-the-second solution while also fixing the PHP4 mkdir issue.

moshe weitzman’s picture

Status: Active » Fixed

i changed backups => backup. other items are still awaiting a patch.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.