Error in cource backup

Error in cource backup

by Mika Ståhlberg -
Number of replies: 5

Hi,

When i try to backup a cource (using Moodle 1.1 for now, upgrading to 1.2.1 after cource backup succesfull) i get error:

 Zipping backup

PCLZIP_ERR_READ_OPEN_FAIL (-2) : Unable to open archive '/home/jobcafe/moodledata/temp/backup/1081422173/backup-thvk_1/2004-20040408-1402.zip' in wb mode

- zip and unzip are empty in variables
- tryied to do it with /usr/bin/zip & /usr/bin/unzip without success, at the same point i got similar error  "An error has ocurred"
- debug is set
- permission for moodledata dir are ok, everything is working but backup

Any help/succestions are very welcome!

mika

Average of ratings: -
In reply to Mika Ståhlberg

Re: Error in cource backup

by Eloy Lafuente (stronk7) -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Peer reviewers Picture of Plugin developers Picture of Testers
Hi Mika,

First of all, I highly recommend you that leaving zip & unzip empty! smile

Second, is it the first backup you try? The problem seems to be that zip routines aren't able to create the "moodledata/temp/backup/1081422173/backup-thvk_1/2004-20040408-1402.zip" file.

Can you confirm that EVERY directory (moodledata, temp, backup) exists and has write perms? If no, please chmod them and try again. If they don't exist, please create them manually. Maintain debug activated.

If the problem persists and all your dirs (recursively) have write perms, we could try another "debug technique" but it involves modifying pclzip to examine what is happening there.

Hope it helps, ciao smile
In reply to Eloy Lafuente (stronk7)

Re: Error in cource backup

by Mika Ståhlberg -

Figured it out, cource short name should not have / character, because zip-filename points to dir

backup-thvk_1

and to a file

2004-20040408-1402.zip

in there (backup-thvk_1/2004-20040408-1402.zip)

So after removing / character everything worked fine, filename is correct :

backup-thvk_1_2004-20040408-1603.zip

Would not have figured it out without your reply, though wink so Thank You!

I'n not sure, should this be listed as a bug?

mika

In reply to Mika Ståhlberg

Re: Error in cource backup

by Eloy Lafuente (stronk7) -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Peer reviewers Picture of Plugin developers Picture of Testers
Hi Mika,

I haven't seen that "/" char in your course shortname, sorry blush.
And it was solved in 1.2 development, sure!

Thanks and ciao smile
In reply to Eloy Lafuente (stronk7)

Re: Error in cource backup

by denis cahalane -

Hi Eloy. I'm running version 1.2.1, but I still tripped over this problem. I've been running your wonderful scheduled backup nightly, and all except 8 of 250 courses back up perfectly. On investigation the 8 failures turned out to have either / or () in their short names.

I suppose it would be nice to have automatic transformations, but I'm happy to just change the names.

denis

In reply to denis cahalane

Re: Error in cource backup

by Eloy Lafuente (stronk7) -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Peer reviewers Picture of Plugin developers Picture of Testers
Hi Denis,

thanks for your inform. I though it was solved log time ago but it wasn't true sad. I've made some minor changes to strip that chars. It's in CVS now and it seems to work fine. Any confirmation will be welcome...

Ciao smile