Gallery3:Modules:g1 import - Gallery Codex
Personal tools

Gallery3:Modules:g1 import

From Gallery Codex

Gallery 1 Import

Description

This module imports your Gallery 1 items to Gallery 3.

For best results, update your Gallery 1 install to the latest version

Installation

This module is currently not part of the Gallery 3 distribution. Download is possible via git or as archive. Once installed the module can be activated via Site admin -> modules

Configuration

Once activated, the module needs configuration.

  1. Enter the entire path to the albums.php file of your old Gallery 1 installation:
    • Settings -> gallery 1 import
    • For example path: /home/public_html/gallery/albums.php
  2. Click save.

After you enter your correct path to the Gallery 1 installation and click save, you'll see a 'begin import' option at the very bottom of the page. It may ask you if you like to reduce the Gallery 3 thumbnail size to speed up the importing process, but that's totally up to you.

Upgrading/importing summary

  1. Backup your g1 (data folder and database)
  2. Put g3 on your server, e.g. to a neighboring folder of your g1.
  3. Install g3
  4. Enable the comments module and the g1 import module in g3
  5. Configure g3's g1 import module and run the import process.
  6. Rename your g1 folder to something else (e.g. from "gallery" to "gallery_old")
  7. Rename your g3 folder to what the g1 folder used to be (e.g. "gallery3" to "gallery")
  8. Add the mod_rewrite rules from g3's g1_import module page to your .htaccess file in both the gallery and the albums folder to ensure that the g1 urls continue to work
  9. Delete your g1 folder ("gallery_old"), it's no longer needed. You may remove your g1 albums folder as well - but recreate an albums folder to put the .htaccess there.

Notes

  • After you hit begin import, just let the module do its thing. Keep in mind that the import process may take several hours depending on how many photos & videos your gallery has and whether or not you kept the thumbnail sizes the same in gallery 1 and 3. There are also some other contributing factors, but they're some of the main ones. Some real-world examples of processing time: ? hours for ? photos; about 1 hour for 2500 photos (split into 90 albums, keeping thumbnails the same size).

'Database_Exception' error

In some instances you might get a error in the logs:

    error: exception 'Database_Exception' with message '#1226: User 'xxxxxx' has exceeded the 'max_questions' resource

This is a host limit and resuming after some time duration set by your host you should be able to resume your import.
You can see if this FAQ helps: MySQL query limit