can we rename instead of delete the old plugins during the update ?

can we rename instead of delete the old plugins during the update ?

by REMI PICARD (substitute) -
Number of replies: 4

hi,

when you update a plugins, the system says :

[Warning] Target location already exists and will be removed [/home/www/local/autogroup]

is there an option to not delete the location but just renamed it whith version name ?

By example, i wish autogroup_2019010300 to keep a file backup og the old release installed.


thank you for any advice and your time to reply.


best regards

Average of ratings: -
In reply to REMI PICARD (substitute)

Re: can we rename instead of delete the old plugins during the update ?

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

I don't know what you're doing when you upgrade plugins, but you shouldn't get a warning like that. 

What's your process for updating plugins?

In reply to Howard Miller

Re: can we rename instead of delete the old plugins during the update ?

by REMI PICARD (substitute) -

hi,


 like usual, i click the button "install the update" under the plugin name, then i click the other button to update the database.

Maybe this messag/log depends of configuration of the server.

i always saw that kind of message when i update a plugin under moodle 3.5.

That 's how i discover the update process might delete the old plugin folder then recreate a new one for the update.

Moodle should perform a rename backup with date in the name....it would be more sure in case of....

best regards

In reply to REMI PICARD (substitute)

Re: can we rename instead of delete the old plugins during the update ?

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Personally, I would never use that feature on a live site. There are lots of reasons but the big one is that you must have insecure permissions for it to work. It also means that you are introducing code you haven't tested.
In reply to REMI PICARD (substitute)

Re: can we rename instead of delete the old plugins during the update ?

by Ken Task -
Picture of Particularly helpful Moodlers

One sees that in the graphical update of a plugin.

If you made a backup of code prior to updating plugins then you already have the old version moodle is about to replace.

However, in paranoid mode, one could hide the plugin directory where it resides via command line from local directory ... 

mv autogroup .autogroup
and apache/moodle won't see it to remove.

'SoS', Ken