Migration from Gallery 2.2 on old server to Gallery 2.n on new server
user4353
Joined: 2009-11-25
Posts: 6 |
![]() |
I have been looking through all the available documentation that I can find, but none seems to address the specific issue of migrating from an old server to a new one. If there is something I have overlooked, I would of course appreciate a referral. My situation is this: Ideally, it would be great if I could simply install Gallery2 from the CentOS native rpm's and simply migrate the data. And it may indeed be just that simple. However, not knowing the inner workings of Gallery, I am hesitant to try anything without a bit of senior input. Which is why I am posting here. For instance, would it be a good idea to first upgrade the old install to 2.5 and then migrate? Or would that be a wate of time and simply an additional potential for problems? Is there a way to export all the data from 2.2 and then simply import it into the new install? That would be cleanest and best, I am sure, but I am have searched in vain for such a feature. Barring that, is there description somewhere of what steps would be required to make sure I get all the necessary meta-data, as well as image data, pulled from the old install? In general, I would very much appreciate any advice on how to best approach this migration. Thanks! /Niels |
|
nivekiam
![]()
Joined: 2002-12-10
Posts: 16504 |
![]() |
First upgrade on the new server. Read this: And the current version is 2.3. Download it from here: |
|
alecmyers
Joined: 2006-08-01
Posts: 4342 |
![]() |
As Nivekiam says, you must upgrade first. There is no mechanism to export the data from one version and import the data to another version. The 'export' is simply a dump of the SQL database, and the 'import' write the new SQL database. The codebase that runs on the imported data must therefore be the same as runs on the old data. G2.3 (the latest version) has a mechanism to export the data from inside G2 as a backup file, but that won't help you with a previous version. |
|
nivekiam
![]()
Joined: 2002-12-10
Posts: 16504 |
![]() |
Quote:
G2.3 (the latest version) has a mechanism to export the data from inside G2 as a backup file, but that won't help you with a previous version. I don't know about you, but I've never been able to get that to restore properly. Others have complained about that too. I wouldn't ever trust a backup that any web software, including Gallery, spit out for me, do a database dump and backup your file system and keep that |
|
alecmyers
Joined: 2006-08-01
Posts: 4342 |
![]() |
Quote:
I don't know about you, but I've never been able to get that to restore properly. I confess, I've never tried. I agree that you can't be a database dump! I suppose it would be feasible to migrate to a new installation of 2.2, and upgrade that in place, I can't see why you'd absolutely *have* to upgrade the original first. And that way if the upgrade fouled up (sometimes happens :whistle |
|
nivekiam
![]()
Joined: 2002-12-10
Posts: 16504 |
![]() |
Quote:
I suppose it would be feasible to migrate to a new installation of 2.2, and upgrade that in place, I can't see why you'd absolutely *have* to upgrade the original first. Same here. I've done that and upgraded when I got to the new server. I think that is in the instructions for those people who don't migrate their current code base and instead grab the current code from gallery.menalto.com (seems there is a fair number of people who do that). When I move my sites around, I move the entire thing. But then again I use ssh and tar and can just wget from the old server and unpack on the new server ____________________________________________ |
|
alecmyers
Joined: 2006-08-01
Posts: 4342 |
![]() |
Do you think there's an argument for making more obvious the links for people who want to download old versions, for that purpose? |
|
nivekiam
![]()
Joined: 2002-12-10
Posts: 16504 |
![]() |
Right now the links to the old versions are broken. Some update on SourceForge seems to have gotten rid of all older versions of G1, G2 and G3. Only 2.3 and 2.2.6 exist for G2. Right now I have on my site some downloads for older versions. I don't know if I'll keep them there permanently, but for now it hasn't even started to scratch my bandwidth allocation. These are all checked out of SVN and I'm pretty sure they are the last release of that branch: I don't have the incremental versions, 2.2.5, 2.2.4, etc because I don't know SVN well enough to figure out how to check those out |
|
user4353
Joined: 2009-11-25
Posts: 6 |
![]() |
Thank you for your assistance so far. Unfortunately, I am not having any luck with the migration. I upgraded Gallery2 to the latest 2.3 release on the FreeBSD server (downloaded today, 2.3 "typical" install), which seems to have worked. At least I can use and browse the gallery as normal. However, it appears that version is not compatiable with the one available in the central CentOS repository, although they are both described as Gallery2.3. Specifically, the version information from CentOS is: When running the installer after moving and chown'ing the data and importing the database, I get the following error: "Gallery tables already exist in the database and there is a versions.dat file in the Gallery storage directory. But the version of the installed Gallery database tables does not match the version of the installed data in the Gallery storage directory. Select a clean install to erase all data in the database and in the storage directory and to advance to the next step." As you can see, it doesn't actually give me a hint as to what the incompatible versions are. Perhaps my only option is to remove the rpm-based installation from the CentOS machine and do a manual install? |
|
user4353
Joined: 2009-11-25
Posts: 6 |
![]() |
Aaaaactually, I just realise that I may have imported the wrong database-backup. Ahem. I'll get back to you. |
|
user4353
Joined: 2009-11-25
Posts: 6 |
![]() |
Well, that helped a little bit. But ufortunately, not enough. I've managed to install Gallery2 using the old data files and the old database. It is working as far as the structure goes -- in other words, all the albums show up on the front page. However, there's two major issues: - All images and thumbnails are broken, ie. they all display the default broken image icon. It is possible to browse the albums as if nothing was wrong, but no pictures work at all. I have changed the file permissions on the g2data directory to "apache", which is the user the httpd process is running as. I have also looked in the httpd log files and nothing is being logged as far as problems go. The access_log does, however, log a unspecified 500 error: nnn [03/Dec/2009:14:57:26 +0100] "POST /gallery2/main.php HTTP/1.1" 500 844 "<referrer>" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5" |
|
nivekiam
![]()
Joined: 2002-12-10
Posts: 16504 |
![]() |
Quote:
However, it appears that version is not compatiable with the one available in the central CentOS repository, I'd recommend against ever installing Gallery from a distro's repository. They seem to be broken quite frequently. Grab Gallery from http://gallery.menalto.com and you'll be good. Be sure to follow these instructions when moving servers: Server errors aren't logged in the access log, check the error log. You can also try putting Gallery into debug mode: |
|
user4353
Joined: 2009-11-25
Posts: 6 |
![]() |
Thank you. I failed to mention it, but I have actually already overwritten the distro's installation with the one from the menalto tarball. I may have been unclear, but I did check the httpd error_log, which as empty (since the last realod, that is). Putting Gallery into debug mode gives the following information: Quote:
Error (ERROR_BAD_PATH) : Invalid path: modules/captcha/classes/CaptchaValidationPlugin.inc I suspect this means that I had a module enabled in the old installation that is no longer functional. I'm going to try going back to the old install and upgrade and disable as many plugins as I can, then try again. |
|
nivekiam
![]()
Joined: 2002-12-10
Posts: 16504 |
![]() |
user4353
Joined: 2009-11-25
Posts: 6 |
![]() |
Thank you very much for your help. I have now managed to get the installation working on the new server. It took some more installations back and fourth, as well as deinstalling all of the plugins that (for some reason) gave version warnings in the installer. I also had a problem with php running out of script memory, the default installation only allowed 16M (and so the plugins page wouldn't load). I increased that to 256M, which worked. |
|