Gallery1:Migrating Gallery - Gallery Codex
Personal tools

Gallery1:Migrating Gallery

From Gallery Codex

How can I migrate my Gallery from one host to another?

Warning! If you are moving between a Windows and non-Windows host, please make sure your Gallery is upgraded to at least version 1.4 before you attempt to migrate

The important data that needs to be saved is your albums directory. You only need to save the actual Gallery files if you modified them.

To move your Gallery from one server to another, you must move your old albums directory to the new host. To do this, either download the albums directory via FTP (if you are using FTP) or use a utility like tar and/or gzip/bzip (or zip) to make an archive of the albums directory (you can only use the command line utilities if you have shell access). Note that Gallery creates a .users folder in the albums directory, which can be hidden by some FTP clients. This directory is vital if you want to maintain your user database. See the FAQ if your FTP client hides this directory and you can't download it. Once you have a copy of the albums directory, upload it to your new host. If you used FTP, just re-upload the albums directory to your new host. If you used something like tar, upload the archive to the new host and untar/unzip it. Once you have the albums directory on the new host, you must chmod all the files and directories 0777 (recursively) (see the FAQ for information). If you do not chmod the files correctly, your new Gallery will not work correctly.

If you wish, you can also save your old config.php file and upload it instead of creating a new, blank config.php (as you would with a normal installation) before configuring your new Gallery installation. You'll still have to re-run the configuration wizard to specify new paths for everything, but saving some host-independent information (e.g. album defaults, etc..) can save you some time.

After you have your old albums directory on the new server, you should download a copy of Gallery and upload it just as you would install any other copy of Gallery (see the README file for installation instructions). However, when you get to the configuration wizard, for the 'Albums Directory' configuration parameter, you should put the path to the albums directory you just uploaded, not a blank directory, as you would on a clean install of Gallery. After you secure Gallery, all your data should show up intact!


Why do I get this error after migration: Warning: fopen ('.../albums/foo/album.dat.lock', 'a+')?

This is caused by not recursively chmodding the new albums directory 0777. See the FAQ for information on how to fix this.

Will moving my Gallery to another host cause me to lose data (comment, images, etc..)?

If you follow the instructions in outlined in this document, there should be no loss of data whatsoever. However, because of Murphy's law, it's a good idea not to delete your albums directory on your old host before you know everything is working on the new host.

Something went wrong, it's not working! What do I do?

First, try again. Make sure you follow all the instructions. If you still cannot get it to work, start a thread in the forums. As with any forum post, include as much detail as possible -- exactly what you did, what you expected to happen, and what really happened, along with any error messages. We will probably be able to sort you out!