Gallery3:Modules:g2 import - Gallery Codex
Personal tools

Gallery3:Modules:g2 import

From Gallery Codex

Gallery 2 Import

Description

This module imports your Gallery 2 items to Gallery 3.

For best results, update your Gallery 2 install to version 2.3.1 . Note: Importing comments does not work with versions <= 2.2.x

If you get a blank screen when you enter the path to embed.php, upgrade your installation of Gallery2 to 2.3.x first.

Do not import root albums from your G2 install that have these names:

"albums", "photos" or "movies"

Installation

This module is part of the default Gallery 3 distribution and can be activated via:

Site admin -> modules

Configuration

Once activated, the module needs configuration.

  1. Enter the absolute full system file path to your gallery 2 web accessible base install:
    • Settings -> gallery 2 import
    • For example path: /home/public_html/gallery
    1. Hint: while logged into your host, navigate to your web accessible gallery 2 folder and either type 'pwd' (for print working directory) or look at your full path on your client and use this result.
    2. note that path is different from url
  2. Click save.

After you enter your correct path to the Gallery 2 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 g2 (data folder and database)
  2. Put g3 on your server, e.g. to a parallel folder to your g2.
  3. Install g3
  4. Enable the comments module and the g2 import module in g3
  5. Configure g3's g2 import module and run the import process.
  6. Rename your g2 folder to something else (e.g. from "gallery" to "gallery_old")
  7. Rename your g3 folder to what the g2 folder used to be (e.g. "gallery3" to "gallery")
  8. Add the mod_rewrite rules from g3's g2_import module page to your .htaccess file to ensure that the g2 urls continue to work
  9. Delete your g2 folder ("gallery_old"), it's no longer needed. you can delete your g2 database as well. (but keep your backups)

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 2 and 3. There are also some other contributing factors, but they're some of the main ones. Some real-world examples of processing time: 6-8 hours for 1400 photos; about 5 hours for 24,610 photos.
  • Gallery 3 does not support multisite installations. If you already have a multisite Gallery2 installation, you may use this module to import one of those Gallery 2 site's data/images into a new, Gallery 3, single-site installation.
  • Gallery 3 by default does not preserve the original images for various operations (e.g. image rotation will operate directly on the originals, possibly degrading its quality irreversibly). If you would like to always keep a copy of the untouched original images, consider installing the module "KeepOriginal" before running g2 import.
  • Gallery 3 does not support per-user / per-item permissions, only Album level and Group level permissions.
  • The only supported file formats are JPG, PNG and GIF, FLV and MP4. Other formats will be skipped.

'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