Course backup > 4GB

Course backup > 4GB

per Aurimas Lukošius -
Nombre de respostes: 4

Hello, its possible make large course backup on windows environment ?

I Am using: IIS 7.5, MSSQL server 2008, Windows Server 2008,  Moodle 2.6

I tried:

  • Change values in php.ini file, but without success result (waiting ~5 hr. without any error)
  • Enabled new backup format
  • Used http://moosh-online.com/ without any success result and errors
  • Used \backup\backup.php via cmd

Mitjana de qualificacions: -
En resposta a Aurimas Lukošius

Re: Course backup > 4GB

per Ken Task -
Imatge Particularly helpful Moodlers

What are the particulars to PHP?  32 bit version?   That could be the reason why.

Continuing to attempt might fill up space in /moodledata/temp/backup/ thus compounding the problem.   It is safe to manually remove the contents of /moodledata/temp/backup/ as long as automated backups isn't running.

There is in the admin/cli/ directory, a backup.php script that backs up a single course.

Perform backup of the given course.

Options:
--courseid=INTEGER          Course ID for backup.
--courseshortname=STRING    Course shortname for backup.
--destination=STRING        Path where to store backup file. If not set the backup
                            will be stored within the course backup file area.
-h, --help                  Print out this help.

Example:
\$sudo -u www-data /usr/bin/php admin/cli/backup.php --courseid=2 --destination=/moodle/backup/

If that also doesn't work, only alternative (with existing setup) is to break apart the backup ... ie do it in as many parts as will work.   Can't tell you how many parts or what to include as some activities are 'heavy processing' ... like quizzes.   So below, one might have to treat quizzes like files.

backup1.mbz might be nothing but quizzes

backup2.mbz might be half of the files linked.

backup3.mbz might be the other half of the files.

OR ... if your Moodle version (now quite old) will work with it, find a 64 bit version of PHP but ... not sure your older version of Moodle supported.

'spirit of sharing', Ken

En resposta a Ken Task

Re: Course backup > 4GB

per Aurimas Lukošius -

PHP is 32 bit.

There is no file backup.php in admin/cli/ directory. Only these files: 

files in admin cli directory

En resposta a Aurimas Lukošius

Re: Course backup > 4GB

per Ken Task -
Imatge Particularly helpful Moodlers

You are correct.   backup.php script didn't exist in versions prior to 2.7.

So, you could try this to see if this will work:

Acquire a version 2.7 set of the code:

git clone -b MOODLE_27_STABLE git://git.moodle.org/moodle.git moodle27

In the moodle27 directory that the above command will create, look in admin/cli/ for backup.php and copy that file to your moodlecode/admin/cli/ and attempt to execute via command line only.

Sometimes, if the versions are close enough, using a CLI script for a higher version of Moodle works on the version just before.

Have a feeling that it will make no difference as the PHP version is still 32 bit.   But you can try and see for yourself. ;)

'spirit of sharing', Ken



En resposta a Ken Task

Re: Course backup > 4GB

per Leon Stringer -
Imatge Core developers Imatge Particularly helpful Moodlers

With 32-bit PHP the maximum size backups can be is 2 GB, i.e. the largest value a signed 32-bit integer can be.

Note that the 2 GB limit even applies to any 64-bit version of PHP 5.x on Microsoft Windows for technical reasons, only 64-bit PHP 7.x will allow you to overcome this limit.

Are you sure the course is exceeding this limit though? In my experience you get a "value out of range" error although this is with later versions of Moodle. If you are using the Microsoft SQL Server driver for PHP ("sqlsrv") the problem might be due to MDL-34744. You could try using the FreeTDS driver instead ("mssql") and seeing if that helps (https://docs.moodle.org/26/en/Installing_MSSQL_for_PHP#Using_FreeTDS_on_Windows).