Moodle 4.2.2 - Restore not working, where to delete running restores?

Moodle 4.2.2 - Restore not working, where to delete running restores?

Richard van Iwaarden -
回帖数:26
Particularly helpful Moodlers的头像
For a course the restore is not working. People tried to copy it using copy course or tried to restore a backup in the course. What we see now is this:






Where do we kill these running restores? I'm trying to find them in the database, but not yet succeeded.
回复Richard van Iwaarden

Re: Moodle 4.2.2 - Restore not working, where to delete running restores?

Ken Task -
Particularly helpful Moodlers的头像
When one goes to 4.2.x (lastest and greatest), one has to also run a higher version of PHP - 8.0 is min ... 8.1 is supported ... 8.2 nope.
You've 3 post recently that have similar or same issue ...

So let's start with basics:
PHP version is?
Have you check web service error logs for other clues?

Suggest going into moodledata/temp/backup/
and exploring directories present there.   Process of copy course isn't the same as backup and restore ... it's in the background ... so directory names are different.   Just seeing directory names would give a clue as to how many of your users are using 'regular' backup and restore as opposed to those who are using 'copy course' ... in background.

Any directory you find there that shows date/time stamps not current (ie, from yesterday) are failed restores ... for whatever reason.   They may contain clues and then again they may not.   At any rate, they serve no purpose now and should manually be removed or else if this continues, you could end up with a lot less space available.

Others have reported the same issues .. obviously there is something wrong ... no one has solved yet! 伤心   One user had reported the same issue with 'Pending ...'.   I too have seen it ... in my case I was able to go to the category of courses and at the bottom I could see those 'Pending' and delete them.
The other user tried that and no go, so last resort .. carefully check the mdl_courses table (id,coursename,other columns) and the bottom of that listing look for 'pending course names'.   Carefully remove those rows.

If it's broken ... don't use it! :|

Now onto attempting to respond to another of your postings.

'SoS', Ken

回复Ken Task

Re: Moodle 4.2.2 - Restore not working, where to delete running restores?

Richard van Iwaarden -
Particularly helpful Moodlers的头像
Running PHP Version 8.0.30, do you recommend going to 8.1? Because we can switch easily, but I thought 8.0 was recommended.

Our course backups are just not running properly and quit some stuff is going on. THe most curious thing I discovered is this: we had Moodle 3.11 set up to start coursebackups in cronjob (run from cli) every night at 2:00 h. Then, suddenly, after the upgrade to Moodle 4.2.2 we noticed it starting at 0:30h. We haven't changed anything. Also, we see it start up, running about 9-10 coursebackups and then just stopping. The admin-mail about autobackup shows this:

Summary
==================================================
Courses: 18140
OK: 0
Skipped: 16014
Error: 0
Unfinished: 18
Course backup ad hoc task pending: 2105
Warning: 0
Automated backup pending: 3

Some of your courses weren't saved!!

Despite saying that OK:0, we see that it did backup around 10 courses. The 'Course backup ad hoc task pending: 2105' is getting higher every night.

I wish I could do one 'great reset' and restart all of this. I will dive into moodledata/temp/backup now.
回复Richard van Iwaarden

Re: Moodle 4.2.2 - Restore not working, where to delete running restores?

Ken Task -
Particularly helpful Moodlers的头像
Does automated hit the same course and fail?   That's one thing I've always hated about autobackups ... no way to exclude a course or courses having issues.   Auto hits the course having issues, then doesn't recover well ... stops.   Builds up each night ... until????

You might have to resort to finding out which courses the largest and then creating a bash shell script to handle just those in one run  and then another bash shell script to handle all other others.

When pending adhoc builds up you might never catch up.

When it gets that bad, one might need to truncate the tables that track auto.  Moodle has no record of anytthing auto then thus it would be like the first time it ran ... but ... you hit those same courses having issues, and back to square one.

Inspection of failed backup directories in moodledata/temp/backups/ might give some clues ... minimally the course ID's having issues and thus could exclude those ID's in the bash shell script that loops through courses and runs moosh to back them up.

18140 courses ..  skipped 16014 ... so what's the status of those that were skipped?   Are they still being used?  There is an option in auto to skip courses that have not changed.

Your situation might be due to the diff between 3.highest and 4.highest ... always major changes in such upgrades, but wonder, if you have been facing this same thing, year after year, if an overall change in strategy might need to be considered.

There are entities that clone the site to another server - different fully qualfied domain name - like lms2023-24.tld -  get that running, upgrade, then use moosh to reset all courses ... backup preferences changed to make no user backups.   Run one set of course backups via looping clii script that saves those nu's to an archive directory.   After that completes, change back backup preferences for when teachers might use.

Auto backups not turned on until after the start of the next academic session/semester ... say 2 weeks into.

Any course not to be used is deleted ... recyclebin set to keep for 1 second.

Now while all that is going on, a MySQL Tuner check is run ... tweaks applied as needed.   Ditto PHP settings ... time for a script can run, memory a script can consume ... many things boosted upwards to handle the massive work being done.   After completion of prep, those might need to be reset back to original settings for remainder of academic session.

Since you are not alone in admin-ing your Moodle, might want to talk to your IT/server/db admins, etc. persons.

'SoS', Ken



回复Ken Task

Re: Moodle 4.2.2 - Restore not working, where to delete running restores?

Richard van Iwaarden -
Particularly helpful Moodlers的头像
Does automated hit the same course and fail?   That's one thing I've always hated about autobackups ... no way to exclude a course or courses having issues.   Auto hits the course having issues, then doesn't recover well ... stops.   Builds up each night ... until????

The problem is, the automated backup does not fail nor gives it any errors. The Email clearly says 'Error: 0'. It just stops. I have set the task processing up like this, dont know if this has anything to do with it:



You might have to resort to finding out which courses the largest and then creating a bash shell script to handle just those in one run  and then another bash shell script to handle all other others.

When pending adhoc builds up you might never catch up.

Yes, that's my fear. But with only 10 backups per night, we will never catch up. I need to make sure this will run total. Perhaps I need to run the script multiple times, f.e. every 30 minutes at night. I think Moodle will backup around 10 courses every time, and not the same ones.

When it gets that bad, one might need to truncate the tables that track auto.  Moodle has no record of anytthing auto then thus it would be like the first time it ran ... but ... you hit those same courses having issues, and back to square one.

Inspection of failed backup directories in moodledata/temp/backups/ might give some clues ... minimally the course ID's having issues and thus could exclude those ID's in the bash shell script that loops through courses and runs moosh to back them up.

moodledata/temp/backups/ only holds 46 files of 0 bytes. Nothing else. I think that 's good no?

18140 courses ..  skipped 16014 ... so what's the status of those that were skipped?   Are they still being used?  There is an option in auto to skip courses that have not changed.

For your other solution: yes, thought about something similar. But I need another summer holiday to make sure no one is working. But if I look at the logs, our Moodle is being used 24/7.
回复Ken Task

Re: Moodle 4.2.2 - Restore not working, where to delete running restores?

Richard van Iwaarden -
Particularly helpful Moodlers的头像
AHA. Found something misleading. You can start the 'automated backup job' from command line, as much as you like. It will not create backups for you. What it does, is tell you that the backups are being scheduled. The settings at /admin/settings.php?section=automated will force it upon you that you can only actually run the backup-tasks once every 24 hours.

So my idea of running it more often within 24 hours is not possible, at least that's what I understand now.
回复Richard van Iwaarden

Re: Moodle 4.2.2 - Restore not working, where to delete running restores?

Ken Task -
Particularly helpful Moodlers的头像
'... misleading ..." or mis-understood? :|

Auto backups are scheduled as you know and now have verified you know.
So regardless of how many times to try to run the cli script, it will tell you ... 'not time yet'.

Which brings me another point of investigation ... can you really believe what moodle reports?   Case in point, something that fails, can moodle record that failure or was the failure so severe that moodle didn't get a chance to record?

Asked of you some time ago about web server error logs?   Have you looked at those?   How about DB server logs or a tuner run?

24/7 ... yes, server is online all the time .... but really???? ... are students and teachers using 24/7?   There are indeed prime times when used the most ... but there also times in which there might be only 1 user ... in hours.

In situation like you are in ... you might have to change your office days and hours - Sun 6 AM til 12N you are working on server.  Sat. night from 10PM til whenever the coffee runs out!

Now that's legit traffic ... what of the wanna be crackers and hackers?   Don't tell me you have none of those in your student body!!!!

'SoS', Ken

回复Ken Task

Re: Moodle 4.2.2 - Restore not working, where to delete running restores?

Richard van Iwaarden -
Particularly helpful Moodlers的头像
;)

I will come back to the errors. So far I didn't see anything usefull in the error logs, but will recheck.

The most requested feature from students in our Moodle is a night-mode Ken 微笑 On Campus I have noticed that many, many students work at night. Also we have 1 in 5 international students, some of them operating in different timezones. I can really even see students working on the night of December 31st and the morning of January 1st. I am a bit worries about there mental state though...

Crackers and hackers are fortunately not something I have to worry about. I hired people to do the worrying for me.
回复Ken Task

Re: Moodle 4.2.2 - Restore not working, where to delete running restores?

Richard van Iwaarden -
Particularly helpful Moodlers的头像
I think I found it. Why are there 9 tasks running for 17 hours or longer? These should have been killed after 30 minutes, at least that is my setting in Moodle. Check this:



So what happens actually makes sense. The backup process starts but it finds 9 concurrent tasks running. So the rest gets queued. I have no idea how to kill these tasks and why are they holding up everything... to bad I see task ID, process ID... but no course ID.
回复Richard van Iwaarden

Re: Moodle 4.2.2 - Restore not working, where to delete running restores?

Ken Task -
Particularly helpful Moodlers的头像
Don't see a 'process ID' in that screen shot.  If it were a true server processs ID one could kill it via command line:

kill -9 [pid]

Command line foo again ...
ps aux |grep php
Would/should show all the processes running php.
See one that is a stuck autobackup process?
Then kill -9 thatstuckautoprocessid#

There is a table that controls that I would think.
Find the table ... truncate the table.

It's not working so anything in that table is basically junk ... and don't think you can break this even more! 微笑

'SoS', Ken

回复Ken Task

Re: Moodle 4.2.2 - Restore not working, where to delete running restores?

Richard van Iwaarden -
Particularly helpful Moodlers的头像
Yep, truncated all the entries for auto backup as there were 2200+ queued tasks. Let see how it runs tonight, start with a clean slate. I have altered some settings, unistalled some old plugins that are not guaranteed to work with Moodle 4.2.2 anyways. Also ran into the bug where filenames can't hold a ; in the filename (there's a tracker for that - found it, fixed it)

Perhaps everything will be running OK from now on. Fingers crossed.
回复Richard van Iwaarden

Re: Moodle 4.2.2 - Restore not working, where to delete running restores?

Ken Task -
Particularly helpful Moodlers的头像
Truncating means 18140 courses.
Did you reset the time to start to a time earlier than before?

Granted, not fair to compare, but I support a K12 server that has 219 courses and if I re-call correctly before upgrading it from 3.highest to 4.1.highest did a cli script to run backups of all of them (no user and they had been reset as well) ... took 3 hours.

Guess we'll never really know how this situation came to be considering that:
"altered some settings,unistalled some old plugins ..., fixed bug" but
I do wish you luck! 微笑

'SoS', Ken

回复Ken Task

Re: Moodle 4.2.2 - Restore not working, where to delete running restores?

Richard van Iwaarden -
Particularly helpful Moodlers的头像
Eh... yes, I did forget something. Probably to reset the timer smile



Do you know Ken how to really start with a clean slate?
回复Richard van Iwaarden

Re: Moodle 4.2.2 - Restore not working, where to delete running restores?

Ken Task -
Particularly helpful Moodlers的头像
What table did you truncate?

We seem to be confused ... we have 2 issues: autobackup + async copy of courses.   Autobackup is done by cron and the auto schedule settings.   Async copy of a course is something done by a teacher - it's not automated.

The schedule for auto backups needs to be reset ... I think I'd make it to run beginning next Friday @ 5PM ... that gives the entire weekend to complete  before usage picks up on Monday - given the number of courses it will do - all of them?

The debug you shared here in your last post is one ... just one ... async copy ... which isn't auto backups.   Guessing it was stuck in adhoc task already.

'SoS', Ken

回复Richard van Iwaarden

Re: Moodle 4.2.2 - Restore not working, where to delete running restores?

Ken Task -
Particularly helpful Moodlers的头像
"Do you know Ken how to really start with a clean slate?"

Not offended but ... there doesn't seem to exist any docs on how to 'really' restart autobackups with a clean slate.   Would seem logical to truncate any tables that track autobackup which would then (I assume) set the server in such a fashion as autobackup had never been run before.

I came to the 'lightbulb' discovery on a K12 (large [10,000+ users) - maybe not the size of a Uni/Edu, but definetly used (really abused) more than Uni/Edu on a daily basis as teachers use their courses not async but blended ... while standing in front of their classes - all students in the moodle as well.

Maybe there should be a forum for 'True Edu's" or "Large Sites over X-thousands" !!!!   Somehow, I don't think fits the current structure of these forums! 微笑

'Spirit of Sharing', Ken

回复Ken Task

Re: Moodle 4.2.2 - Restore not working, where to delete running restores?

Richard van Iwaarden -
Particularly helpful Moodlers的头像
Hi Ken,

I have found a course that I can't backup from within Moodle. Not by going to the course and choosing backup (it will stop at 89%) and also doesn't work from autobackup.

Now when I use Moosh to backup the course, it works fine. But Moosh shows me this:

/moosh.php -t -v -p ../public_html/ course-backup 22675
Moodle version detected: 402
Warning: session_start(): Session cannot be started after headers have already been sent in /home/learn/moosh/moosh.php on line 303
Warning: session_regenerate_id(): Session ID cannot be regenerated when there is no active session in /home/learn/public_html/lib/classes/session/manager.php on line 617

Both are just warnings and I don't think this will crash the backups done by Moodle. What are your thoughts on this?
回复Richard van Iwaarden

Re: Moodle 4.2.2 - Restore not working, where to delete running restores?

Ken Task -
Particularly helpful Moodlers的头像
First, that one course, halts your auto backups.   No way to exclude a course from autobackups.

How and where is moosh installed?
/moosh.php kinda indicates it's at the root of your server.

Your moodle code appears to be in /home/learn/public_html/
In the error logs you show this:
/home/learn/moosh/moosh.php

Have you upgraded moosh?
moosh -n [ENTER]
should show list of commands and at the top, the version of moosh.
For moodle 4.2.2 moosh version should be at least moosh 1.11.
but I see there is newer available:

See the above page for how to install - the symlink comment.

moosh commands have to issued inside moodle code directory because it uses config.php for info.

Now you get to educate me ... 微笑
Why the -t -v -p in the command?

'SoS', Ken

回复Ken Task

Re: Moodle 4.2.2 - Restore not working, where to delete running restores?

Richard van Iwaarden -
Particularly helpful Moodlers的头像
I will check for the location of Moosh. I think we did update.

About the -t -v -p.... I just stole the command from Peter, you know him 微笑 I don't know what it does. Perhaps nothing and it just looks more interesting haha
回复Richard van Iwaarden

Re: Moodle 4.2.2 - Restore not working, where to delete running restores?

Ken Task -
Particularly helpful Moodlers的头像
Hmmmm ... 'devils' are always in 'details'!
"... just looks more interesting haha"
For others who might also want to know:

-v version
-p same as --moodle-path=Moodle Code directory
-u Moodle user ... default is ADMIN
-n Don't check if moodle data is owned by the user performing the scripts
-t show performance info including timings

Seen using -h which is help.

And for others ... IMHO ... adding switches to commands without knowing what those swtches do, is a VERY BAD practice on a production server.   Ok to do on a tinker box ... used for learning - hopefully, not the hard way! 微笑

My 2 'sense' of course! 微笑

@OP ... got your auto backup running again?

'SoS', Ken

回复Ken Task

Re: Moodle 4.2.2 - Restore not working, where to delete running restores?

Richard van Iwaarden -
Particularly helpful Moodlers的头像
Nope, auto backup is turned off for now as it is eventually crashing the entire Moodle site. I created some trackers for that.

I hope the new release on October 9th will solve problems (I heard it had over 300 bugfixes). When I do an upgrade, I will turn auto backup on again. Until that moment we only have server backups. Which are horrible in our case (around 4 terabytes I think).

Basically: no course backups for the time being 伤心
回复Richard van Iwaarden

Re: Moodle 4.2.2 - Restore not working, where to delete running restores?

Ken Task -
Particularly helpful Moodlers的头像
0 backups is risky business! 伤心
Site backup ... bet the lions share of site backup is moodledata/filedir/ - making a tar.gz of that takes too long, so there is a 'better' way ... rsync it - progressively - that makes a mirror of it really.   So you will need same space filedir currently uses.

man rsync - if you have the online manual installed will show commands and options.

Course backups ... could be done with moosh ... did you get moosh working?  moosh backup command in a looping bash shell script that loops through course ID's.   In your case with 18,000 courses plus, you might need to evenly divide the course ID files into 1/7's - one per day - and yes, that would take a week to complete for all courses but you have something then ... which is better than nothing!

Using git?
Just today:
$release  = '4.2.2+ (Build: 20230920)'
The following is what changed:
 admin/category.php                                 |   3 +-
 admin/environment.xml                              |   2 +
 admin/index.php                                    |   6 +-
 admin/renderer.php                                 |   6 +-
 admin/searchreindex.php                            |   2 +-
 admin/settings.php                                 |   4 +-
 admin/settings/appearance.php                      |  12 +++
 admin/tool/filetypes/delete.php                    |   2 +-
 admin/tool/filetypes/edit.php                      |   2 +-
 admin/tool/filetypes/index.php                     |   2 +-
 admin/tool/filetypes/revert.php                    |   2 +-
 admin/tool/mobile/classes/api.php                  |   8 +-
 admin/tool/mobile/logout.php                       |   2 +-
 admin/webservice/documentation.php                 |  20 ++--
 auth/ldap/ntlmsso_attempt.php                      |   2 +-
 auth/ldap/ntlmsso_finish.php                       |   2 +-
 auth/shibboleth/login.php                          |   2 +-
 blog/edit.php                                      |   6 +-
 blog/external_blog_edit.php                        |   2 +-
 blog/external_blogs.php                            |   2 +-
 blog/lib.php                                       |  19 ++--
 blog/preferences.php                               |   2 +-
 cache/classes/loaders.php                          |   3 +-
 calendar/delete.php                                |   2 +-
 calendar/view.php                                  |   4 +-
 course/delete.php                                  |   4 +-
 course/edit.php                                    |   2 +-
 course/editcategory.php                            |   2 +-
 .../amd/build/local/content/bulkedittools.min.js   | Bin 4293 -> 5339 bytes
 .../build/local/content/bulkedittools.min.js.map   | Bin 10669 -> 13566 bytes
 .../format/amd/src/local/content/bulkedittools.js  |  46 ++++++++
 .../output/local/content/bulkedittoggler.php       |   7 ++
 .../local/content/bulkedittoggler.mustache         |   4 +-
 course/renderer.php                                |   6 +-
 course/search.php                                  |   4 +-
 .../activity_resource_description_display.feature  |  71 ++++++++++++
 course/view.php                                    |  10 +-
 customfield/field/textarea/lib.php                 |   2 +-
 customfield/lib.php                                |   3 +-
 grade/edit/tree/action.php                         |   4 +-
 .../tests/behat/behat_gradingform_rubric.php       |  60 ++++++-----
 grade/lib.php                                      |  69 +++++++++---
 grade/report/grader/lib.php                        | 119 +++++++++++----------
 .../collapse/collapseresultitems.mustache          |   4 +-
 .../report/grader/templates/collapse/icon.mustache |   2 +-
 grade/report/grader/tests/behat/locking.feature    |  63 +++++++++++
 .../singleview/classes/local/screen/tablelike.php  |   2 +-
 .../classes/local/ui/dropdown_attribute.php        |   1 -
 .../singleview/classes/local/ui/text_attribute.php |   2 -
 .../templates/dropdown_attribute.mustache          |   2 +-
 .../singleview/templates/text_attribute.mustache   |   3 +-
 h5p/libraries.php                                  |   2 +-
 h5p/overview.php                                   |   2 +-
 h5p/tests/generator/lib.php                        |   9 +-
 index.php                                          |   2 +-
 install/lang/no/install.php                        |   2 +-
 lang/en/admin.php                                  |   5 +
 lang/en/backup.php                                 |   2 +-
 lang/en/courseformat.php                           |   1 +
 lang/en/moodle.php                                 |   6 +-
 lib/adminlib.php                                   |   4 +-
 lib/classes/oauth2/client/linkedin.php             |  32 ++----
 lib/classes/oauth2/service/linkedin.php            |  76 +++----------
 lib/classes/task/scheduled_task.php                |   5 +
 .../tiny/plugins/equation/amd/build/ui.min.js      | Bin 6025 -> 6212 bytes
 .../tiny/plugins/equation/amd/build/ui.min.js.map  | Bin 11806 -> 12200 bytes
 lib/editor/tiny/plugins/equation/amd/src/ui.js     |  25 +++--
 lib/external/classes/external_api.php              |   4 +-
 lib/form/amd/build/collapsesections.min.js         | Bin 2545 -> 2555 bytes
 lib/form/amd/build/collapsesections.min.js.map     | Bin 5637 -> 5687 bytes
 lib/form/amd/src/collapsesections.js               |   8 +-
 lib/form/classes/external/dynamic_form.php         |   7 ++
 lib/grade/constants.php                            |   2 +-
 lib/grade/grade_category.php                       |  26 ++---
 lib/grade/grade_item.php                           |  14 ++-
 lib/grade/tests/grade_category_test.php            |  10 +-
 lib/installlib.php                                 |   2 +-
 lib/pagelib.php                                    |  46 ++++++--
 lib/resourcelib.php                                |   4 +-
 lib/templates/external_content_banner.mustache     |   3 +-
 lib/tests/behat/behat_general.php                  |  32 ++++++
 lib/tests/behat/behat_hooks.php                    |   2 +-
 lib/tests/behat/readonlyform.feature               |  38 +++----
 lib/tests/moodle_page_test.php                     |  63 ++++++++++-
 lib/tests/task/scheduled_task_test.php             |  46 ++++++--
 lib/upgrade.txt                                    |  12 +++
 lib/upgradelib.php                                 |  22 +++-
 lib/weblib.php                                     |   1 -
 login/index.php                                    |   4 +-
 login/logout.php                                   |   4 +-
 message/output/popup/notifications.php             |   2 +-
 mod/assign/tests/behat/page_titles.feature         |  10 +-
 mod/glossary/tests/behat/create_entry.feature      |  16 +++
 mod/lti/register.php                               |   2 +-
 mod/lti/registersettings.php                       |   2 +-
 mod/lti/toolconfigure.php                          |   2 +-
 mod/lti/toolproxies.php                            |   2 +-
 mod/lti/toolssettings.php                          |   2 +-
 mod/lti/typessettings.php                          |   2 +-
 mod/quiz/classes/form/edit_override_form.php       |   2 +-
 mod/scorm/aicc.php                                 |  35 +++---
 .../all_calculated_for_qubaid_condition.php        |  25 ++++-
 question/format/aiken/format.php                   |   4 +
 .../type/multianswer/amd/build/feedback.min.js     | Bin 0 -> 943 bytes
 .../type/multianswer/amd/build/feedback.min.js.map | Bin 0 -> 2162 bytes
 question/type/multianswer/amd/src/feedback.js      |  53 +++++++++
 question/type/multianswer/renderer.php             |   7 +-
 report/insights/done.php                           |   2 +-
 report/log/index.php                               |   2 +-
 user/editadvanced.php                              |   3 +-
 user/emailupdate.php                               |   2 +-
 user/profile.php                                   |  12 +--
 version.php                                        |   4 +-
 113 files changed, 926 insertions(+), 399 deletions(-)
 create mode 100644 course/tests/behat/activity_resource_description_display.feature
 create mode 100644 grade/report/grader/tests/behat/locking.feature
 create mode 100644 question/type/multianswer/amd/build/feedback.min.js
 create mode 100644 question/type/multianswer/amd/build/feedback.min.js.map
 create mode 100644 question/type/multianswer/amd/src/feedback.js

When one is on the 'leading edge', best to be able to get fixes ASAP - IMHO!

'SoS', Ken

回复Ken Task

Re: Moodle 4.2.2 - Restore not working, where to delete running restores?

Richard van Iwaarden -
Particularly helpful Moodlers的头像
Oh, some more info in the Moosh error-log file:

[08-Sep-2023 12:31:43 UTC] PHP Warning: Module "sodium" is already loaded in Unknown on line 0
[08-Sep-2023 14:31:43 Europe/Amsterdam] PHP Warning: session_start(): Session cannot be started after headers have already been sent in /home/learn/moosh/moosh.php on line 303
[08-Sep-2023 14:31:43 Europe/Amsterdam] PHP Warning: session_regenerate_id(): Session ID cannot be regenerated when there is no active session in /home/learn/public_html/lib/classes/session/manager.php on line 617
[08-Sep-2023 14:32:24 Europe/Amsterdam] Potential coding error - existing temptables found when disposing database. Must be dropped!
[08-Sep-2023 12:32:33 UTC] PHP Warning: Module "sodium" is already loaded in Unknown on line 0
[08-Sep-2023 14:32:33 Europe/Amsterdam] PHP Warning: session_start(): Session cannot be started after headers have already been sent in /home/learn/moosh/moosh.php on line 303
[08-Sep-2023 14:32:33 Europe/Amsterdam] PHP Warning: session_regenerate_id(): Session ID cannot be regenerated when there is no active session in /home/learn/public_html/lib/classes/session/manager.php on line 617
回复Ken Task

Re: Moodle 4.2.2 - Restore not working, where to delete running restores?

Séverin TERRIER -
Documentation writers的头像 Particularly helpful Moodlers的头像 Testers的头像 Translators的头像
Hi Ken,

About the ability to exclude some courses from automatic backups, i created MDL-60296 some years ago. And provided some lines of code to do it (just a hack, hard coded).

The code in backup/util/helper/backup_cron_helper.class.php is pretty good i think, but it would need a real clean solution with a dedicated admin option to define courses to avoid via UI.

It as been closed as won't do by inactivity, but had some votes. Perhaps it would be useful to comment on it, and perhaps reopen it...

HTH,
Séverin
回复Séverin TERRIER

Re: Moodle 4.2.2 - Restore not working, where to delete running restores?

Ken Task -
Particularly helpful Moodlers的头像
Thanks, Séverin.
Wonder why marked as 'won't do'!   Hmmmm ... not enough votes?
How many votes does it take to reach 'will do'? :|

Would like to avoid hacking core code if at all possible ... regardless of how small it is!  But will keep the link ... just in case there is no other way on some systems.

Maybe the OP is 'game' though! 微笑

'SoS', Ken

回复Ken Task

Re: Moodle 4.2.2 - Restore not working, where to delete running restores?

Séverin TERRIER -
Documentation writers的头像 Particularly helpful Moodlers的头像 Testers的头像 Translators的头像
Hi Ken,

As explained in the comment posted explaining why it's been closed, there are several reasons, including "less than 30 votes", and it has 24 votes.

As far as i know, there is no number of votes which implies "it will be done". But the more, more chances...

Like you, if i can avoid hacking the code, i avoid. But when i don't have too many choices, and as i've never took enough time to go into Moodle's development, i sometimes include little hacks.

But i'm pretty sure that someone knowing well Moodle coding, with an admin page for a plugin would code it in less than an hour (or two)...

Séverin
回复Séverin TERRIER

Re: Moodle 4.2.2 - Restore not working, where to delete running restores?

Ken Task -
Particularly helpful Moodlers的头像
Hmmm ... maybe it's time for a little AI scraping of forum post and an auto vote if the AI can be intelligent enough?

Guess git stash would be appropriate for such a minor hack, but how does that affect the fix coming in future git pulls?

Anyhoo ... the 'spin goes on'! 微笑
'SoS', Ken

回复Ken Task

Re: Moodle 4.2.2 - Restore not working, where to delete running restores?

Richard van Iwaarden -
Particularly helpful Moodlers的头像
BTW, I found something easy to fix the running restores. If you look into the HTML codes, the progress bar has the backup ID into it. So I just deleted these from the database, now they are gone.