Re: Ynt: Re: Ynt: Re: Migration filesdir Files not opening
Asynchronous backup Error
Hi all,
I need some urgent fixes on this Asynchronous backup progress to stop. I tried to copy the course..Unfortunately, i am receiving this error..(Even my asynchronous backup is enabled off ) tried all possible way to stop this process pending but I cant stop this.
1, Attempt to delete the course but I cant
2, Tried by deleting all contents in course tried yo stop that also doesn't work
Could anyone help me to resolve this error ASAP in the Site Administration way or in the Coding way..
Awaiting your reply.
Re: Asynchronous backup Error
What version of Moodle are you running?
Is the cron job running correctly?
Please see:
https://tracker.moodle.org/browse/MDL-28505
'SoS', Ken
My database is fully corupted , how can i recover some blocks
Hello all,
My database is fully corupted. I got a backup, but it cannot be restored. However, i used a binlog 2 sql method to recover all the new data. (Some of data like users have been missed, i can manually get them) I really needed to get courses, sections and quiz, assignment blocks.
However, i checked on context table, it has the block and everything in a right format, as i think. However, some of blocks and section can be seen in the moodle lms, but blocks such as quiz, lessons have been missed.
Please let me know what can i do.
Re: My database is fully corupted , how can i recover some blocks
Best bet, once you have what you can get, dump everything, delete everything, database, code, all the directories and everything else. Create a vanilla install of your Moodle, maybe even a newer version, but not too new, too far from your current install, replace the database with your backup. That should get you off the hook. If you have time, then you may be able to insert the recovered data before you restore the database, again via phpMyAdmin. Good luck.
Creating large backup file is problem in course
Hi,
I use moodle 3.9.1 on my server
whenever I try to create a backup of any of my course fully at a time as one single backup file it never performs if that is more than an average size like 1GB or 1.5 GB(its works if it 300MG or 800MB not the exact size between any amount)
It starts creating it do some percentage 0% to 95% and stuck there only. like this below snippet
Then I do make parts of course from 1 to 4 topics then 5 to 9 similarly do entire course backup but is a time-consuming process.
Is there any way to create 1 single backup of a course no matter the size of the file (it should work for more than 1GB cause less than that I can create a backup file)?
I found this link but much understand
https://docs.moodle.org/36/en/Course_backup
Course backup stops above 90%, not showing any errors
any help would be appreciated
with regards
Praveen Kota
Re: Creating large backup file is problem in course
Re: Creating large backup file is problem in course
Yeah, there is no admin tool to tell you when a course is getting to large to backup! :\
Have command line access to your server? If so, there is a command line only backup.php script in admin/cli/ that might be able to work ... takes web service out of the loop and is just php talking to your DB and file system then. Uses whatever the defaults are for backup preferences.
Then, however, if that does work, now have the other side of that coin ... can you restore that course backup? No command line script to restore.
However, there is moosh ... which does have a command line restore.
'SoS', Ken
Merging 2 Moodle Sites
Merge two moodle instances with user-data
Problem Statement:
I want to merge 2 moodle instances
- Merge includes user, user-data, courses, assignments & submissions, etc.
- The first site is running on Moodle version 2.8 & the second one has Moodle version 3.9.1.
- I want to backup all the mentioned data & restore it to the second site.
I have the following queries:
- Will course backup/restore with user-data able to create missing users on the second site?
- What if courses/ users already exist in a new instance?
- Will backup/restore include submission files (like images)?
- Is there any other better solution for merging data on two different moodle instances?
- What precautions need to be taken before/while proceeding with backup/restore?
moving question bank from one moodle site to another
Hi,
I'm the admin of two Moodle sites, A and B. I would like to copy some questions from the question bank of site A to site B. I wouldn't want to move any other content (resources and activities) and I would like to keep all content of site B in the current state.
How could I proceed?
Luigi
Re: moving question bank from one moodle site to another
Not sure if there is something an Admin user could do at the site level?
Ri: Re: moving question bank from one moodle site to another
thanks for answering my question.
I saw the "Export question bank to a file" page of my Moodle site (A).
It asks me to choose a file format: Aiken, GIFT, XML or XHTML.
Can you help me decide which of them is a good choice for me to perform the operation I wrote in the topic?
Please note that I have all kinds of questions (numeric, short answer, cloze, ...) and some questions contain images in the text, too.
I would like to move questions from site A to site B while keeping all their properties.
Luigi
Question regarding automated backup process
Good day everyone,
I'm hoping you could answer this.
I've set the Automated backup storage to "Specified directory for automated backups".
Whenever the automated backup task is run, over a thousand courses, do the .mbz files stay in temp/backup in bulk before being transferred to the "Specified directory" or do they get transferred one at a time as soon as a single .mbz is done compiling?
Re: Question regarding automated backup process
One at a time. There must be a reason you are asking ... like you are not seeing 'over a thousand course' backups (.mbz files) in designated directory?
In that case, check moodledata/temp/backup for failed backups ... evidenced by a 'hash' named directory that contains no 'backup.mbz' nor a moodle_backup.xml - but does contain other xml files and related directories.
Check web server error logs also.
If going further ... would be a good idea to share version of Moodle and set up of your system(s) as well as how hosted (where wouldn't hurt either).
'SoS', Ken
Re: Question regarding automated backup process
Yes I'm worried because some backups have failed before and remain stuck in the temp/backup folder before they are successfully transferred to the "Specified directory".
So is it safe to say that once the .mbz file has been successfully compiled it will be "moved" to the "Specified directory" right away and will no longer appear in the temp/backup?
Re: Creating large backup file is problem in course
Sorry for the late replay I haven't checked
As said using CLI I can try but this is messing with the production server so is there any suggested code which you use.
Because I never tried CLI
thanks in advance
Re: Creating large backup file is problem in course
Sorry for the late replay I haven't checked
As you suggested to " increase post_max size and server timeout " I will try this and let you know
Can you please tell me what time would you prefer set for server timeout and post_max size
one of my courses max size is like 3GB
thanks in advance
Re: Question regarding automated backup process
'safe to say' ... well, not really. The backup.mbz file is *copied* ... not 'moved' (there is a difference) ... so for a little while there the space occupied is about 2 times the space used by the course - 1 of those a dup in build area and the other (the .mbz file) compressed.
'remain stuck in ...' not a good sign ... go into one of those failed backup directories. Is there a moodle_backup.xml file and a 'backup.mbz' file? If not, no way of knowing where it failed ... and a course like that may never complete the building phase.
Depending upon version of Moodle, which you have not provided, there is an adhoc_task to cron (assume your cron job is running once per minute) that is supposed to try failed backups again as moodle DB hasn't been informed of successful backup for that course.
The build directories should not exist in moodledata/temp/backup/ ... there are clean up task which remove any failed backup directories ... or is supposed to be.
Did you check your servers error logs?
So ... rather than guess here ... share info about your system - Moodle version, DB flavor and version, where/how hosted, memory, free memory, PHP version, etc. etc.
'SoS', Ken
Re: Creating large backup file is problem in course
After you try Emma's suggestion ... if still failing ... then the code to use is the command line script ... production server or not.
'SoS', Ken
Re: Question regarding automated backup process
First off the details of the system. It's hosted in house, version 3.9 with Mysql 8 and Php 7.4. RAM is 45G/96G.
Okay now the real reason I asked the question in the first post is that I've successfully implemented an NFS drive via another VM and paired it to our test server. The automated backup worked like a charm and I'm sure it will work again if I implement it in production.
Now the problem in production is that I've setup a cron job running every hour to delete /temp/backup/* because we're running out of space and I'm trying to squeeze every bit of space there is to squeeze. Running this cron job deletes all the failed backups (if there is one) every hour. But I found out that this band-aid solution created more problems because the automated backup process needs /temp/backup to compile the .mbz before storing it to a specified directory.
I want to stop running this cron job and send the backups to the NFS, problem is if there are going to be temporary duplicates, and you've mentioned that there are going to be. How can I delete the duplicate backups ASAP knowing that the course has already been successfully stored into the NFS?