Be careful with Symbolic Links, they may produce troubles!!!!

Be careful with Symbolic Links, they may produce troubles!!!!

by Peter Sereinigg -
Number of replies: 5

Thanks Eloy for your help, your analysis was 100 % right!

If there are symbolic links to include other directories and such a link is "recursive" this will produce a moodle "backup-loop" until disc is full. This will only happens if in the backup configs "include coursefiles" is enabled.

Maybe Eloy may find a solution to stop such a LOOP and a possibility of a special ERROR - E-Mail for failed backups

I am happy, that my discs dont run out of limit again ....

Peter

Average of ratings: -
In reply to Peter Sereinigg

Re: Be careful with Symbolic Links, they may produce troubles!!!!

by Tim Allen -

Peter,

I am using symbolic links to share files between courses, and recently had a problem with backup which was solved by using the linux zip program rather than moodle's internal routines.

I know that, when backing up courses, symbolically linked folders are included as native folders, so that each course backup includes the whole symbolically linked folder with the actual files, duplicating the same files for each course.  When doing a manual backup, from now on I will delete the symbolic link and then add it back when restoring.  But for automatic backups of course this doesn't happen...mixed

By the way, what do you mean by "recursive" links?  I have a link from course file areas to a folder within moodledata called "sharedfolder".  Is that recursive?

Thanks in advance,  smile 
Tim.

In reply to Tim Allen

Re: Be careful with Symbolic Links, they may produce troubles!!!!

by Peter Sereinigg -

recursive links:

f.e.:

\\root\dir1\dir2

if you have a symbolic link in dir2 pointing to dir1 the routine will backup dir1 than dir 2, will find the link to dir 1 and start again - that will be a loop

Peter

In reply to Peter Sereinigg

Re: Be careful with Symbolic Links, they may produce troubles!!!!

by Barron Koralesky -

It shouldn't have trouble with that.  Normal Unix does not by default, it just backs up the links and does not follow them.
In reply to Barron Koralesky

Re: Be careful with Symbolic Links, they may produce troubles!!!!

by Tim Allen -
If that's the case then it's a moodle backup problem that shouldn't be too hard to fix...thoughtful 
In reply to Peter Sereinigg

Re: Be careful with Symbolic Links, they may produce troubles!!!!

by Tim Allen -

Do you mean that there was a symbolic link in dir2 pointing to dir1 and also a symbolic link in dir1 pointing to dir2? 

If so, then I can see how that happened.  Of course, that is inefficient use of symbolic links.  All you need is one symbolic link in one course, and put all the files common to each course in there (or do like I did and make a separate "sharedfolder" directory to symbolically link to).

Tim.  smile