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

ERROR: relation "mdl_backup_ids_temp" does not exist

$
0
0
by Shaun T.  

I'm getting this error when trying to restore a course from a manual backup. I'm on version 3.1.6 and using a PostgreSQL db. I believe its an issue with the question bank as when I exclude it from the back up it works. I'm just not able to identify the problem question(s). Any suggestions would be greatly appreciated. 


Debug info: ERROR: relation "mdl_backup_ids_temp" does not exist
LINE 1: INSERT INTO mdl_backup_ids_temp (backupid,itemname,itemid,ne...
^
INSERT INTO mdl_backup_ids_temp (backupid,itemname,itemid,newitemid,parentitemid,info) VALUES($1,$2,$3,$4,$5,$6) RETURNING id
[array (
'backupid' => '3e7a703f621c743a1ee3a637d28ae1cb',
'itemname' => 'fileref',
'itemid' => '27451047',
'newitemid' => 0,
'parentitemid' => NULL,
'info' => NULL,
)]
Error code: dmlwriteexception
×Stack trace:
  • line 482 of /lib/dml/moodle_database.php: dml_write_exception thrown
  • line 250 of /lib/dml/pgsql_native_moodle_database.php: call to moodle_database->query_end()
  • line 904 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end()
  • line 960 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->insert_record_raw()
  • line 286 of /backup/util/dbops/restore_dbops.class.php: call to pgsql_native_moodle_database->insert_record()
  • line 1669 of /backup/util/dbops/restore_dbops.class.php: call to restore_dbops::set_backup_ids_cached()
  • line 54 of /backup/util/helper/restore_inforef_parser_processor.class.php: call to restore_dbops::set_backup_ids_record()
  • line 178 of /backup/util/xml/parser/processors/grouped_parser_processor.class.php: call to restore_inforef_parser_processor->dispatch_chunk()
  • line 148 of /backup/util/xml/parser/processors/simplified_parser_processor.class.php: call to grouped_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 190 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser_processor->receive_chunk()
  • line 278 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser->publish()
  • line ? of unknownfile: call to progressive_parser->end_tag()
  • line 179 of /backup/util/xml/parser/progressive_parser.class.php: call to xml_parse()
  • line 158 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser->parse()
  • line 138 of /backup/util/dbops/restore_dbops.class.php: call to progressive_parser->process()
  • line 1020 of /backup/moodle2/restore_stepslib.php: call to restore_dbops::load_inforef_to_tempids()
  • line 34 of /backup/util/plan/restore_execution_step.class.php: call to restore_load_included_inforef_records->define_execution()
  • line 181 of /backup/util/plan/base_task.class.php: call to restore_execution_step->execute()
  • line 177 of /backup/util/plan/base_plan.class.php: call to base_task->execute()
  • line 167 of /backup/util/plan/restore_plan.class.php: call to base_plan->execute()
  • line 335 of /backup/controller/restore_controller.class.php: call to restore_plan->execute()
  • line 224 of /backup/util/ui/restore_ui.class.php: call to restore_controller->execute_plan()
  • line 111 of /backup/restore.php: call to restore_ui->execute()


Re: [3.4] Automated backups initial run (1000 courses)

$
0
0
by Richard van Iwaarden.  

Thanks, but to bad that's not an option for me... hosted Moodle, no command line.

Re: [3.4] Automated backups initial run (1000 courses)

$
0
0
by Richard van Iwaarden.  

Well...

Finally, when started on April 12 it finished its backup run on May 18. I received this mail today:


Summary

==================================================

  Courses; 915

  OK; 253

  Skipped; 232

  Error; 0

  Unfinished; 430

  Warning; 0

  Automated backup pending; 0

 

  Some of your courses weren't saved!!

 

  Please take a look at your backup logs in:


That's not a really good score... about 25% of the courses actually make it through the automated backup. I will have a further look, but if this is not easily fixable I'm forgetting about the automated backups in Moodle and will restore a server backup instead. That seems to be way less time consuming.

Re: Moodle site is doing daily backups at 45gb and killing the disk

Re: Switched to HTTPS - images now broken

$
0
0
by Ken Task.  

Am confused about this strand/thread ... probably because your posting is mixed in with another users.

So ... if you did what you said:

"Basically, I ran the search and replace thus:

old: http://sitename 

new: http://sitename"

You changed nothing ... when moving from http to https the search should have been for:

http://oldsite.fqdn/ (see the http://)

to

https://newsite.fqdn/

See the difference?

Two sites cannot have the same FQDN cause they map to different iP addresses.

So if you have some local copy of your production site and the search/replace works, you still might be able to pull resources from the production site into the local copy.

The way around that is to edit the local /etc/hosts file and make an entry:

privateIP fqdnofsite shortcutname

like:

192.168.0.12 www.mycoolmoodle.org mycool

All systems read host file first before making queries of DNS.

The other issue using localhost ... the cert ... don't think you can get a valid cert nor use the same cert from your Production server on a localhost implementation.   So the localhost web server / moodle is set to use https:// but the cert would not be valid ... so in firefox one has to make the exception.

Oh, yeah ... for https to work, port 443 must be open and, of course, one must edit the config.php file and change the  http:// to an https:// .... config.php file is read and re-read all the time.

'spirit of sharing', Ken


Moodle Login page redirects to a wrong URL

$
0
0
by Ayyaz Qamar.  

Hi 


I am the Moodle admin for a training institute. Yesterday, I configured Self Registration & Paypal Registration to out program and saved it. I saved the details and logged-out. Now when I click on Login link, instead of redirecting it to correct login URL which is given below;

https://www.mydomain.com/ocen/moodle/login/index.php

It redirects to my website "https://www.mydomain.com/online", 

Therefore, I am not able to access the login section. Could anyone advise how can I log in to the admin section in the absence of a login page? 


Your help will be highly appreciated. 

Re: Moodle Login page redirects to a wrong URL

$
0
0
by Ken Task.  

What's in the /ocen/ directory?

Do you have a WordPress or something else running at /online/?

Do you have a web service redirect setup? .htaccess or in main config file for web service?

In your browser, without trying to login go directly to https://yoursite/moodle/admin/settings.php?section=manageenrols

That's where you'll find PayPal settings link.

Could also turn it off there.

'spirit of sharing', Ken




Re: Moodle Login page redirects to a wrong URL

$
0
0
by Ayyaz Qamar.  

Hi Ken


Thank you very much for your kind response. 


OCEN directory just has Moodle in it. 

Wordpress runs online on the same domain

I am not sure about redirect setup, could you please advise what would be the best way to see if Moodle redirection is active or not?

When I tried to go to the link you suggested, it again took me to the same redirected page. 


I shall look forward to hearing from you.


Regards


Re: Moodle Login page redirects to a wrong URL

$
0
0
by Ken Task.  

In your first posting you said the url to login was site/ocen/moodle/ Is there a config.php file in /ocen/ or is there a moodle directory inside ocen and inside the 'moodle' directory there a config.php file?

Think WordPresses have plugins for redirects ... check WP config.

Redirects can be done in multiple ways ... kinda depends upon if one is running Apache/Nginx/IIS on Windows, etct.

So I can do no more other than to point you to Apache Docs .... assuming you are running Apache:

https://httpd.apache.org/docs/2.4/rewrite/remapping.html

nginx

https://www.nginx.com/blog/creating-nginx-rewrite-rules/

rewrites from .htaccess .... the following from a hosting provider that may/may not fit your situation.

https://help.dreamhost.com/hc/en-us/articles/215747748-How-can-I-redirect-and-rewrite-my-URLs-with-an-htaccess-file-

In the config of PayPal ... their end ... did you have to enter any 'call back url' that points back to your site?

Ken

Re: Moodle Login page redirects to a wrong URL

$
0
0
by Ayyaz Qamar.  

Hi Ken

there is a moodle directory inside ocen and inside the 'moodle' directory there a config.php file


to the best of my knowledge, I have not set-up any redirection, not I entered 'call back URL'. 


Is there any way I can log in as the administrator to the login and disable the new plugins what apparently caused the issue?   


I really appreciate your time in this regard. 


Thanks

Re: Moodle Login page redirects to a wrong URL

$
0
0
by Ken Task.  

That direct URL was an attempt to get you to the area where one could check setting or disable plugins.

So of that one got re-directed am thinking it has to be outside of Moodle.

Have you checked for .htaccess files present?  Have you checked the main httpd.conf (you still haven't said if you are using Apache or not) for any redirect.

Have you checked apache/web service logs (error log) for clues?

Now we've said 'new plugins' ... so what new plugins?   PayPal is one we know about ... others?

There is a script in moodlecode/admin/cli/ called cfg.php

ssh into server and su to root ... cd to above.

Then issue: php cfg.php --help

That script appears to have the ability to set/unset 

    --set=<value>               Set the given variable to this value.
    --unset                     Unset the given variable.

If you issue just: php cfg.php that displays all the settings - and am hoping paypal and other plugins show up.

Look for lines related to the plugins to get their names and if possible, try the unset.

'spirit of sharing', Ken


Re: Moodle Login page redirects to a wrong URL

$
0
0
by Ayyaz Qamar.  

Hi Ken, thanks for your prompt response. I shall try to follow and instruction and see if it works and will update here. 

Re: Moodle Login page redirects to a wrong URL

$
0
0
by Ken Task.  

Was the site http and you recently acquired a valid CA and you setup https on that server?

Reason I ask .... many folks do have a re-write rule to force all http:// traffic to https://.   On CentOS 7 (sure would be nice to know what OS your machine runs) that redirect rule could be in the main config file for Apache(here again, you've not said what you are running) which is in /etc/httpd/conf/ and called httpd.conf

That setup of rewrite could also be in /etc/httpd/conf.d/ssl.conf - for https

Help yourself ... by providing information to those willing to help.   No info ... then it's all guess and eventually those willing to help will tell you that you are on your own! :|

Sent you a PM with my addy and requested information.   Please use and provide the info or I'll have end this conversation wishing you luck! :|

Ken



Re: Moodle Login page redirects to a wrong URL

$
0
0
by Ken Task.  

Found your site.

Looks like you got it fixed.

Please do share back what was wrong and how you fixed.   Others might find themselves in similar situation and your posting could provide a solution for them as well.

'spirit of sharing', Ken


Course Backup Not Showing Up

$
0
0
by Carolyn DeHass.  

Hi All,

I've read countless forum posts and thank all contributors for your useful information. 

Background info:

I am helping a family member who creates E-Learning for companies using Moodle as their LMS. I had no knowledge of Moodle before helping them out. I have knowledge of HTML, CSS, Wordpress, and very basic PHP. So this has been a very challenging assignment for me. I have multiple issues, but this is the big one right now as I don't feel comfortable working on the others till I know the courses are backed up.

My issue right now is that backups are not running properly. We recently moved the site in question to SiteGround and the automatic backup tried to run, filled the available disk space, froze, and wouldn't let us login. I went through FTP and deleted the files in the temp/backup folder which allowed us to log back in and then paused the automatic backups.

Today, I tried to run a single course backup which appeared to be successful, but it is not appearing in the course backup area. So no clue what is going on there. I want to create backups and then download them to my computer for safe keeping.

Also in the user private backup area, there are multiple backups listed there, but the most recent one is Feb 2017. This site had supposedly been backing up on a weekly basis, but I see no recent backups. So there's something going on.

I'm really looking for someone who is willing to go through this site with me, see what is wrong, and walk me through the solutions. I want to learn how to fix these issues. Thanks for reading this post!


Re: إعادة: Re: problem in backup

Moodle Login page redirects to a wrong URL

$
0
0
by Ayyaz Qamar.  

Hi 


I am the Moodle admin for a training institute. Yesterday, I configured Self Registration & Paypal Registration to out program and saved it. I saved the details and logged-out. Now when I click on Login link, instead of redirecting it to correct login URL which is given below;

https://www.mydomain.com/ocen/moodle/login/index.php

It redirects to my website "https://www.mydomain.com/online", 

Therefore, I am not able to access the login section. Could anyone advise how can I log in to the admin section in the absence of a login page? 


Your help will be highly appreciated. 

Delete old backup files?

$
0
0
by Rex Lorenzo.  

When a user creates a backup the backup file just sits in the user's private files area. I am guessing it stays there forever?

Is there a config setting to limit how long backup files last? Or does anyone have a script that we can run to delete backups that haven't been used in over 2 years or something similar?


Re: What Counts As "Modified" for Automatic Backups?

$
0
0
by Natassia Stelmaszek.  

Possible Temporary Workaround?

I stumbled on something that stopped (for the time being) the excessive backups.  

A quick review, my problem was that my disk space was being rapidly consumed.  The root cause was traced to the fact that a recent code change created an infinite loop where the act of performing a backup was counted as a "change" to the course so that the course would get backed up repeatedly even when there weren't any actual changes made to the courses.

I accidentally prevented the scheduled backups from running for a week, after I resumed the backups the cycle seemed to have been broken so that only actual changes to the courses caused backups.  I suspect that the situation still exists and that although there are currently far fewer courses being backed-up, that they will continue to be backed up forever and the number of courses involved will slowly grow until the situation becomes critical again.

How did I interrupt the backups?  I meant to install an update for a plugin on my test system but accidentally began the process on my Production system.  I didn't realize my mistake until I got to the step where the system asks if you want to update the database and I stopped.  After I had installed and tested the update on my test system (about 1 week later), I updated the database on the Production system.

I still think that this is a coding problem that should be fixed but at least for me, it is not as urgent.

Natassia

Re: Delete old backup files?

$
0
0
by Ken Task.  

Boy I wish! :|

When in private files, only by logging in as that Teacher can admin level actually see them - thus be able to delete via Admin UI.

Query

select contenthash,filearea,filename,filesize from `mdl_files` where (`filearea` like "backup" and `filename` like "%.mbz%") order by filesize DESC

Then manually remove the file in moodledata/filedir/contenthashdirs/contenthash/

and of course the row in DB mdl_files that referenced it.

Moosh does have a command: http://moosh-online.com/commands/

Example 4: Remove all automated backups and reclaim the space

moosh file-list -i 'component="backup" AND filearea="automated"' | moosh file-delete -s
moosh file-delete --flush

'spirit of sharing', Ken

Viewing all 6640 articles
Browse latest View live


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