Import/Export Database


Using the Import/Export feature of TGP Rotator you can easily copy your database of galleries from one TGP Rotator installation to another. By transferring a single file and using a few mouse clicks you can quickly copy your galleries into any TGP Rotator installation.

Important Note The Raw SQL import/export feature should only be used with two installations of TGP Rotator that are the same version. For example, if you are exporting from version 1.1.2, you should only import those galleries into another 1.1.2 installation. Trying to import them into a previous version or a later version will most often not work correctly.

Exporting Galleries

To export your galleries, locate and click on the Import/Export link in the Setup section of the control panel menu. TGP Rotator will then display a page where you can control the import and export process. Near the top of the page you will see a section labelled Export Galleries From This Installation. You will first need to enter the filename that you want to use to store the exported galleries. Next you need to select the File Format of the export file. There are two different types: Once you have everything set how you want it, press the Export Galleries button. You will be returned to the same page when the gallery export is complete. The file that you specified will be created in the data directory of your TGP Rotator installation.

Importing Galleries

This function only works for importing galleries generated by another TGP Rotator installation using the Raw SQL file format.
If you have a text file that contains your galleries one per line, use the normal gallery importing interface.

To import your galleries from a file generated by the export function, locate and click on the Import/Export link in the Setup section of the control panel menu. TGP Rotator will then display a page where you can control the import and export process. In the section labelled Import Galleries Into This Installation you will be able to enter the filename that you want to import the galleries from and select some other options.

Before you can import the galleries you will first need to upload an export file generated by another TGP Rotator installation. The export file must have been generated using the Raw SQL export option. It should be transferred in ASCII mode and placed in the data directory of the installation where you will be importing the galleries. Once you have the file uploaded you can use the import feature to import the galleries in that file.
After you press the Import Galleries button you will be returned to the same page and the new galleries will have been imported. You will now need to transfer the preview thumbnails if any were created for the galleries that you imported. This can be done by simply transferring the thumbnails from the site that the export file was generated on to the site that the galleries were imported to. Make sure you transfer the thumbnails in binary mode and set their permissions to 666. The thumbnails should go into the directory that corresponds to the Thumbnail URL that you have entered in TGP Rotator's Edit Options interface. Finally, use the quick tasks interface (from Display Galleries) to do a search and replace on the Thumbnial URL field. Search for the thumbnail URL from the installation the galleries came from and replace it with the thumbnail URL you are importing the galleries into.

Important Notes

If you did not select the 'Remove existing galleries before importing' option it is possible that some galleries will not be imported. If you already have some galleries created for the installation that you are importing galleries into those have precedence over imported galleries. If an imported gallery has the same ID number as a gallery already in the database, the imported gallery will be skipped over and not be imported into the database.

Galleries that you import must fit into one of the categories that you have defined. For this reason, when you are importing galleries you should make sure that the installation you are importing galleries to has the exact same categories as the installation that the galleries were exported from. Category names must match exactly, there can be no difference in text case, spelling, or whitespace.