update.php currently instructs administrators to back up their database before putting the site into maintenance mode. This means that updates can still be made to the database during and after the backup. It would be better if the database backup were made after putting the site into maintenance mode.
Details follow:
update.php?op=info currently reads:
- Back up your database. This process will change your database values and in case of emergency you may need to revert to a backup.
- Back up your code. Hint: when backing up module code, do not leave that backup in the 'modules' or 'sites/*/modules' directories as this may confuse Drupal's auto-discovery mechanism.
- Put your site into maintenance mode.
- Install your new files in the appropriate location, as described in the handbook.
It would better read:
- Back up your code. Hint: when backing up module code, do not leave that backup in the 'modules' or 'sites/*/modules' directories as this may confuse Drupal's auto-discovery mechanism.
- Put your site into maintenance mode.
- Install your new files in the appropriate location, as described in the handbook.
- Back up your database. This process will change your database values and in case of emergency you may need to revert to a backup.
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | update-text-1721506-10.patch | 1.44 KB | dcam |
| #8 | update-text-1721506-2-before.png | 89.26 KB | andymartha |
| #8 | update-text-1721506-2-after.png | 89.29 KB | andymartha |
| #2 | update-text-1721506-2.patch | 1.46 KB | dcam |
Comments
Comment #1
charles belovAlternatively:
Comment #2
dcam commentedThis will have to be fixed in 8.x first and then backported.
This seems like sound reasoning though. Here's a patch. It just moves the position of the "Back up your database" HTML list element.
Comment #3
dcam commentedChanging status.
Comment #5
dcam commentedThat failure is strange for a patch that only moves one line of markup output. It passes the failed test locally so I'm retesting here.
Comment #6
dcam commented#2: update-text-1721506-2.patch queued for re-testing.
Comment #7
dcam commented#2: update-text-1721506-2.patch queued for re-testing.
Comment #8
andymartha commentedIn update.php screen on a fresh Drupal 8.x-dev installation on March 7, 2013
I have confirmed that update-text-1721506-2.patch in #2 by dcam does change the text to what is described, and the update.php works fine.
See screenshots.
Comment #9
dries commentedCommitted to 8.x. Thanks.
Comment #10
dcam commentedI think this is backportable since it doesn't change any strings.
I backported #2 to D7.
Comment #11
secretsayan commentedRTBC + 1
Comment #12
charles belovComment #17
poker10 commentedThe D7 patch still applies. This is a usefull change, as backuping the database before enabling the maintenance mode could not be effective. I think we could backport this as the D10 code is still the same as it was committed 10 years ago:
1. Backup code
2. Maintenance mode
3. Backup database
4. Install new files
https://git.drupalcode.org/project/drupal/-/blob/11.x/core/modules/syste...
The patch looks good, moving to RTBC. Thanks!
Comment #19
mcdruid commentedThank you everybody!
Comment #20
dcam commentedWow, this was probably one of my very first contributions.