Quantcast
Channel: Backup and restore
Viewing all 6640 articles
Browse latest View live

Speed up the Restore process

$
0
0
by Nathan Lind.  

On the page that appear during the Restore process, after clicking "Restore", could the "Jump to final step" button that is available in the Import process be made available here as well?

Here are the steps for Restore:

1. Confirm / ▶︎ 2. Destination / ▶︎ 3. Settings / ▶︎ 4. Schema / ▶︎ 5. Review / ▶︎ 6. Process / ▶︎ 7. Complete

For the choices available on the 2. Destination page, the default setting could be:

Merge the backup course into this course

for the "Jump to final step" button.


Perhaps another way to speed up restores, would be to put duplicates of the Continue, Next, Perform Restore buttons that appear at the bottom of pages which show during the restore process also at the top of each page. 

Thanks for considering!

Nathan



Re: 2.9 course backup seems to stall

$
0
0
by Doug Moody.  

I have been using Moodle since 1.9, and this backup problem really came into its own when they started content-hashing filenames. I don't agree with the decision to do that, but it is the way it is...

That said, Ken seems to be the only one who is tackling this issue. It's a common one, and one I have experienced with ever Moodle version. It seem simpossible to get Moodle HQ to think that its a prolem that needs solving, because maybe it isn't happening with many users, or maybe many users aren't paying close attention to their backup routines. In any case, I DO know that several people, including myself, are tired of having to hold our tongues just right to be able to depend on our backups. After all, if yo uhave a bad backup, and don't know it until its too late, then you are playing with fire. Personally, I like to not only have good backups, but have the ability to test the integrity of said backups. Lots of people THINK their backups are valid, and only find out when its too late. I just talked to a good friend who works in a big company who preaches "BACKUP" to his co-workers. But he sheepishly admitted that HIS hard disk went down on a critical mission, and he spent hi sentire vacation rebuilding the data that had been lost because......HE neglected his backups!

We tend to get complacent about this issue, and I think that moodle HQ owes it to us to make this backup routine bulletproof - both the manual one and the automated one. We shouldn't have to worry about these issues, and I would dare say that it has even caused some people to lose or endanger their jobs because they THOUGHT they had good backups. Plus, it gives moodle a bad name in the academic community.

Where I work, there is a fight going on between moodle and other non-free LMS systems for control of the academic market. I am a moodle evangelist, and do not want to see these other systems. But in good conscience, I cannot look the IT guy in the eye and say "Moodle is secure", because it is not.

Nowadays, enterprise systems DEMAND (rightly so) secured data about students, secure logins (using, for example SSL), and secure backups of not just system data, but historical data.

I would like to see the ability to archive users in such a way that I could clear a course out of all users and archive them in one step. Then, that data file could be stored somewhere securely and restored by data record. For example, if Danny Boy claimed that he got an A in Ms Meanie's course in polliwog research in 2008, then all we would have to do is go to our 2008 archives, find Ms. Meanie's class, and find Danny Boy's record. If the course wa sno longer taught, then we could find the transcript of Danny Boy, and perhaps see all the tests and assignments he took.

As it is today (as I understand it), we would have to restore an entire course including all students, then find Danny Boy and drill down to find just his information. That's such a bad way of doing things in today's modern computing environments.

But, back to the original issue. Wouldn't it be great if someone who is way smarter than me, could write a script that runs in the background  and extracted the relevant .mbz file and copied it to a directory of our choice? Likewise, wouldn't it be great if there was a script that automagically fixed automated backups that stalled, instead of just having a report that says "Incomplete" Error handling is CRITICAL to a smooth running app. Moodle, of course, is user-supported app. But if it were being sold by a for-profit company, this backup problem, if not fixed, would cause the software company that produced it to go bankrupt. It really is that important. I only wish I could get moodle HQ to agree and to help fix it.

Re: 2.9 course backup seems to stall

$
0
0
by Ken Task.  

Am not really 'tackling' it ... not a programmer ... more like 'dealing with it' and have found what works for the school districts I support.   It does involve the timing of the site cron and some non-interactive bash shell scripts running the command line version of course backup in a cron of it's own.

But ... take a gander here:

https://moodle.org/mod/forum/discuss.php?d=319114

Think Mr. Bragg has found something that could also apply to your site since both of you guys are running 2.9.x (all of the schools I support are at either 2.7.highest or 2.8.highest).

'spirit of sharing', Ken

Re: Select Destination Topic During Restore/Import?

$
0
0
by Neil Stapleton.  

I'm pretty sure the feature doesn't exist, sorry.

This is something that would be a massive help to moodle administrators and course builder, along with the ability to move or group content and activities items within a course, so that they can have certain actions such as move applied to them as one... Can anyone point to a tracker or where this might be on the features road map?

Re: Manual backup with user info

$
0
0
by sonia sonia.  

Hi, I have the same Issue and the solution (with moodle 2.9.1. installed) was check all the options in general backup settings except: comments, bagdes,logs,histories and unchecked. The locked option in all of them unchecked too...and then all works fine, all it's backup in the correct way. My sharing cart with troubles too.

I hope it's useful for all of you.


Re: Manual backup with user info

$
0
0
by Tony Box.  

Wow, thanks Sonia! That actually worked.

I did a little more experimenting and all you need is the following:

Under Site Administration -> Courses -> Backups -> General Backup Defaults, you must set the defaults to at least have "include enrolled users" and "include activities" checked. If either of these are unchecked at the site-level, taking a course backup will not include user data, even if you check those two things on the individual course backup's page.


This definitely seems like a bug to me. I'm going to create a tracker issue for it.

Re: Manual backup with user info

Re: Manual backup with user info

$
0
0
by Séverin Terrier.  

Yes, not logical at all : it's a bug sad

Thanks for creating MDL-51364 ; voted.


Re: Automated Course Backups Failing Randomly

$
0
0
by Doug Moody.  

Joshua,

Ken Task turned me on to this thread. He has helped tremendously in getting a handle on this automated backups issue.

But for me, it has been happening in ALL my previous moodle versions, to one extent or another. What I have NOT been able to do is to get out of a stalled backup and get things back to a state where the system will attempt another automated backup on a failed backup.

For example, I have 7 course I back up every day. Sometimes they all backup fine. But once they begin failing, where one of them reports "unfinished", then it seems to have a cascading effect on the rest of them. Eventually, all of them fail, and I am left wondering how I am supposed to get teh backups started again.

Ken suggests cleaning out the moodledata temp folder. My only recourse at this point is to run a manual automated backups with a cron job. This makes moodle happy and it then reports that the backups are then "OK" again.

So, what are YOU doing when your backups fail to reset the backup routine?

Re: Automated Course Backups Failing Randomly

$
0
0
by Ken Task.  

@Doug ...

Guess either I didn't explain nor it was missed ... but what I did was to clear in tables related to backups ... leaving the tables, just removed all data in them.

mdl_backup_controllers, mdl_backup_courses,mdl_backup_logs

Believe the proper DB admin terminology is 'truncated'.

I then also made sure there was nothing left in moodledata/temp/backup/ that was from a former attempt at backing up anything ... that directory contained nothing.

I then check the defaults for course backups - settings like include users, etc.   Choose NOT to include logs of the courses there.

Then ran one command line backup of one course and pointed it to a diretory OUTSIDE of the Moodle file system to assure that tables had data, backup ran and used moodledata/temp/backup (watched it real time from terminal using 'watch' command).

Untared the .mbz backup in that designated directory and inspected the xml's and compared with the directory contents ... everything there checked out ... so now the next step

Setting auto-backups to manual ... still pointed to designated diretctory outside of Moodle file system so I could, if desired, un-tgz them and inspect.

Now to see those backups in the Moodle interface, used a file system repo (moodledata/repository/) and created a symlink for backups which pointed the designated directory outside of moodledata.  That is a linux thing but assume one could do same on Winders.

One thing ... I have the automated backups in Moodle onfig set to manual and in a bash shell script.   At first I ran it 'manually' ... from command line - at least once to see it all working ... checking tables, etc.   Then and only then did I do a cron job (outside of Moodle but an opertating system cron job) to run the autobackups script.

Now in many of the systems I help admin, there are 3-5 courses that are soooooo large, anything automated chokes ... not enough time to run it ... etc.. (despite making all sorts of changes to PHP, etc..) ... so I actually have two of those bash shell scripts the run through a loop file consisting of only the course ID numbers  to run the backup.php script found in moodlecode/admin/cli/

Whew!  That's a mouth full and am getting the same 'brain cramps' I got when thinking this through and setting it up!   Asprin is in order now! :\

Hope that clarifies some things.

What Joshua has discovered, I think, is a conflict between when he's scheduled the autobackups with other jobs one can now schedule in Moodle 2.9 ... that of the clean up of the backup directory. 

If the auto backup is running and this other task/cron job executes and cleans out files/directories in moodledata/temp/backup/ then the auto backup can't complete ... or if it does, it's missing files ... like moodle_backup.xml (very important file as it's the road map to the whole thing!).

So while we're talking backups there are some circumstances/setups that will work against the other.  I frankly don't know how a large system can do autobackups and schedule the clean up task/cron job to NEVER interfere with the completion ...

Bottom line ... I have somthing workable but it's not via the Moodle Admin UI ... where it should be for most folks. ;)

'spirit of sharing'. Ken


Re: Automated Course Backups Failing Randomly

$
0
0
by Joshua Bragg.  

Doug, I don't have any helpful advice for you there.  My automated backups that end with an error will frequently completely successfully the next night with no intervention on my part.  Since my error is fairly random, things work themselves out in a couple of days.

Re: *correction* - Re: Restore with only moodle, moodledata, \var\lib\mysql, and \etc\mysql

$
0
0
by Eric Messick.  

Great, thank you so much. Enjoyed the problem solving.

Re: Manual backup with user info

$
0
0
by Mark Nelson.  

Hey guys, the more people who vote on the issue the more likely it will get worked on sooner. So, get voting. smile

Two different places for autpmated backups scheduling !

$
0
0
by Naaman Fallouh.  

I'm running 2.9.1 Moodle instance and got confused when detecting that there are two places to set automated backups schedule !

What's the difference between the scheduling settings in:
Site administration > Courses > Backups > Automated backup setup
and
Site administration > Server> Scheduled tasks > Automated backups

Unable to restore course with books

$
0
0
by Michael Buchanan.  

I am running version 2.6.11 on a Linux box and when I try to restore a course, it stops with a dmlwriteexception error.  I tried increasing the max_allowed_packets to 100mb (in the my.cnf file)  as suggested in the help documentation but that did not make a difference.

Then I tried restoring the course but without any book modules - it restored fine.

So then I tried to restore just one book and I got this debugging information:  Can anyone help me decipher what this all means and what a possible solution would be?  Thanks!


Debug info: Incorrect string value: '\xE2\x80\x8B\xE2\x80\x8B...' for column 'content' at row 1
INSERT INTO mdl_book_chapters (pagenum,subchapter,title,content,contentformat,hidden,timemodified,importsrc,bookid) VALUES(?,?,?,?,?,?,?,?,?)
[array (
0 => '9',
1 => '0',
2 => 'Tareas y Actividades',
3 => '<blockquote>
<p><strong>Objetivo: </strong> Que los estudiantes empiecen a desarrollar destreza en algunos de los métodos de la investigación antropológica al hacer un análisis preliminar de un video corto que presenta algunas diferencias culturales.</p>
<p><b>Video</b>: <a target="_blank" href="https://youtu.be/gCQIGiXf0JA">Extracto de <em>Los dioses deben estar locos</em></a></p>
<blockquote>
<p><em>Los dioses deben estar locos</em> es una comedia que estrenó en 1980. Está situado en el desierto de Kalahari, en el sur de África, y se trata de un grupo aislado de bosquimanos, que no son conscientes de que existan otra gente que no sean ellos mismos.<em><br /></em></p>
<p>Aunque no se creó como una descripción antropológica seria, el siguiente extracto les ofrece a los estudiantes la oportunidad de adquirir experiencia práctica con diversos métodos antropológicos. Como hemos visto en esta unidad, el estudio antropológico implica, entre otros enfoques, comparar y contrastar la cultura que se está estudiando con otra cultura, muchas veces la del observador / analista. Las áreas de estudio incluyen la ropa y la vivienda, la adquisición de alimentos, las estructuras sociales y relaciones con los demás, el lenguaje y la comunicación, las creencias, el arte y el entretenimiento. Otra observación clave incluye el énfasis antropológico sobre el holismo—cómo todas las partes de una cultura están relacionadas entre sí, y cómo un cambio a cualquier parte puede afectar a muchas otras partes.</p>
<p>Trataremos estos temas más a fondo al adelantar el curso. En el momento estamos interesados ​​en empezar este proceso de observación, comparación y contraste. Tomando sólo estos pocos conceptos, mire el video varias veces, buscando cosas diferentes cada vez.</p>
<div align="center"><iframe src="https://www.youtube.com/embed/gCQIGiXf0JA" allowfullscreen="" frameborder="0" height="315" width="420"></iframe></div>
<p><br />La siguiente lista sugiere varios temas para observar y tener en cuenta mientras mire el video:</p>
<ol>
<li>Mira el vídeo sin escribir nada, sólo para ver la impresión que le dá. Después de mirarlo, escriba sus primeras impresiones de la cultura de las personas que se presentan en el extracto en su conjunto. Preste especial atención al principio antropológico del <strong>holismo</strong>.</li>
<li>Mire el video de nuevo, observando en particular las similitudes y diferencias entre la cultura de los bosquimanos y la suya en las áreas de vestuario, vivienda, y la adquisición de alimentos.</li>
<li>Mire el video de nuevo, observando en particular las similitudes y diferencias entre la cultura de los bosquimanos y la suya en las áreas de las estructuras sociales, relaciones entre las personas, relaciones familiares, crianza y cuidado de los hijos, etc.</li>
<li>Mire el video de nuevo, observando en particular las similitudes y diferencias entre la cultura de los bosquimanos y la suya en las áreas de lenguaje y comunicación—¿hay algo diferente en el lenguaje?</li>
<li>Mire el video de nuevo, observando en particular las similitudes y diferencias entre la cultura de los bosquimanos y la suya en el ámbito de las creencias, el arte y el entretenimiento.</li>
<li>Escriba un resumen breve de sus observaciones y descubrimientos (1-2 páginas) y súbalo al enlace en la tarea de Unidad 1.</li>
<li>Resuma sus conclusiones y compartelas con sus compañeros del curso en el foro Discusión de Video de la Unidad 1. Lea los resúmenes de varios compañeros y comente brevemente (200-300 palabras) sobre lo que ellos han escrito.</li>
</ol></blockquote>
<p>Prepárese para la Próxima Unidad:</p>
<ul>
<li>Revise el sílabo, y anote cualesquier preguntas en el foro de Discución General de la Unidad 1.</li>
<li><strong>Readings</strong>:
<ul>
<li>Study Jandt: Chapter 1. The Dispute Over Defining Culture</li>
<li>Ferraro, chapters 1 and 2</li>
<li>Lavenda, Chapters 1, 2</li>
</ul>
</li>
</ul>
</blockquote>',
4 => '1',
5 => '0',
6 => '1440604097',
7 => '',
8 => 54,
)]
Error code: dmlwriteexception
Stack trace:
  • line 446 of /lib/dml/moodle_database.php: dml_write_exception thrown
  • line 1146 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
  • line 1188 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()
  • line 71 of /mod/book/backup/moodle2/restore_book_stepslib.php: call to mysqli_native_moodle_database->insert_record()
  • line 137 of /backup/util/plan/restore_structure_step.class.php: call to restore_book_activity_structure_step->process_book_chapter()
  • line 103 of /backup/util/helper/restore_structure_parser_processor.class.php: call to restore_structure_step->process()
  • line 151 of /backup/util/xml/parser/processors/grouped_parser_processor.class.php: call to restore_structure_parser_processor->dispatch_chunk()
  • line 91 of /backup/util/helper/restore_structure_parser_processor.class.php: call to grouped_parser_processor->postprocess_chunk()
  • line 148 of /backup/util/xml/parser/processors/simplified_parser_processor.class.php: call to restore_structure_parser_processor->postprocess_chunk()
  • line 92 of /backup/util/xml/parser/processors/progressive_parser_processor.class.php: call to simplified_parser_processor->process_chunk()
  • line 186 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser_processor->receive_chunk()
  • line 274 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser->publish()
  • line ? of unknownfile: call to progressive_parser->end_tag()
  • line 175 of /backup/util/xml/parser/progressive_parser.class.php: call to xml_parse()
  • line 154 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser->parse()
  • line 110 of /backup/util/plan/restore_structure_step.class.php: call to progressive_parser->process()
  • line 181 of /backup/util/plan/base_task.class.php: call to restore_structure_step->execute()
  • line 192 of /backup/moodle2/restore_activity_task.class.php: call to base_task->execute()
  • line 177 of /backup/util/plan/base_plan.class.php: call to restore_activity_task->execute()
  • line 167 of /backup/util/plan/restore_plan.class.php: call to base_plan->execute()
  • line 333 of /backup/controller/restore_controller.class.php: call to restore_plan->execute()
  • line 184 of /backup/util/ui/restore_ui.class.php: call to restore_controller->execute_plan()
  • line 99 of /backup/restore.php: call to restore_ui->execute()


Re: Unable to restore course with books

$
0
0
by Michael Buchanan.  

Found my own solution!   In the mdl_book and mdl_book_chapters, the collation was set to latin1_swedish_ci were as all the other tables used in the database had the utf8_general_ci collation.  I changed those two tables and the restore worked fine.

Re: Unable to restore course with books

$
0
0
by Mary Cooch.  

Thanks for posting back -your solution could help others in future with a similar problem smile

Re: Two different places for autpmated backups scheduling !

Re: Two different places for autpmated backups scheduling !

$
0
0
by Naaman Fallouh.  

I'm feeling ashamed, but it's that it toke time to get your answer so i forgot it.

The important thing is thank you a lot, it was a good useful answer but have a question, if I disabled the `Courses > Backup > Automated backup setup` does this affects the timing in it and I still can use the other settings (location, what to backup ... etc) or it disables everything ??

Re: Two different places for autpmated backups scheduling !

$
0
0
by Séverin Terrier.  

As i explained in this message, if you define in "Courses > Backups > Automated backup setup", that "Automated backup" is "manual", it won't be executed automatically (by cron), but other parameters can be defined, and they will be used when executing moodle/admin/cli/automated_backups.php

Séverin

Viewing all 6640 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>