Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backups not working if backup_auto_destination for automated backups is set #233

Open
ksteitz opened this issue Dec 4, 2024 · 4 comments
Assignees

Comments

@ksteitz
Copy link
Collaborator

ksteitz commented Dec 4, 2024

The creation of course backups using lifecycle does not work if ‘backup_auto_destination’ (/admin/settings.php?section=automated) is set to a valid value (green tick) for Automated backups. Course backups are only created via lifecycle if an invalid path is set here (red x).

Plugin version: v4.4-r1 (2024042300)
Moodle 4.4.4
pg 13
tool_lifecycle | backup_path set to mounted NFS share

Thanks for investigating and regards
Klaus

@ksteitz ksteitz added the bug label Dec 4, 2024
@bluetom bluetom self-assigned this Jan 7, 2025
@bluetom
Copy link
Contributor

bluetom commented Mar 9, 2025

Sorry, but I could'nt reproduce this behavior. The backup was created with the green tick present and in the lifecycle code itself this setting plays no role...mysterious...

BR,
Thomas

@bluetom
Copy link
Contributor

bluetom commented Mar 10, 2025

... is there an error message during or after the backup step run? Or seems everything to work but there is no backup_file to be found in the lifecycle_backup folder after the backup?

@ksteitz
Copy link
Collaborator Author

ksteitz commented Mar 17, 2025

the course that is to be backuped causes NO backup-file and is listed at "Error handling" (/admin/tool/lifecycle/errors.php) with:

moodle_exception: error/Es wurde kein Backup in dem angegebenen Pfad erstellt.
#0 /var/www/html/moodle/hrz-mdl/admin/tool/lifecycle/step/createbackup/lib.php(70): tool_lifecycle\local\manager\backup_manager::create_course_backup()
#1 /var/www/html/moodle/hrz-mdl/admin/tool/lifecycle/classes/processor.php(123): tool_lifecycle\step\createbackup->process_course()
#2 /var/www/html/moodle/hrz-mdl/admin/tool/lifecycle/classes/task/lifecycle_task.php(63): tool_lifecycle\processor->process_courses()
#3 /var/www/html/moodle/hrz-mdl/lib/classes/cron.php(405): tool_lifecycle\task\lifecycle_task->execute()
#4 /var/www/html/moodle/hrz-mdl/lib/classes/cron.php(208): core\cron::run_inner_scheduled_task()
#5 /var/www/html/moodle/hrz-mdl/lib/classes/cron.php(125): core\cron::run_scheduled_tasks()
#6 /var/www/html/moodle/hrz-mdl/admin/cli/cron.php(186): core\cron::run_main_process()
#7 {main}

Maybe it depends on environment like database or PHP-Version?
Did you test using PostgreSQL or just MySQL?
We have: pg13, PHP 8.1, Moodle 4.4, lifecycle v4.4-r1 (2024042300)

@bluetom
Copy link
Contributor

bluetom commented Mar 18, 2025

Thank u for the information, Klaus!
I could reproduce it (it is in fact exactly as you said) and I am already working on a solution. With that done the issues marked with "Version 4.5" (and some other small cosmetics) are coded, the automated tests are green and only some testing by clicking around lies between us and the publication of lifecycle version 4.5...

bluetom added a commit that referenced this issue Mar 19, 2025
…dicator delayed courses, fix missing courses error page (#228)
bluetom added a commit to bluetom/moodle-tool_lifecycle that referenced this issue Mar 24, 2025
* introduce tabs

* better edit workflow title

* new wf edit header

* change to tab links

* exclude hidden courses of remaining course list if user has not capability viewhiddencourses

* fix settings to work with subplugins correctly

* fix settings problems, subplugin descriptions, version.php of subplugins, counters in the tabs

* change ci to test only against 4.5

* remove additional process class fields for error message table

* fix error writing wf error table

* fix name of uploadfile

* use label of filepicker for testing

* steps and triggers: increase instancename length to 100 and check maxlength in the forms

* step link in wf overview only if courses > 0

* line break in course list of plain text email, nicer course list popup in wf overview

* fix creating backup by changing to mode_general (learnweb#233), fix amount indicator delayed courses, fix missing courses error page (learnweb#228)

* make adminapprove step included, display delayed courses, triggered courses and excluded courses lists in workflowoverview
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants