Previous Thread
Next Thread
Print Thread
Rate Thread
#222975 08/25/2002 8:44 PM
Joined: Feb 2001
Posts: 104
Journeyman
Journeyman
Offline
Joined: Feb 2001
Posts: 104
Quick question for you sql guru's

I did a mysqldump <filename.sql and for whatever reason only got about 90% of the messages put back. Course we didn't really notice it for a week or so.


The question is if I try to run mysqldump <filename.sql again, will it wipe out or cross circuit everything or just fill in the blanks..???


Sponsored Links
DRYCARPET1 #222976 08/25/2002 9:39 PM
Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
It will overwrite the old file with a new file that should be a complete dump of database, if nothing goes wrong.

c0bra #222977 08/25/2002 10:01 PM
Joined: Feb 2001
Posts: 104
Journeyman
Journeyman
Offline
Joined: Feb 2001
Posts: 104
I was kind of hopeing that I could import the old data on top of the live database, figuring that the message numbers and what not would fill in the blanks....

By your reply though I'm gonna guess that it would just overwrite everthing back to what and where we were two weeks ago.??


DRYCARPET1 #222978 08/25/2002 10:19 PM
Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
Ah, you mean that you imported a dumped file into the database and not all rows were added? This is done with the command "mysql", which is why I was confused.

You could probably use the following command to import the file again:
code:

mysql -f database < backup-file.sql



The flag -f tells the mysql command to continue on errors, which means it should import the missing rows. You would get errors for each row that already is in the database though, but that shouldn't matter.

I haven't tried this though, so you are doing at your own risk. Make a new backup of your database first before you try anything.

c0bra #222979 08/25/2002 11:19 PM
Joined: Feb 2001
Posts: 104
Journeyman
Journeyman
Offline
Joined: Feb 2001
Posts: 104
Well it's worth a shot..... Thanks!


Sponsored Links
c0bra #222980 08/26/2002 12:01 AM
Joined: Feb 2001
Posts: 104
Journeyman
Journeyman
Offline
Joined: Feb 2001
Posts: 104
Nope. Well that was worth a try, but nope...

All it did was pull in the old database wiping out any changes that had been made in the last couple of weeks.

For whatever reason the old dump just didn't keep all of the messages, we ended up with the indexes and post counts saying we'd had a good recovery, but they were in error and until recently we didn't double check posts 6 months old or older so we didn't catch the problem.

Oh well, we tried. The site in question isn't a real mover and shaker so no major harm done.

Good thing I made that backup as you suggested though! heh heh


DRYCARPET1 #222981 08/26/2002 12:33 AM
Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
Are there any DROP TABLES commands in the dump file? Some dumps may have this and it would remove anything that is already in the database. If this is the case, you can just remove those lines and the CREATE TABLE bits as well.

c0bra #222982 08/26/2002 11:03 AM
Joined: Jun 2001
Posts: 729
Coder
Coder
Offline
Joined: Jun 2001
Posts: 729
Here is the dump command I use and never had a problem re-importing the data.

mysqldump -qce -r 08252002.sql -u root ubb


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
hatter
hatter
USA
Posts: 69
Joined: January 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20240506)