Questions about restoring my photo gallery Questions about restoring my photo gallery
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Questions about restoring my photo gallery

Started by ECEGatorTuro, May 26, 2006, 04:04:33 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ECEGatorTuro

I have a few questions about restoring my photo gallery. Quick background: my site was hacked and my host locked my account and would not unlock it until I allowed them to delete all my site files. Fortunately, I coerced one of the tech reps into letting me log in to my FTP account and backup my entire site. So presently, no coppermine files exist in my site but the entire database remains intact.

So the question is, can I just copy over all of the backed up files back to my site and coppermine will run with no problems or is there a reason I would have to re-install coppermine from scratch? I'm just afraid of installing it again because I don't want it to clear out my database. I have way too many photos entries and captions in there that I want to keep.

Paver

Follow the upgrade steps in the documentation (for upgrade from 1.4.0 on up).

If you or your webhost is concerned that some of the Coppermine files may be hacked or there might be some extra files in there, it's easy to do a "fresh" upgrade by following the upgrade steps in the docs.  You basically download 1.4.6 and unzip it into a new folder.  Then copy config.inc.php and anycontent.php and your albums folder and your plugins folder into this "fresh" install.  Delete install.php and run update.php.  I've done this a few times during upgrades - create a new folder & upgrade instead of copying over the old folder.

The only problem with doing a fresh upgrade is if you have any mods/hacks applied.  You'll need to re-apply them afterwards.  Plugins are much easier since you merely copy the plugins into the plugins folder.

By the way, making regular backups of your files & database is strongly recommended.  It sounds like you know how to cover your files.  Make sure you backup your database as well using a tool like phpMyAdmin or mysqlDumper.

Oh, to answer your first question directly: Yes, you should be able to copy the files back and run them fine, provided they haven't been adversely affected by the hacking.  But I would recommend the upgrade to the current version, especially if you haven't been running the latest version (1.4.6).

Oh, and you could backup your database before doing anything, just to be sure.

ECEGatorTuro

Awesome! Thanks for the detailed response... :)

Another quick question then since I'm not an expert in SQL/phpMyAdmin: How am I supposed to backup the database? I went to the export tab in phpMyAdmin and I was quite confused with all of the options. ???

Would you be able to tell me exactly what I should have checked/selected on that screen? Also, if I needed to restore it, I'm assuming I just import whatever file it generates right?

Forgive my ignorance, web programming was never my strong point. ;)

Paver

Yeah, there are a number of options.  The default ones are usually OK, although I also check the following:

  • Add DROP TABLE
  • Add IF NOT EXISTS
  • Complete Inserts
  • Extended Inserts

Make sure you chose Export from the database and you select all your Coppermine tables.  (If you select Export from one table, it will only export that one table.)

Also make sure that Structure and Data are checked.

I usually save it to a file using the checkbox.

You want to generate an SQL file or output.  This will be a series of SQL commands that will re-create your database should you need to.  To do so, you go to the SQL tab in phpMyAdmin and insert from the file or paste the SQL commands in (the former is easier with a large set of commands).

Joachim Müller

you might want to take a look at mySqlDumper for easier database backups. In the future, please respect the "one issue per thread" policy.

ECEGatorTuro

Ok excellent... I backed up my DB and now I'm going to try the "clean" install you mentioned above. Thanks for all of your help!