Gallery2:How To Backup and Sync the DB - Gallery Codex
Personal tools

Gallery2:How To Backup and Sync the DB

From Gallery Codex

Backup your Gallery 2 Database using phpMyAdmin

Disable and uninstall rewrite module

Login as admin and disable and uninstall rewrite module.

Log into phpMyAdmin

From the main login screen, select 'Databases'


Find Database

Now click the name of your database - or your Gallery database if you have several databases.


Click Export

The next screen will show you all the tables inside your Gallery database.


Ignore those, and click the 'Export' tab on the top set of tabs.

Export Options

Look at the left box at the top of the Export section. All the tables in the database you selected are in that box.
If you have other programs that use the database, then choose only those tables that correspond to your Gallery install. They will be the ones that start with "g2_" or whatever 'tablePrefix' you specified in your 'config.php' file.

You need to copy where all the radio buttons and checkboxes are checked.


Tick the 'Save as file' option, and leave the template name alone.
For now, select 'None' for compression.

Now click 'Go' and you should be prompted for a file to download. Save the file to your computer.

Backup Files


Depending on the database size, this may take a few moments.

Once that download is complete, check the 'zipped' option, click 'Go', and download the next file.
If you wanted, you could download a backup in each of the compression formats. Your choice.

You have now backed up your database.

Remember - you have NOT backed up the files and folders - such as images - but all your users, comments and albums are now safe.