Private Label and Cobranded VoIP Solutions
BrainCast internet & phone based message/memo recording & reminder organization system
Internet Phone Service and Broadband Phone Service by ViaTalk

Go Back   VoIP Forums, Internet Phone Service Forums, & Web Hosting Forums > CoderForums - Programming Discussion > General Programming Issues > Programming Languages & Technologies > PHP

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 01-24-2002, 12:45 AM
Kore Kore is offline
Registered User
 
Join Date: Jan 2002
Posts: 3
NEED the database records back!

I've just made a 'huge-little' mistake. A php page I was creating kept giving parsing errors, so I would change something, save, upload, test, over and over. Well I got rid of the parsing errors and the page loaded up. An entry-modifying page. I type in a bit of stuff to modify an entry, hit Submit, and ALL OF THE RECORDS IN THAT TABLE were overwritten with what I had just entered! That was my reports table which held many lengthy news articles - GONE in the blink of an eye. =[ Turns out it slipped my mind to add "WHERE id='$id'" at the end of my UPDATE statement, therefore all the records were overwritten with the same thing.

I've been looking around the forum and found some posts saying that HostRocket does NOT backup database content! I never even thought to back it up myself because my previous 6-dollar host backs up the content every single day for you. Can HostRocket restore a backup of my table or database? I really hope so, else I think I'll just give up on this news site. 5 months of articles were stored in that table.

Thanks for any help with this, and sorry for the stupid mistake.
Reply With Quote
  #2  
Old 01-24-2002, 01:19 AM
Kore Kore is offline
Registered User
 
Join Date: Jan 2002
Posts: 3
Mad WHEW!!! (this time around...)

I ran a search on my computer for files containing a certain phrase I knew was in one of the records, and LO AND BEHOLD after a long search - thank God for sql(1).tmp!

Good thing I never rebooted, but I would still like to know if HostRocket does backups of database content on our behalf. If not, I would strongly suggest that they notify new account holders of that fact - I took it for granted that they do.
Reply With Quote
  #3  
Old 01-24-2002, 08:13 AM
tbj tbj is offline
leaving
 
Join Date: Jun 2001
Posts: 100
Use a crontab job to dump it into your account space and it will be included in your daily backup.

Just last week I had a table containing log-in information that became corrupted. I deleted the table and recreated & reloaded it from the back up (total of about 15 seconds). It took longer to figure out what the problem was than it did to fix it.
Reply With Quote
  #4  
Old 01-24-2002, 09:21 PM
JoeF JoeF is offline
QL User
 
Join Date: Jan 2002
Posts: 71
mysqldump -u yourdb_user -p your_dbname --add-locks --add-drop-table > ~/database.backup
__________________
--
Joe F
Reply With Quote
  #5  
Old 02-03-2002, 03:38 AM
Kore Kore is offline
Registered User
 
Join Date: Jan 2002
Posts: 3
Thanks

I'll try that, thanks guys!
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump