Site Links
Home
Features
Documentation
Pricing & Order
Members Area
Support Options
UBBDev.com
UBBWiki.com
Who's Online
3 registered (Ruben, Gizmo, Pilgrim), 25 Guests and 8 Spiders online.
Key: Admin, Global Mod, Mod
Featured Member
Registered: 10/29/06
Posts: 250
Top Posters (30 Days)
Ruben 47
Bert 26
Gizmo 18
Rob Provencher 10
Rimex 9
SD 6
sw55 5
Eugene 5
Matthias1976 4
Dunny 3
Latest Photos
Uhm...
Mayan End of World
Gas Station Disco Video Shoot
Test Pictures
Audrey Kate
Page 3 of 5 < 1 2 3 4 5 >
Topic Options
#168009 - 11/09/06 09:00 PM Re: "Generated in..." [Re: Ian]
Conrad Offline
addict
Registered: 08/04/04
Posts: 441
Just tried making the backup and it seems to have gone through successfully... at least at first glance.

(Q1) It took under half a minute to get this done (as opposed to half a day via the CP), is that normal for a dump that "weighs" about 500 megs?

Also, in the Threads CP under database tools I see the following summary for my board:

Totals 958672 (rows) 532.88 MB (data) 111.07 MB (indexes)

(Q2) But the total size of the dump is 483MB when checking out the file's properties using WinSCP. Is the backup truly complete?

(Q3) On a side note, am I doing the right thing by downloading the dump in binary? Or should this be done in ASCII? (I dragged the file onto my desktop using WinSCP and it started a binary transfer)
Top
Express Hosting
Express Hosting "We are the official hosting company of UBB.threads. Ask us about our free migration services to migrate your UBB.threads installation."
#168010 - 11/09/06 09:47 PM Re: "Generated in..." [Re: Conrad]
Gizmo Online   cat

Registered: 06/05/06
Posts: 15455
Loc: Portland, OR; USA
Yes its normal that a SQL Dump from the command line go incredibly fast, as it doens't get processed through apache or any php scripts.

the backup should be complete, not sure why the two would differ however... I've never had an SQL dump through command line not be complete.

Generally Binary mode is for graphics and the like; ASCII mode is generally for text.
_________________________
Forums: UGN Security & VNC Web Design & Development
UBB.Threads: UBB.Wiki, My UBBSkins, UBB.Sitemaps
Longtime Supporter, Beta Tester & Resident Post-A-Holic.
Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Top
#168040 - 11/10/06 11:35 AM Re: "Generated in..." [Re: Gizmo]
Conrad Offline
addict
Registered: 08/04/04
Posts: 441
Is the ASCII thing definite, or maybe I should do both just in case?

Still wondering about the size difference between the dump file and the data shown in the Admin CP...

Is there a way to dump all tables separately?
Top
#168045 - 11/10/06 12:56 PM Re: "Generated in..." [Re: Conrad]
David Dreezer Offline

Pooh-Bah
Registered: 07/21/06
Posts: 2199
Download it in ASCII.

A database dump is not going to the same size as the database.

the database is a file or files that the database creates, in it's own format, to store the data.

A data dump is most certainly not that.

open the dump and read it. the first few lines describe a table, the next lines are composed of insert statements.

the sql dump file instructs mysql on how to create the table and insert the data, it is not an actual data file that the data base can use. It is nothing more than a file that the database would use to reconstruct from, but not to operate from.

Also remember that indices take space. A dump has no indices. Another thing to think about..... when you delete something from the database the database doesn't shrink. It does not give up that space. If you delete the equivalent of 100 megs of data out of the database it still doesn't shrink. Think about it, if you delete something that's in the middle of the table why would you want mysql to rewrite everything behind it in the table in order to regain that space?

That's what optimize does. Even if you do optimize your database the sql dump will nto be the same size as the actual mysql data table. They are apples and oranges.

Can you dump a table individually? Yes, read the documentation on mysql.com for the syntax.
_________________________
This thread for sale. Click here!
Top
#168051 - 11/10/06 05:33 PM Re: "Generated in..." [Re: David Dreezer]
Conrad Offline
addict
Registered: 08/04/04
Posts: 441
Thanks man.

OK, since the db/dump size is not going to be identical then I will assume that the server is giving me a complete backup.

If I dump the DB as instructed earlier in this thread (into a single file) then that's all I need to restore my database should anything bad happen, right? It'll restore all those tables from that single file?

What's the case with indeces? If the dump doesn't contain them, then what happens if I restore a DB using a dump? I get everything but the indexes? Could that pose a problem? Does the Admin CP backup copy the indeces if you do a backup that way?
Top
#168052 - 11/10/06 05:40 PM Re: "Generated in..." [Re: Conrad]
Conrad Offline
addict
Registered: 08/04/04
Posts: 441
Oh, and I still can't believe that what used to take 10+ hours now takes under 30 seconds. It just seems that having command line access to the server makes an incredible difference. 10 hours or 30 secs... it's just unreal.
Top
#168055 - 11/10/06 06:02 PM Re: "Generated in..." [Re: Conrad]
Ian Offline
Registered: 06/05/06
Posts: 4349
Loc: Essex, UK
that's what my wife says as well
Top
#168060 - 11/10/06 06:16 PM Re: "Generated in..." [Re: Conrad]
Gizmo Online   cat

Registered: 06/05/06
Posts: 15455
Loc: Portland, OR; USA
Originally Posted By: Conrad
If I dump the DB as instructed earlier in this thread (into a single file) then that's all I need to restore my database should anything bad happen, right? It'll restore all those tables from that single file?


You are correct, you would use the following syntax to insert the tables into the database:
mysql -h localhost -uusername -ppassword database_name < dump_name.dump

And yes, I love using ssh to do all of my work on a server, it just saves time being able to edit files, create and upload dumps, etc.
_________________________
Forums: UGN Security & VNC Web Design & Development
UBB.Threads: UBB.Wiki, My UBBSkins, UBB.Sitemaps
Longtime Supporter, Beta Tester & Resident Post-A-Holic.
Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Top
#168064 - 11/10/06 07:34 PM Re: "Generated in..." [Re: Gizmo]
David Dreezer Offline

Pooh-Bah
Registered: 07/21/06
Posts: 2199
command line access makes many tasks a heck of a lot easier. It also makes it easier to make a fatal mistake. Do take care when you log in via command line.


The indices are created when the table is created, and populated as the data is inserted, just like when the database is functioning normally.
_________________________
This thread for sale. Click here!
Top
#168066 - 11/10/06 08:25 PM Re: "Generated in..." [Re: David Dreezer]
Gizmo Online   cat

Registered: 06/05/06
Posts: 15455
Loc: Portland, OR; USA
lol yeh, be careful with the "rm" command ("rm -rf" more speficially)...
_________________________
Forums: UGN Security & VNC Web Design & Development
UBB.Threads: UBB.Wiki, My UBBSkins, UBB.Sitemaps
Longtime Supporter, Beta Tester & Resident Post-A-Holic.
Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Top
Page 3 of 5 < 1 2 3 4 5 >



Moderator:  AllenAyres, Harold, Ian, Ron M 
Shout Box

Today's Birthdays
No Birthdays
Recent Topics
Time zone setup
by skicomau
05/22/13 12:16 AM
Express hosting.
by Ruben
05/16/13 03:54 PM
Level of detail in new user registration emails
by Mitch P.
05/15/13 10:20 PM
Approving users
by Bert
05/15/13 09:22 PM
Users randomly added to other group
by Bert
05/15/13 09:15 PM
Forum Stats
10969 Members
36 Forums
33959 Topics
183413 Posts

Max Online: 978 @ 06/24/07 10:19 PM
Random Image