Originally, this section of the documentation was intended for something else (an export feature that later was dropped from the Coppermine package, as it wasn't working as expected and caused more issues than it solved). That's why this page still has got a misleading file name.
This page deals with the related topics how to back up Coppermine and how to move it.
This page is meant to explain how to back up a coppermine-driven gallery.
Backups can be used to restore your gallery somewhere in case something goes wrong (i.e. server hard-drive crash, hacking, own mistake) or if you want to move (move servers, move to another webhost, use another application).
Coppermine stores content both on file system level (i.e. on your webspace - that's the hard drive of your webserver) as well as on database level. Think of the database as a giant array of tables that are connected one with the other. Although the database is (technically) being stored in files as well, you can't just backup the file that represents the database. This is being caused by the way that a database works. Additionally, you usually don't have access to the file that represents the database (but don't start the wicth hunt and try to find it - you wouldn't be able to use it anyway). That's why the backup process needs to be two-fold: you need to back up your files and you need to back up your database. Only backing up one of them without the other will result in an incomplete backup that hardly can be usefull.
The backup on file system level is pretty straightforward and you already should be familiar with the technology, assuming that you have installed coppermine in the way the coppermine dev team recommends: using your favorite FTP application. Do not trust buggy tools integrated into WYSIWYG editors. Do not trust wannabe "web-FTP" clients: you need the real thing - a genuine FTP client. If you don't have one already, get one first before continuing.
The term "complete file backup" means in this case "a file backup of the entire coppermine gallery". It's advisable to perform this at least once, so you have a full backup for disaster recovery.
To actually perform such a backup, create a folder on your local hard drive first. Of course you need to make sure in advance that there is enough room left on the storage device you use (your internal or external hard drive in most cases) to hold the entire gallery once the backup is done. If you're short on disk space on your client, you could burn the contents of your backup to a CD or DVD once your backup is complete and then free the precious hard drive space once you have copied everything to CD/DVD.
If you perform frequent backups you don't have to make a complete file backup each time, as the coppermine core code will (i.e. all the files that make coppermine work on the server) will not change from one backup to the other. That's why you can then perform a partial back, i.e. only the contents of the albums folder of coppermine that corresponds to http://example.com/your_coppermine_folder/albums/. If you need to perform a restore later, you will have to restore your complete backup first and then restore your partial backup that was created later and therfor is more accurate and recent.
There are nifty tools available from third parties that will perform an incremental backup by FTP, i.e. they will only backup the files that are new or have changed since the last time the backup was performed. This will reduce the time needed to perform a backup dramatically, but on the other hand will make restoring after a disaster a bit trickier - you should only use that option if you know what you're doing.
Coppermine creates during initial install several database tables that are being used to store the content:
There are many other tables that store specific aspects of the content of your gallery - for a complete list of all tables and the structure within them, take a look at the database schema. All relevant tables of a coppermine gallery have the same prefix - the one you chose during initial install. To perform a database backup, make sure to backup all coppermine tables, i.e. all that have the prefix you chose during install. If you're not sure about the prefix, download the file include/config.inc.php with your FTP app to your client and then edit/view it using a plain text editor (notepad.exe is fine): the prefix should be named there. By default, the prefix name is cpg16x_.
The wording may differ, depending on the tool and it's version you use to perform the backup, you you need to know what exactly to backup.
A full database backup contains both the structure of the database table definitions (i.e. the "instructions" needed to create the empty tables if they have been lost or need to be created on another server) as well as the data (i.e. the actual table content).
The tables coppermine consists of are not equally important though:
Keep in mind though that coppermine will complain (i.e. there will be an error message) if a table is missing, so you need to create the above-mentioned tables in the first place, but they can be empty.
Coppermine does not come with a database backup tool - you need to find one by yourself and use that. However, there is a list of tools the dev team recommends:
Please note that the coppermine dev team can not support you on the usage of phpMyAdmin - so here's just a short summary that is not meant to be a replacement for the documentation for phpMyAdmin:
After performing the manual database backup it's important to make sure that the dump you just created works as expected. Therefore, you should really try to open the dump file first and see if it not broken. Ideally, you should perform a restore on a testbed to make sure everything works as expected.
There have been many users already who relied on their backup without ever having tested it once: if you never test your backup strategy, you will never know if it will enable you to perform the restore in case of a disaster. Since there are many things that can go wrong, it's really recommended to test your backup.
Your coppermine-driven gallery can be moved around on your webserver as well as from one webspace to the other. Here's how you accomplish those tasks:
|→||c:\temp\coppermine\||Use your FTP app to copy the gallery folder and everything within it into a temporary folder on your client's hard drive.|
|←||c:\temp\coppermine\||Use your FTP app to copy all content from the local temporary folder to the new target folder on the server.|
|n/a||-||Set permissions (using your FTP app) on the albums folder that needs to be writable.|
This scenario usually applies when switching from one webhost to the other. In fact you create a copy of your files (a complete file backup) and a copy of your database (complete database dump) on the old server and restore those copies on the new server.
You're encouraged to create and maintain frequent backups in case anything goes wrong, so you really should have a backup already. However, if you don't have one, you should create one now. You need to keep in mind that there might be a downtime of your site when moving from one webhost to the other. Ideally, the downtime will be neglible, but you usually won't be able to access the gallery on the old server and the gallery on the new server under the same URL at the same time. Therefore, you need to backup the old server while you still can, i.e. before your old webhosting contract expires and you no longer can access the old server to create the backup. If you don't have a backup and your webserver is no longer accessible you will be out of luck: nobody will be able to help you recover your gallery - it's absolutely mandatory to have a working backup both of your files as well as your database.
Refer to the corresponding ections on this page to figure out in detail how to create the backups.Below is a summary of the needed steps and some notes on the tricky stuff: