Chris Vaughan's picture

I am currently in the process of upgrading a moodle installation from 12.1 to 14.0. I have backed up from the original server and installed on the new one.

I have followed through the process, up to the point of creating an admin user. after doing so, I cannot access the site.

The following error appears in Firefox. Internet Explorer and Google Chrome also fail.

Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

    This problem can sometimes be caused by disabling or refusing to accept cookies.

I have attempted to clear the cookies to no effect. i believe this to be a server confguration issue.

Forum: 
Tags: 
Jeremy Davis's picture

To clarify your process, please correct me if I'm wrong but I'm assuming that you are:
  • doing a tklbam backup of your v12.x server
  • launching a new v14.0 server
  • restoring your backup to the new server

    If I've got it wrong please correct me.

    Assuming that I have you right, in theory you should be able to login straight away (using your old credentials - you shouldn't need to make new ones).

    Having said that there are significant changes between v12.0 & v14.0 so you may need to do some tweaking.

    A few things come to mind.

    Firstly it's probably worth checking if php5-xcache is installed (it was in earlier versions but shouldn't be now):

    apt-get update
    apt-cache policy php5-xcache
    
    If it is installed, remove it and restart Apache:
    apt-get purge php5-xcache
    service apache2 restart
    

    Secondly, it might also be useful to check the webserver logs. Often they will give something useful (or at least more useful). You can see the last few lines of the log file like this:

    tail /var/log/apache2/error.log
    Finally Apache config changed quite a bit between v13.0 & v14.0. Apache have a page on upgrading that you'll probably find useful. IIRC the file you'll need to adjust is /etc/apache2/sites-available/moodle.conf
  • Chris Vaughan's picture

    Yes, I did the migration with tklbam, pointing to the local filesystems as the target for backup and restore.

    I am now seeing the moodle page. However, I am only seeing a bare new system and not the site from the old server.

    Chris

    Jeremy Davis's picture

    Ok so we need to work out what is going on. TBH I am not very familiar with Moodle and do not know a lot about the inner workings of TKLBAM but I'm fairly confident that we can make this work. Please bear with me though...

    I probably should have said something earlier; but make sure that you do this on your new v14.0 server. I recommend that you do not do anything destructive (or potentially destructive) on your old server until everything is up and running on your new one.

    Personally I'd be working in a v14.0 VM for now (regardless of where you plan to run this eventually). Once you have it running nicely in a VM then you can do a new TKLBAM backup and migrate it to somewhere else if you wish. That way if something goes totally pear shaped during the process you can bin the VM and start again fresh.

    Also I'd highly recommend that you take notes of what you're doing. That way if you need to backtrack (or want to start again clean and fresh) then you can easily redo the steps that work. It'd also be great if you could share as I'm sure others will find it helpful.

    Anyway, to ensure that we are actually getting your old data in there we might destroy the default v14.0 moodle install and then restore your backup.

    So follow these steps:

  • Delete the DB:
    mysql -u root -p
    Should give you a mysql prompt like this:
    mysql>
    Then have a look what DBs you have:
    SHOW DATABASES;
    FWIW it doesn't need to be all caps but that is usually how mYSQL commands are done. There should be a DB called moodle. Assuming there is delete it like this:
    DROP DATABASE moodle;
  • Then remove the moodle files:
    rm -r /var/www/moodle
  • Now restore your backup again, but this time we will skip the packages (also from your comments it sounds like you're using a local filesystem backup so I'll assume that)
    tklbam-restore /path/to/backup/ --skip-packages

    You may need to redo some of the changes that you had already implemented. Now reboot, or at least restart Apache and MySQL.

    How we doing now?

    Hopefully that should have your old Moodle install running on v14.0. Assuming that it appears to generally be working I would recommend doing a new backup now.

    You should still have the same version of Moodle as you have on your old (v12.0) server, so you may well want to update that. Unless you have already updated, IIRC v12.0 had Moodle v2.4. Again IIRC you can not update straight to the latest version, so you'll probably need to update incrementally. I'm pretty sure that v2.7+ can upgrade straight to v3.x. For Moodle upgrades I suggest you consult Moodle docs and/or forums. They will know much more about Moodle than me... But as I say, please post back as you go...

  • Add new comment