Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The NodeSquirrel service no longer exists (see #3037038: NodeSquirrel status?), NodeSquirrel integration must be removed from this module. This may be a multi-step process?
Due to an ongoing outage with the NodeSquirrel service since March 1st (#3037038: NodeSquirrel status?) backups using this destination have not worked in two months. Disable NodeSquirrel integration until this problem is resolved.
(Original title: Disable NodeSquirrel integration (D7).)
Comment | File | Size | Author |
---|---|---|---|
#22 | backup_migrate-n3051821-22.interdiff.txt | 2.12 KB | DamienMcKenna |
#22 | backup_migrate-n3051821-22.patch | 46.34 KB | DamienMcKenna |
|
Comments
Comment #2
BrankoC CreditAttribution: BrankoC as a volunteer commentedThe parent issue suggests a work-around exists. Does that mean Nodesquirrel works when the work-around is applied?
In that case killing Nodesquirrel would presumably also kill the work-around?
Comment #3
DamienMcKennaThe workaround is not recommended because of the security concerns. So yeah, disabling NodeSquirrel integration would skip the workaround.
Comment #4
DamienMcKennaComment #5
DamienMcKennaIf NodeSquirrel ever starts working again we can re-enable it: #3053402: Re-enable NodeSquirrel integration (D7)
Comment #6
BrankoC CreditAttribution: BrankoC as a volunteer commentedThere is an example of disabling B&M 7.x.-x-x functionality in this patch (as yet uncommitted).
I have an ulterior motive in posting this here, because I also want people to review that patch. :-)
Comment #7
DamienMcKennaComment #8
BrankoC CreditAttribution: BrankoC as a volunteer commentedAs the related issue NodeSquirrel status points out, NodeSquirrel has now officially been sunsetted.
NodeSquirrel will stop accepting backups after September 30, 2019.
Backups will no longer be available for download/restore after November 1, 2019.
Comment #9
BrankoC CreditAttribution: BrankoC as a volunteer commentedThis is a simple patch to get things started.
It does three things: 1) comments out NodeSquirrel integration. 2) Creates a warning in the update function. 3) Removes NodeSquirrel references from the tests.
Note that the NodeSquirrel tab will remain visible until the menu cache is rebuilt. Rebuilding the menu cache may be @todo for this issue.
I thought about letting the update function disable schedules that use the NodeSquirrel destination, but that seemed overkill, also considering that the Schedules and Settings tabs neatly remind the user that something is amiss.
The patch addresses the original issue. I expect the issue may change now that the NodeSquirrel service is getting binned by its owners, but I am not familiar enough with the how and what of NodeSquirrel, so I decided to not try and change the issue.
Comment #10
BrankoC CreditAttribution: BrankoC as a volunteer commentedComment #11
DamienMcKennaIt needs to be a new update script as opposed to a modified existing one.
Comment #12
BrankoC CreditAttribution: BrankoC as a volunteer commentedI am not sure what you mean by 'update script'. Do you mean that each update should be in its own implementation of hook_update_N()? That is to say, should the code I added in #9 be moved to backup_migrate_update_7308()?
I sort of assumed the last two digits of the function name track the minor version number, although I now see no evidence of this on the API page. The API page does seem to allow for multiple updates within the same function though: "For each change that requires one or more actions to be performed when updating a site, add a new hook_update_N(), which will be called by update.php." (Emphasis mine.)
Comment #13
DamienMcKennaYeah, outside of the first number, hook_update_N()'s numbers are completely arbitrary, the main thing is that a) you don't edit existing ones unless you have specific reason to do so, b) each new item needs to go into a new update script. So yes, this change should go into backup_migrate_update_7308().
Comment #14
BrankoC CreditAttribution: BrankoC as a volunteer commentedThank you for the explanation.
Here is a new patch that puts the warning in its own update hook.
Comment #15
BrankoC CreditAttribution: BrankoC as a volunteer commentedComment #16
DamienMcKennaThanks!
BTW there is a convention that the hundreds element of the update number match the branch number, e.g. updates for the 7.x-3.x branch would go into the 73xx range, but it's not a technical requirement and there are plenty of modules that don't follow that. The main one is to have the first number match the core release, but it has been such a long time since I looked that I don't remember if even that is a hard requirement.
Comment #17
DamienMcKennaI did some more heavy cutting of references to Nodesquirrel in the module.
I wonder, should we add a hook_requirements() message too?
Comment #18
BrankoC CreditAttribution: BrankoC as a volunteer commentedYour patch applies well. I no longer see Nodesquirrel links or references, my destinations no longer contain Nodesquirrel nor can I create Nodesquirrel destinations.
Why did you move the update hook info text from a return value to a drupal_set_message() call? Using a return value seems to be standard?
As for hook_requirements(), I have no opinion on whether we should use it here. What were your thoughts on the issue?
I have the feeling that in the realm of back-ups, when to warn and how to warn is a potentially thorny issue that I know too little about.
I assume you don't want to overload users with messages, because they will start tuning them out. And I assume that if you warn users, you want them to take action based on that warning. Especially with automated backup schedules, the user may assume that they are OK for back-ups. If a destination is cancelled, that means the user is relying on back-ups that are no longer being made.
Comment #19
solideogloria CreditAttribution: solideogloria commentedLooks good to me. Patch and updates apply well, and the NodeSquirrel destination is removed.
I was not using NodeSquirrel, so I don't know what it would be like for someone that had been using it.
Comment #20
DamienMcKennaUpdate script that disables scheduled backups to NodeSquirrel.
Comment #21
DamienMcKennaFixed the drupal_set_message() calls.
Comment #22
DamienMcKennaThis removes backup schedules which only used NodeSquirrel, schedules which used Nodesquirrel as a secondary are updated to remove the secondary option, and backups which used NodeSquirrel as their primary and had a secondary will now only use the secondary.
Comment #23
wylbur CreditAttribution: wylbur at Electric Citizen commentedCC Site Test
Tested this patch using an existing Drupal 7 site with an existing Nodesquirrel installation. This included a nodesquirrel backup schedule. To test, I also added a backup script that included nodesquirrel as a secondary backup destination.
- Installed a clean copy of the 3.x-dev version of the module
- Ran update script - which fired the 7308 update script
- Applied the patch #22 - patch applied cleanly with no errors
- Ran update script - which fired the 7309 update script - this deleted the Nodesquirrel backup schedule, and updated the backup script using nodesquirrel as a secondary destination
- Patch and update process was completely successful
Searched the module for any references to nodesquirrel and found none in the codebase.
I'll leave this as Needs Review until I can test on at least one or two other installations.
Comment #24
BrankoC CreditAttribution: BrankoC as a volunteer commentedSome notes:
1)
The word 'as' should be 'has'.
2)
According to this documentation page, running update.php already clears caches. Why do it here? Is this to make the menu rebuild (which follows after the cache_clear_all() call) work?
I applied the patch and it seems to work.
Comment #25
DamienMcKennaBecause that's not always true, I've seen some scenarios where it didn't happen, e.g. half of the 7.x-2.x to 7.x-3.x issues were related to caches not being cleared properly. I'll see about refining it slightly.
Comment #26
BrankoC CreditAttribution: BrankoC as a volunteer commentedComment #28
DamienMcKennaCommitted. Thank you all.