Are 107MB or 134MB backup files too big to restore?

Are 107MB or 134MB backup files too big to restore?

by Mitch K -
Number of replies: 6

I have been having problems to backup and restore problems. Restore/Backup stop at "Unzipping backup".

I was told that I should see the advice given in our Backup and restore FAQ. Then, I read them. They are as follow:

Backup stops at Zipping backup

Moodle 1.9 and lower use a PHP library to zip files that isn't very efficient and struggles to zip/unzip large files. You can use an external Zip binary to use a different process to handle your files - you can set this in Admin > Server > System Paths Moodle 2.0 uses new PHP zip functions so that specifying an external Zip binary isn't necessary see System_paths#Path_to_zip for help configuring an external zip binary.

Path to unzip

When uncompressing files Moodle uses either the PclZip library or the external unzip program. As with the zip program, the external program is faster, so if you are experiencing slow backups or other performance problems, try setting the path to your unzip program. On Unix/Linux systems, find the path as follows using the which program:

[root@moodle ~]# which unzip
 /usr/bin/unzip


Then, I have contacted my hosting company and received the following answer. "There is nothing called unzip path in our platform." In other words, I cannot set path to unzip and still cannot restore my course.

My backup files are 107MB and 134MB, which are not really big files in my opinion. I really wanted to include video files but if 107MB or 134MB are too big, I cannot include any video files. Are 107MB or 134MB too big to restore? If so, why Moodle can only handle such small backup files? I am a language teacher and I would liked to include a lot of sound and video files in my courses and I still have not put many videos which I want to include but it seems that it is already too big to backup and restore.

Is there a way to restore the courses from the unzipped course files? For instance, If I unzip them offline uploaded them via ftp, can I restore the courses in that way?

Average of ratings: -
In reply to Mitch K

Re: Are 107MB or 134MB backup files too big to restore?

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
The tone of the reply from your hosting company implies that they didn't know what they were talking about - or didn't understand what you asked.

What you want to know is "is are zip and unzip binaries available and, if so, what is the path to them?". If you are hosting on Linux have you tried simply entering /usr/bin/zip and seeing if you get a green tick?
In reply to Howard Miller

Re: Are 107MB or 134MB backup files too big to restore?

by Mitch K -
Thank you!

I did not know what is the path to unzip myself, therefore the way I asked was not clear. Thank you I will ask again.

Thank you.



In reply to Howard Miller

Re: Are 107MB or 134MB backup files too big to restore?

by Mitch K -
Hi,

I still do not know the path to the unzip. The followings are the chat converstion with my hosting company.

RS: Hi M. My name is RS, how are you today?

M: I am fine thank you.

M: "is are zip and unzip binaries available and, if so, what is the path to them?

RS: Could you please provide me with your account username?

M: -----------

RS: Thank you for the authentication.

RS: May I place you on hold while I review your account and get back to you within 2 or 3 minutes?

M: Yes

RS: Thank you for holding.

RS: To zip or compress a file, please follow the steps given below:

RS: 1. Log into the link: http://members. -----------.com/webControl/archive.bml with the account username and password.

RS: 2. Enter the file name which you wish to compress.

RS: 3. Select the option whether you want to replace the existing compressed file.

RS: 4. Select the compression type.

RS: 5. Click on the ‘Compress’ button.

RS: To unzip or uncompress a file, please follow the steps given below:

RS: 1. Log into the link: http://members. -----------.com/webControl/archive.bml with the account username and password.

RS: 2. Under the section ‘Uncompress/Unarchive a File’, select the file which you want to uncompress.

RS: 3. Enter the output directory and output file name.

RS: 4. Click on the ‘Extract/Uncompress’ button.

RS: Is there anything else I can assist you with today?

M: I need the path to unzip

M: which Moodle can use. Not one by one manually.

M: I have tried these already.

RS: Could you please let me know whether you wish to unzip any file or folder in the account?

RS: Did you receive my last message?

M: I would like to unzip Moodle backup files on the process of restore Moodle course. But I have been having problems to backup and restore courses. Therefore, not one by one as you suggested above. My problem is testore/Backup stop at "Unzipping backup".

Then, I was told that I should see the advice given in our Backup and restore FAQ. Then, I read them. They are as follow:

Backup stops at Zipping backup

Moodle 1.9 and lower use a PHP library to zip files that isn't very efficient and struggles to zip/unzip large files. You can use an external Zip binary to use a different process to handle your files - you can set this in Admin > Server > System Paths Moodle 2.0 uses new PHP zip functions so that specifying an external Zip binary isn't necessary see System_paths#Path_to_zip for help configuring an external zip binary.

Path to zip

When compressing files Moodle uses either the PclZip library or the external zip program. The external program is faster, so if you are experiencing slow backups or other performance problems, try setting the path to your zip program. On Unix/Linux systems, find the path as follows using the which program:

[root@moodle ~]# which zip
/usr/bin/zip

In this example the path to enter is /usr/bin/zip.

This program must be the PKZIP-compatible zip. The GNU zip program gzip cannot handle the type of zip files required by Moodle.

On Windows systems, download [the GNU Win32 Zip complete package]. Run the setup.exe program to install and use the search facility in Explorer to find the location of the zip.exe file. The path should look like:

c:\program files\gnuwin32\bin\zip.exe

If this does not work, shorten it to the 8.3 notation:

c:\progra~1\gnuwin32\bin\zip.exe

Path to unzip

When uncompressing files Moodle uses either the PclZip library or the external unzip program. As with the zip program, the external program is faster, so if you are experiencing slow backups or other performance problems, try setting the path to your unzip program. On Unix/Linux systems, find the path as follows using the which program:

[root@moodle ~]# which unzip
/usr/bin/unzip

In this example the path to enter is /usr/bin/unzip.

RS: Okay.

RS: May I place you on hold while I review your account and get back to you within 2 or 3 minutes?

M: In order to restore courses, I need the path to zip

M: Yes

RS: Thank you for holding.

RS: Could you please let me know how exactly you will be unzipping the files with the requested path?

RS: Thank you for holding.

RS: Did you receive my last message?

M: The Moodle will do for me. But at the moment I am having a problem to restore the courses because restore process stops at unzipping backup.

M: Therefore, I need the path to unzip which I can set in moodle

M: It says

M:

Path to zipzip
Default: Empty
Indicate the location of your zip program (Unix only, optional). If specified, this will be used to create zip archives on the server. If you leave this blank, then Moodle will use internal routines.
Path to unzipunzip
Default: Empty
Indicate the location of your unzip program (Unix only, optional). If specified, this will be used to unpack zip archives on the server. If you leave this blank, then Moodle will use internal routines.

RS: May I place you on hold while I review your account and get back to you within 2 or 3 minutes?

M: http://docs.moodle.org/en/Backup_and_restore_FAQ#Backup_stops_at_Zipping_backup

M: http://docs.moodle.org/en/System_paths#Path_to_zip

RS: Thank you for your patience, I am still researching the issue, I will be back with some more information in 5 more minutes.

RS: Thank you for holding.

RS: Please use the path '/usr/local/bin/unzip' while unzipping backup.

M: Thank you. But sometimes my path are longer. For in stance the configuration of Moodlerroot is : /home/bosweb/xxxxx/xxxxx/------------ /

RS: That is the path from the server to the account.

M: So, /usr/local/bin/unzip' is OK?

RS: Yes.

M: Thank you!

RS: Is there anything else I can assist you with today?

M: Hi,

M: I have just input /usr/local/bin/unzip'

M: but it does not show tick.

M: It means something is wrong.

RS: May I place you on hold while I review your account and get back to you within 2 or 3 minutes?

RS: Thank you for holding.

RS: Could you please provide me the exact error message which you are getting?

M: If the path is correct, I should get green tick but at the moment red.

RS: I'm sorry, in order to assist you, I am going to have to ask a member of our team who specializes in this issue to take care of this for you.

RS: You should be hearing from our specialist within 24-48 hours. If you have any questions in the meantime, please let us know and be sure to refer to the link:xxxxxxx(deleted)

M: Thank you.

RS: Is there anything else I can assist you with today?

M: No

RS: Thank you for chatting with us. Please feel free to contact us at any time. We are available 24x7.

RS: Bye!


In reply to Mitch K

Is there any way to restore without set path to unzip

by Mitch K -
I have received the answer from my hosting company as:

"Unfortunately, it is not possible to run the commands in our platform. I suggest you to please use any third party software (win-zip) for unzipping the files from your end? "

Are there any ways to restore the course manually? For instance unzip on the local computer and upload separately?



In reply to Mitch K

Re: Is there any way to restore without set path to unzip

by Lisa Perez -
Did you ever find a solution to the problem?
In reply to Lisa Perez

Re: Is there any way to restore without set path to unzip

by Richard Wallace -
I had the same issue and was not able to restore couorses over about 80mb.

I just placed the path

/usr/bin/unzip

into moodle and it then worked a treat.

Maybe just try that and see if it works?