Forums | Mahara Community

Support /
Migrating to new server and changing dataroot path


Richard Glover's profile picture
Posts: 6

29 June 2016, 22:53

Forgive me for not knowing too much but I have been given the task of migrating a Mahara install that I don't administer to a new server.

As part of the migration all of the existing databases and files will be moved to the new server but the file paths on the new server will be slightly different to the old one.

I've had a look around the forum and the help but I don't think I've found the answer to my specific question.

I know there are other things on top of this that I'll have to do but is changing the 'dataroot' path in config.php enough to update the dataroot across the whole site everywhere that needs to be updated?

I noticed in the database there's a table called 'import_entry_requests' and this has columns in it that make reference to an actual file path:

a:9:{s:5:"title";s:27:"Formative assessment 2.docx";s:11:"description";s:0:"";s:5:"ctime";s:25:"2013-12-06T12:55:19+00:00";s:5:"mtime";s:25:"2013-12-06T12:55:19+00:00";s:8:"pathname";s:136:"/var/www/vhosts/XXX/offlinedata/maharadata/temp/import/XXX/extract/files/XXX.docx";s:8:"filetype";s:71:"application/vnd.openxmlformats-officedocument.wordprocessingml.document";s:8:"filesize";i:19667;s:4:"tags";a:0:{}s:13:"isprofileicon";b:0;}

Are these entries just left over from a previous import and I shouldn't have to worry about the file paths contained within them? Or will I have to make sure they match files on the file system (I've not checked if these files actually exist)?

Thanks,

Rich

Robert Lyon's profile picture
Posts: 749

30 June 2016, 9:55

Hello Richard,

Yes, the changing of the dataroot path in your config.php file SHOULD be all you need to change relating to data files.

But as you point out the Leap2A import process has a bug in it that needs fixing up, it shouldn't have the full dataroot path but only the path relative to the dataroot.

The good thing though is when someone adds content via the  Portfolio -> Import page when they then save their choices the rows in the import_entry_requests table are removed.

So the rows you are seeing are from a non-completed import.

Another that leads to another bug - we don't know how old those rows are. So that is another bug needing fixing up so that a cron job can prune off rows that are old.

In your case you should be able to ignore/delete those rows if you close your site via admin before moving it to new server as this will logout all (non admin) users and so you will know no one in progress with an import.

Cheers

Robert

 

Richard Glover's profile picture
Posts: 6

02 July 2016, 2:14

Thanks for the reply Robert, glad that it seems straight forward!

Cheers,
Rich

3 results