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

Re: Unable to backup beyond 2GB backup files

$
0
0
by Usman Asar.  

Eugene, have you not tried running 64-bit PHP 5.x? Though experimental, but I have ran 64-bit 5.x on IIS absolutely fine.

just for the test, you can install 64-bit side-by-side and try making backup and see if it still limits, if you're unsure of setting up multiple PHP's on IIS, then watch this video, setting up PHP with PHP Manager. http://goo.gl/RKSpQJ


Re: Unable to backup beyond 2GB backup files

$
0
0
by Eugene Matusov.  

Dear Usman--

Thanks A LOT for such an interesting suggestion.

Do you know good guidelines of how to install 64-bit PHP 5.x on Windows 2012R server? I'd appreciate your help.

Take care,
Eugene

Re: Unable to backup beyond 2GB backup files

$
0
0
by Eugene Matusov.  

Dear Usman--

I just managed to install 64-bit PHP5.17. Unfortunately, it did not help to solve my problem of Moodle backup/restore beyond 2GB sad Now I have everything 64-bit...

Other ideas?

Eugene

Re: Unable to backup beyond 2GB backup files

$
0
0
by Eugene Matusov.  

Dear Matteo--

I just installed 64-bit PHP 5.17 but the problem with Moodle backup/restore over 2GB is still there. sad

Any other ideas?

Eugene

Re: Unable to backup beyond 2GB backup files

$
0
0
by Usman Asar.  

Eugene, assuming you've done all settings correctly for PHP 64-bit, besides as well check if you have allocated PHP limit more than default value of 512M, going into Site Admin > Server> Performance and Extra PHP limit. 

Re: Automated backups not working and not showing

$
0
0
by Marius S.  

Hello Emma,

I have tryed to TRUNCATE mdl_backup_courses table.
Set  course > auto backups to Manual, unchecked hidden  course skipping and Never skip not modified courses, because I wanted to make ALL courses backups.
Disabled sheduled tasks auto backup.
Purged all cache.

When I ran /usr/bin/php admin/cli/automated_backups.php

It was making backups, made ~30 backups from beginning, but I got another error...
At first debugging was disabled, so second time I enabled it to track error:

....
Backing up <span lang="en" class="multilang">Theatre (online course)</span>...
instantiating backup controller cb83be92a0faaacc2f5989cc467bd7a3
setting controller status to 100
loading controller plan
setting controller status to 300
applying plan defaults
setting controller status to 400
setting file inclusion to 1
checking plan security
setting controller status to 700
saving controller to db
calculating controller checksum 8941dcdbc12f7fb5cef5bc64dc7a4c58
loading controller from db
setting controller status to 700
saving controller to db
calculating controller checksum ac3ab736859893c3fd309381c3a6e385
loading controller from db
setting controller status to 800
setting controller status to 1000
saving controller to db
Default exception handler: Error processing archive file Debug: Header does not have POSIX ustar magic string
Error code: errorprocessingarchive
* line 290 of /lib/filestorage/tgz_extractor.php: moodle_exception thrown
* line 223 of /lib/filestorage/tgz_extractor.php: call to tgz_extractor->process_header()
* line 142 of /lib/filestorage/tgz_extractor.php: call to tgz_extractor->extract_or_list()
* line 645 of /lib/filestorage/tgz_packer.php: call to tgz_extractor->extract()
* line 104 of /lib/filestorage/mbz_packer.php: call to tgz_packer->extract_to_pathname()
* line 268 of /backup/util/helper/backup_general_helper.class.php: call to mbz_packer->extract_to_pathname()
* line 605 of /backup/util/helper/backup_cron_helper.class.php: call to backup_general_helper::get_backup_information_from_mbz()
* line 209 of /backup/util/helper/backup_cron_helper.class.php: call to backup_cron_automated_helper::remove_excess_backups()
* line 94 of /admin/cli/automated_backups.php: call to backup_cron_automated_helper::run_automated_backup()

!!! Error processing archive file !!!
!! Header does not have POSIX ustar magic string
Error code: errorprocessingarchive !!
!! Stack trace: * line 290 of /lib/filestorage/tgz_extractor.php: moodle_exception thrown
* line 223 of /lib/filestorage/tgz_extractor.php: call to tgz_extractor-&gt;process_header()
* line 142 of /lib/filestorage/tgz_extractor.php: call to tgz_extractor-&gt;extract_or_list()
* line 645 of /lib/filestorage/tgz_packer.php: call to tgz_extractor-&gt;extract()
* line 104 of /lib/filestorage/mbz_packer.php: call to tgz_packer-&gt;extract_to_pathname()
* line 268 of /backup/util/helper/backup_general_helper.class.php: call to mbz_packer-&gt;extract_to_pathname()
* line 605 of /backup/util/helper/backup_cron_helper.class.php: call to backup_general_helper::get_backup_information_from_mbz()
* line 209 of /backup/util/helper/backup_cron_helper.class.php: call to backup_cron_automated_helper::remove_excess_backups()
* line 94 of /admin/cli/automated_backups.php: call to backup_cron_automated_helper::run_automated_backup()
 !!

It's strange that actually this backup was made successfully, but next course backup didn't started because I got this error.
This was course ID 49 and it was made, it record was stored in mdl_backup_controllers.
However I didn't get line: complete - next execution: ....., instead I got that error message.

Do you have any idea what why we get this error?
How can we fix this?


Thanks,
M.

Re: Automated backups not working and not showing

$
0
0
by Marius S.  

Now I'm looking to 34 courses backups which were made, last one was with ID=49

Maybe there is something wrong with this course of this is the first one which caused problems.

We store backups in coursebackup filearea and specified directory. So I can see in specified directory how many backups we actually have.

Strange thing with course ID=49
In Restore backup page of this course at first I saw 5 auto backups, 4 from Jan 13th, 2016 and 1 from August, 2015. So total 5 backups.
I tryed to run cli autobackup script one more time and it failed, and now I see only 4 backups. So August backup gone but also one Jan13th backup gone from list..

However I went to check server specified directory and actually there is 12 backup files of course ID=49 are stored!
As you can see other courses has up to 5 backups files as it should.

12 backups of course ID=49


And this is course ID=49 Restore backup page. As you can see there is only 4 backups visible in the list (should be 5)

Restore backup, only 4 backups


Maybe after making new backup Moodle tryes to delete old backups and it fails because mld_backup tables were flushed or moodledata/temp/backup/ folder was emptied?


Thanks,

M.


Re: Automated backups not working and not showing

$
0
0
by Marius S.  

UPDATE: Tryed to make cli autobackup with Skipped hidden courses and skipped courses which didn't change during 365 days. So course ID=49 was skipped, but on course ID=249 we got same error and autobackups stopped.

Again from server older backups was not deleted, they just haven't been display in Restore course page.

Apache has rights to delete files, moodledata and coursebackups directories has chmod 777. Backup files in coursebackups directory are with chmod 666, so it shouldn't be permissions issue.


Thanks,

M.


Re: Automated backups not working and not showing

$
0
0
by Ken Task.  

mdl_backup_courses

laststatus field has number:
1 = OK
2 = unfinished
3 = skipped

query
select courseid,laststatus from mdl_backup_courses where laststatus=2

If you see an un-finished, check:
moodledata/backup/temp/ for any .log file that is larger than 0 bytes.
That log file might have info in it.

Also, if there is any 'contenthash' named directory (long string of letters/numbers)
inspect what it contains.

cd pathtomoodledata/backup/temp/[contenthash]
ls -l

IF you see a backup.mbz file therein it could be a good backup that
the operating system couldn't *copy* to destination which is a known issue
of OS's.   In this case, the course would never be copied to the designated
destination NOR would it be in filedir.

One can, however, use the command line mv command to move the .mbz file
to the designated destination.


More than likely, in the directory where you find a backup.mbz there will also be
a moodle_backup.xml file.   Use head -n 20 moodle_backup.xml  to see the XML tag that
shows the filename Moodle would have used had it been able to complete the backup.

Had a server set to do autobackups that had a course that would not backup via cron job (auto) ... similar to your situation, I think.   I finally had enough and truncated all the data in mdl_backup_courses. And the issue was resolved.

Will that work for you?   Don't know for sure.   This is one of those areas that is specific to individual servers ... ie, one solution not necessarily for all, me think.

'spirit of sharing', Ken

Re: Automated backups not working and not showing

$
0
0
by Séverin Terrier.  

Hi,

We don't see it clearly on your screenshot : are you sure your course shortname didn't change?

Because Moodle isn't good to delete old backups if course shortname as changed (and you use in in backup filenames), and it can lead to multiple (old) backup files staying always mixed

Séverin

Re: Unable to backup beyond 2GB backup files

$
0
0
by Eugene Matusov.  

Dear Usman--

Thanks for your suggestion. I just set up Extra PhP to its maximum of 2GB (it was 1GB). But I'm still getting the same error "Coding error detected, it must be fixed by a programmer: progress() value out of range" on a course, which backup is above 2gb. 

Any other ideas?

Eugene
PS You wrote, "assuming you've done all settings correctly for PHP 64-bit" -- what is your possible concern?

Re: Unable to backup beyond 2GB backup files

$
0
0
by Usman Asar.  

Hello Eugene,

By PHP settings, I meant as initial settings are different for Apache and IIS, so asked if you've set your PHP as per IIS, main ones are

cgi.force_redirect=0
cgi.fix_pathinfo=1
fastcgi.impersonate=1
fastcgi.logging=0
max_execution_time=300

You've already told about PHP limit increased to 2GB with that not working either, additionally, there is php's setting (max_input_vars), by default it's disabled with value given 1000, and most of the scripts works perfectly on these values, if it's disabled at your end, try enabling and giving value of 2000.

Also, the 64-bit version PHP that you've upgraded is 5.x, where though there are 64-bit versions available, but they are experimental for Windows environment for there is limitation in C++ compiler where long is still 32-bit, but in case of PHP 7, 64-bit version is not experimental anymore, so probably VC++ 2015 that is required to run PHP 7 have that limit removed.

You mentioned in middle of semester, so jumping to PHP 7 at this point wont be a feasible decision, but can you backup course in parts, fire up another Moodle test instance with PHP 7, restore that course and see if that works.

Re: Unable to backup beyond 2GB backup files

$
0
0
by Eugene Matusov.  

Dear Usman--

Thanks a lot for your reply.

I checked my php.ini settings and they are all like you wrote (except I set max_execution_time=1200 because I'm running a very long sql query at night to generate Participation Report for the students).

Also, I tried to set up PHP7.0.2 64-bit (php-7.0.2-nts-Win32-VC14-x64) for one of my virtual servers running wordpress (the latest version 4.4.1) but I'm getting the following error:

500 - Internal server error.

There is a problem with the resource you are looking for, and it cannot be displayed.


Of course, I copied all relevant settings from my old php.ini (v.5.6.17 64-bit, wordpress and moodle run fine on this version of php when I switch back).

I'm running:
Windows 2012R server 64-bit
IIS 8.5
MySQL 5.7 64-bit
Moodle 2.9.1
WordPress 4.4.1
RAM 16GB

Do you know what I'm doing wrong? Any ideas?

Thanks,

Eugene

Re: Unable to backup beyond 2GB backup files

$
0
0
by Usman Asar.  

Eugene, one possible error (as I encountered it as when I copied over php.ini from PHP 5.x to PHP 7.x) was due to mysql extension, looking into error log it was showing "couldn't load MySQL extension" as if you see php extension_mysql was present in v 5.x, but is missing from 7.x, so I disabled it in php.ini of PHP 7.x, only available extension in php 7.x is mysqli, after that I stopped getting 500 errors.

Re: Automated backups not working and not showing

$
0
0
by Marius S.  

Hello Séverin,

Course shortname didn't change, it's the same 'menn0204'.

We have tryed one more thing, we have created new folder for course backups and changed auto backup settings to store course backups ONLY in folder and ran cli script. Sheduled task autobackup was Disabled.

We ran it on Jan 15th and all courses backup were made to new folder, next backup was sheduled to Jan 17th 5AM.

On Jan 16th we set course auto backups to "Enabled", we changed back to store course backups in moodledata + new folder. In sheduled task autobackup we changed back to Enabled.

On Jan 17th 5AM auto backups didn't started... And in Sheduled tasks autobackups last run shows September 2nd, 2015... I have no idea why it changes back to this date.

If I try to reset for default values, it shows next run let's say at Jan 18th 9:50AM, but when time comes, it changes next run to ASAP. And last run is September 2nd, 2015.

sheduled tasks


So maybe this script somehow halt start of auto backups?


Thanks,

M.


Re: Unable to backup beyond 2GB backup files

$
0
0
by Usman Asar.  

Also, I assume you've installed VC14 (VC++ 2015 64-bit) that is required to run PHP 7.x

Re: Unable to backup beyond 2GB backup files

$
0
0
by Eugene Matusov.  

Dear Usman--

I have 3 wordpress sites and a moodle site. After experimenting with all of them and php 7.0.2, I found that some of my wordpress and Moodle plugins are not compatible with php 7.0.2 (I can see some pages and not others). Unfortunately, the moodle 2.9.1 backup page does not seem to be compatible with php 7.0.2

Thanks,

Eugene

Course restore gives a 500 Internal server error.

$
0
0
by Isaac Mrea.  

Hello,

Ive been digging through forums and cant seem to find a solution. 

I should probably start from the beginning.

I had an installation of moodle 2.7+ and we moved to a VPS. When we moved to the VPS all kinds of errors started happening. Emails would sometime get through to students, grades would sometimes stick, course material couldnt be added, etc. 

So I decided to move the site to a new host and upgrade to 3.0. Everything went smoothly and with extensive testing by multiple people all previous issues seemed resolved. This happened over 4 months ago. 

Within the past month we've seen three different problems. 

500 errors when creating users, restoring courses, and deleting courses. 

According to one of our admins restoring courses gradually got worse. First it was 1-2 tries, then 4-6, and now 12-18 tries to successfully restore a course. 

I implemented a phprc file and creating users started working but after about a day we were back to square one with the 500 error. When creating a user does fail I see the following

"Premature end of script headers: editadvanced.php, referer: http://www.mreacourses.org/user/editadvanced.php?id=-1"

As for the other two I dont see errors in that log. I did set a log file in the phprc file and saw a bunch of "Error code: storedfilecannotread" After finding another thread I was able to fix those by creating the needed directories and files. Those error time stamps didn't really match up with the time I was having a problem so I dont know if they were related. 

Any ideas? Here is my phprc file

$ cat .php/5.6/phprc

upload_max_filesize = 100M

post_max_size = 105M

max_execution_time = 1500

max_input_name = 500

memory_limit = 1000M

log_errors = 1

error_log = /php.log


Re: Unable to backup beyond 2GB backup files

$
0
0
by Usman Asar.  

That must be few plug-ins causing issue, else backup page is working fine on Moodle 2.7 with PHP 7.x in my tests. Though I am very confident of PHP 7.x now showing any issues on Windows platform in terms of backups, for now the only thing you can do is wait for sometime as when plug-ins that you're using gets update plus using Moodle 3.0.x and see how things go along from there.

Re: Restore Fails Due to TempTable Issue

$
0
0
by Joshua Bragg.  

There is nothing in the error about "Server has gone away" It is weird.  There is no stack trace or anything.  The only thing I left out is the referrer page and my IP address.

Ack, I forgot to mention that I already tried a backup and restore with the question bank excluded (and by extension all the quizzes) and it worked just fine.

I've had max_allowed_packet problems before.  I have a huge course.  It's already set at 100M.  As I remember it, I also got a message about that in the past when that happened.

Viewing all 6621 articles
Browse latest View live


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