coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: LeighJW on June 06, 2008, 12:38:09 PM

Title: How can I restore accidentally deleted users
Post by: LeighJW on June 06, 2008, 12:38:09 PM
OK, I'm a plonker. In an effort to delete one user I managed to delete all of them.

To try to receover the users I did a home directory restore from my last back up (from 3 days go) but none of the users re-apppeared and nor did their photos. Is there a way to rectify?

(As an aside I was amazed to find there is no 'double check' or 'are you sure' message when deleting users!!)
Title: Re: How can I restore accidentally deleted users
Post by: Joachim Müller on June 06, 2008, 12:46:39 PM
The users are not kept in a file, but in the database. Therefor, restoring the files won't help. You'll need to restore a backup (dump) of your database if you have one.
Title: Re: How can I restore accidentally deleted users
Post by: LeighJW on June 06, 2008, 12:53:27 PM
I have two databases which I restored AFTER I did the home directory restore. One is called COPP1 and the other is named after the site. Once I restored them, the users were still not there. Did I just get the sequence wrong?
Title: Re: How can I restore accidentally deleted users
Post by: LeighJW on June 06, 2008, 01:25:44 PM
I still do not know how to restore my users. HELP!!!!
Title: Re: How can I restore accidentally deleted users
Post by: steveeh131047 on June 06, 2008, 02:16:43 PM
If you took your database backups AFTER you deleted the Users, they can't help you.

Is there any chance your web hosting company does a regular automatic database backup ? If so they might have an earlier copy which contains the User info.
Title: Re: How can I restore accidentally deleted users
Post by: LeighJW on June 06, 2008, 02:42:17 PM
My dabtabase back ups are from BEFORE I deleted the users. I have restored them this morning but the users are still not there (but I restored them AFTER i did the home Director restore - is this wrong?).

I am a complete novice....  how do I restore this? What order of events?

I have directory back ups from 3rd June and database back ups from May.

I deleted the users today....

Thanks for your help so far.
Title: Re: How can I restore accidentally deleted users
Post by: dwo on June 07, 2008, 02:31:44 PM
Recently I was very angry about the organisation of editusers.php.

Especially the button before "With selected:", bottom left is very bad.
You just accidently switch this on, even if you dont want to, because you feel the need to activate the last line.

I would suggest to put this button at the bottom out.


reagrds, Dietmar
Title: Re: How can I restore accidentally deleted users
Post by: Craig Walsh on June 11, 2008, 11:07:56 PM
I have just had the same problem.  I wanted to delete a couple of inactive users, and to my amazement I deleted everyone but myself.  This meant that images uploaded by others were also deleted.  Our image count went down, and the number of image views went down.

I am running the latest version of Coppermine 1.4.18.  We have a dedicated, managed server with an automatic "down to the metal" backup every evening.

Our server support folks have restored a database backup from six or seven hours before my accidental deletion.  But this hasn't made a difference.  The deleted users are still not there, nor are the images that they uploaded to the site.

Other than restoring the database, is there another step that we need to do to complete the restoration process? 

I've done a complete trawl through this forum, and couldn't find any clear-cut answer to this question.  Might just be me, so my apologies if there's a guide somewhere and I've inadvertently overlooked it.

LeighJW does not seem to have resolved this problem --- or, if resolved, the answer has not been posted here for the benefit of others (like myself).

We have a timing problem, because we know that anything posted to the gallery since the "good" backup will be lost when we finally figure out how to fully restore this backup and get the deleted users back.

I agree with dwo:  there should be some sort of "Are you sure?" button to prevent this type of problem.

Thanks for your help.  Much appreciated.



Title: Re: How can I restore accidentally deleted users
Post by: Nibbler on June 11, 2008, 11:23:34 PM
People ignore the 'are you sure' prompt anyway. They just click 'OK' as a reflex action whenever anything pops up.

Restoring the db should restore the users and restoring the album directory should bring back the pictures. If your host can't see what the problem is then feel free to PM me access details.
Title: Re: How can I restore accidentally deleted users
Post by: Craig Walsh on June 12, 2008, 04:52:07 PM
With Nibbler's kind assistance, this problem is now solved.

I don't know what our server people did --- looks like they originally did not restore from the right back-up, or the restore process didn't "stick."

I asked the server people to give the restore another go, and it worked just fine.  The accidentally deleted users --- and the images uploaded by the accidentally deleted users --- are now back up on the www.guernseycattle.com/copper (http://www.guernseycattle.com/copper) gallery.

Phew!  (Or should I say Moooo?)

Thanks again,

Craig