Back up problems

Back up problems

by Michael Penney -
Number of replies: 8

Hi, when I back up courses with books in them to different courses, the images are still linked to the old courses.

Is this fixed in the latest version or is on the list to get fixed?

Thanks!

Average of ratings: -
In reply to Michael Penney

Re: Back up problems

by Chardelle Busch -
Picture of Core developers

Hi Michael,

I've never had any problem with backing up links in books.  How are you linking to them?  Does the link include file.php?:

http://lifeworkouts.com/center/file.php/3/assets/word.gif

In reply to Chardelle Busch

Re: Back up problems

by Michael Penney -
Hi Chardelle, I link using the image importer in the html editor menu. When I restore the course to a new course, the links still refer to the old course (this appears to work fine as an admin of course, except if you view the books as a person not in the first course, they get a broken link;-(.

For instance, I recently made a copy of my introductory course to start updating it for our new version of Moodle for next semester. I backup the old course, and restored it to a new course. The old course id was 10, the new one is 63. This is how the links (in the new course) look:

<img src="http://learn.humboldt.edu/file.php?file=/10/book/weekly.jpg" />

This works for me in course 63 since I am in both, but for a person in course 63 but not in course 10, the links don't work.

In reply to Michael Penney

Re: Back up problems

by Chardelle Busch -
Picture of Core developers
Well Michael, the only difference I can see is that you have file= in your link.  Maybe that's a problem????  Does that get added when you are backing up?  Or is that also in the original link?  I haven't seen that before.
In reply to Chardelle Busch

Re: Back up problems

by Michael Penney -

Hi Chardelle, the link works either way, and it was created by the standard insert image from the html editor (the backup may have messed that up too, but the link opens the image up with the file= just fine).

I think the important difference is the course's number(10), the backup should change that to the new course's number (63), no?

In reply to Michael Penney

Re: Back up problems

by Chardelle Busch -
Picture of Core developers

Good Morning Michael,

I have never seen that file= before--I don't get it when I use insert image from the html editor (still running 1.4.1+).  When I backup a course then, yes, in the restored course, the link is the same (i.e. as above) except for the new course id #.  And it even works when restoring to a completely different site!  (It replaces the entire URL to the new one).

You might try deleting that file= from your links and see if it works. 

In reply to Chardelle Busch

Re: Back up problems

by Petr Skoda -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers
Hi!

The "relinking" of files is done automatically by moodle backup routine. If it works for Resources it should work for Books too.

In the latest version I have fixed only import function - it did not respect slasharguments setting and always created links as file.php/xx/xx/some.gif.

I am going to test the backups now on my test sites...

skodak

---
during the backups there should be displayed the original image:

and the transitional form:


during restore first:
http://127.0.0.1/backup/%5C%22$@FILEPHP@$/f1.jpg%5C%22
changed to:
http://127.0.0.1/backup/%5C%22http://127.0.0.1/file.php/5/f1.jpg%5C%22

??? - something is wrong with the restore messages, but the result is:


Well, it works for me...

----
Maybe there is a problem with PHP or PCRE extension, what is your exact server configuration?
----
... Apache/2.0.46 (Red Hat), PHP/4.3.2
Hmmm, the problem must be somewhere else :-\
----
Either the original Book was not in course 10, but somewhere else or the backup is not working correctly. Could you send me some backup with this book by email?
In reply to Petr Skoda

Re: Back up problems

by Petr Skoda -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers
Now I see, you are using very old version 1.3.1, please upgrade to 1.4.2 as soon as possible.

In your version the file relinking does not work for file.php?file=/xx/xx/some.gif, Chardelle was right wink
In reply to Petr Skoda

Re: Back up problems

by Michael Penney -
Thanks Petr, I can't upgrade now as people are using the site until Jan/05 (and tend to get freaked if new features suddenly appear). However, it is good to know that these problems have been resolved.