Backup and restore

Moving from 1.9 to 2.5

 
Picture of Simon Bryan
Moving from 1.9 to 2.5
 

We finally found the time and hardware to move from 1.9 to 2.5. Did a clean install and have been restring course backups from 1.9 into the new courses in 2.5.

However some courses are problematical - the old file system in moodledata was very simple to manage, so that when very large files were required we used Samba to simply drop them in then link to them from within Moodle. (Typically video and music files). Appears that with the new version you can't do that anymore and have to upload from with Moodle - even if I up the upload limit accordingly it will take a long time to reload and then relink some of the courses.

Can't use the backup and restore method as these courses are so large that the backup in 1.9 never completes, just dies at the zipping stage.

AM I missing something? Any ideas?

 
Average of ratings: -
Picture of Ken Task
Re: Moving from 1.9 to 2.5
Group Particularly helpful Moodlers

First, hope your 2 version is 2.4 and not 2.5 dev (development). ;)

Yes, there is a way that is similar to the process in 1.9 ... using 2's File System repositories.  Turn them on.  That creates a 'repository' directory in the data folder.  Moodle will not create directories in the repo.  System Admin has to create them manually and set appropriate permissions.  Those could be your samba shares as in your 1.9's.

The 1.9's that cannot be backed up ...  do they fail at creating the zip or copying the zip?  Check the 1.9's data folder ... temp/backup/ directory.  You might find zips that are too large to copy - but NOT to large to move to another location on same server or 'scp' to another server.

Example (one way ... am sure others might have/use different methods):

1.9 course ID 6 is one of those large courses.  In the 2 Moodle repo, create a directory called '6'.  On the 1.9 server from the terminal as root user and in the '6' directory, issue the following:

scp * root@newserver:/path/to/mdl2/repo/6/

This would copy everything in 6 on the 1.9 server to the 6 repo on the 2 system.  Have to change ownerships/permissions on the files in the 2 repo 6 so Moodle can use see, but they are all there!

Then, in the version 2 course that had those files, create a file system repo and point the repo to the 6 folder.  Teacher can then relink without having to upload.

'spirit of sharing', Ken

 
Average of ratings: -
Picture of Simon Bryan
Re: Moving from 1.9 to 2.5
 

Thanks Ken (again!)

Can see how the repositories are going to help, just can't get them working yet

Have been using http://docs.moodle.org/22/en/File_system_repository

and yes indeed 2.4 not 2.5!

EDIT

When uploading a file I can see the repositories I created, but they don't appear in the moodledata/repository folder.

Can't see a way yet to upload to the repository folders from Moodle?

 
Average of ratings: -
Picture of Ken Task
Re: Moving from 1.9 to 2.5
Group Particularly helpful Moodlers

System Admin/Site Menu > Plugins > Repositories > Manage Repos

Click the 'Settings' link in the row for File System.

Under the Repositories instances of the site section, click the button to Create a repo.

The next screen will show something like this:

setup repo

Give your repo a name, select the directory you created in the repository directory.  Click Save.

Not done yet ...

In a course Settings menu, Create a File System instance and choose the one created.

In a new blank course ... before enrolling teacher, click the 'Restore' button.  Navigate to the repo created for 19 course backups.   Select the large zip.  Restore to this course ... replaces the blank course you began.

You don't upload the zips via Moodle.  You've aleady done that via scp or Samba or FTP.

'spirit of sharing', Ken

 

 
Average of ratings: -
Picture of Simon Bryan
Re: Moving from 1.9 to 2.5
 

OK, but I have no folders being created under moodledata/repositories

Should Moodle be doing that as I create (as in above) or do I have to do them via caommand line in Linux?

 
Average of ratings: -
Picture of Ken Task
Re: Moving from 1.9 to 2.5
Group Particularly helpful Moodlers

You have to create manually.  Moodle will not do that for you.  What you are setting in the Moodle UI is sort of a 'label' for the DB.  Manually create the folders first via command line.  Set permissions/ownership for apache user/group as well.  When in Moodle configuring a File System repo, the folders you created should show in the pick list of folders.

'spirit of sharing', Ken

 
Average of ratings: -
Picture of Simon Bryan
Re: Moving from 1.9 to 2.5
 

Thanks again Ken. The page I referenced on how to set these up does not seem to mention that at all. Will see if I can leave a comment there.

 
Average of ratings: -