The upgrade process should be very safe. But just in case, it's a very good idea for you to make a backup. So before you perform this upgrade you should backup the database just in case. If something goes wrong you can always restore the database and try again. If you've made modifications to your copy of the Gallery 2 code, you should back up your changes also in case the update overwrites some of them.
Browse to your Gallery2 installation in your web browser, log in as an administrator, click the "Site Admin" link then click the "Maintenance" link. You'll be presented with a list of maintenance tasks. Next to the task marked System Information click the run now link then look for a line marked Gallery version.
There are three ways to upgrade:
This file contains both the patch files and all the changed files so that once you have it you can upgrade using either approach. Copy this file to your webserver and unpack it in your gallery2 directory. Once unpacked, you will have the following files:
|patch-core.txt||The necessary changes to the core module|
|The necessary changes to the various modules|
|README.txt||Instructions (that tell you to come to this page)|
|changed-files-core.zip||A zipfile containing all the changed files in the Gallery 2 core|
|A zipfile containing all the changed files in the various modules|
(We don't list all the changed-xxx and patch-xxx files here)
Remember that when you're done with the update, you should delete these files! Leaving them around won't hurt you, and won't be a security risk but they don't help either. Also remember that you don't need all these files. You only need to patch the modules that you have installed. Now there are two different approaches you can try.
Inside the zipfile are more zipfiles with names like "changed-files-xxx.zip". Each of these contains the changes for a specific module. Simply unzip these files inside your Gallery 2 directory and then run the upgrader and follow the instructions. This is reasonably fast because there are very few changed files however if you've modified any of the files that are replaced, your modifications will be lost. On Unix you'd do this:
cd gallery2 unzip changed-files-core.zip unzip changed-files-archiveupload.zip (if you use the archiveupload module) unzip changed-files-comment.zip (if you use the comment module) ...
Repeat this for all changed-files-xxx.zip files.
The advantage to this approach is that it will preserve any modifications that you've made except in the highly unlikely event of a conflict between your modifications and the changes that we've made as part of this patch.
In order to do this, you must be on a system that has the "patch" utility. This is a pretty standard utility on Unix systems, and if you're on Windows you can get it as part of the Cygwin package. Solaris users should use gpatch (GNU patch, /usr/bin/gpatch on Solaris 10).
There are .txt files included in the upgrade file named something like "patch-xxx.txt" . All updates contain patch-core.txt. Copy them to your Gallery 2 directory and then do the following:
patch -p0 -s < patch-core.txt patch -p0 -s < patch-archiveupload.txt (if you have modules/archiveupload) patch -p0 -s < patch-comment.txt (if you have modules/comment) ...
Repeat this for all patch files. You should expect to see no output. Anything that is returned is an error. If you get an error you should contact us in the Gallery 2 forums and ask for help.
Download a complete new copy of Gallery 2.1.2 and simply unpack it on top of your existing Gallery 2 install and then run the upgrader. This is a simple and thorough but slow method. Also, any modifications that you've made to Gallery 2 will be lost when you replace the files, with the exception of template changes made in local directories.
Note: Gallery 2 packages come in 4 flavors (typical, minimal, full, and developer). You should try to make sure you download the same package as you did before.
If you have Gallery 2 installed from Subversion you can simply run:
which will get you the latest code from the area you originally checked out. If you checked out BRANCH_2_1 then this will retrieve the latest 2.1.x version; if you checked out the trunk this will get the latest development code.