dbTalk Databases Forums  

doubt about backup

comp.databases.mysql comp.databases.mysql


Discuss doubt about backup in the comp.databases.mysql forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
remigio
 
Posts: n/a

Default doubt about backup - 06-24-2010 , 03:42 AM






Hi,
I've a doubt about the backup method to dump a mysql database.
I've tried to dump a database using "Sql export" on Phpmyadmin
interface and the resulting file size is 1.031 KB.
I've also tried a dump with:

mysqldump -u root -ppassword --databases dbname > destination

and the resulting file size is about 900 Kb.
My question is:
are there some lost data using mysqldump instead of export on
Phpmyadmin?
Are there some other options to include in mysqldump for a complete
dump?
Thank you so much.

--

Remigio

www.sacraspina.it
www.amicitosondoro.it
www.icmonteodorisio.it
www.giovanichietivasto.it
www.parrocchiacupello.it
www.cralnuovainiziativa.it
www.associazionehistonium.it

Reply With Quote
  #2  
Old   
Erick T. Barkhuis
 
Posts: n/a

Default Re: doubt about backup - 06-24-2010 , 03:53 AM






remigio:


Quote:
I've tried to dump a database using "Sql export" on Phpmyadmin
interface and the resulting file size is 1.031 KB.
I've also tried a dump with:

mysqldump -u root -ppassword --databases dbname > destination

and the resulting file size is about 900 Kb.
Please, compare the INSERT statements in both files. I assume, that
their styles are different (e.g. with or without field name list).
In phpMyAdmin, you can switch several styles on or off.


--
Erick

Reply With Quote
  #3  
Old   
remigio
 
Posts: n/a

Default Re: doubt about backup - 06-24-2010 , 04:32 AM



On 24 Giu, 09:53, "Erick T. Barkhuis" <erick.use-... (AT) ardane (DOT) c.o.m>
wrote:
Quote:
remigio:

I've tried to dump a database using "Sql export" on Phpmyadmin
interface and the resulting file size is 1.031 KB.
I've also tried a dump with:

mysqldump -u root -ppassword --databases dbname > destination

and the resulting file size is about 900 Kb.

Please, compare the INSERT statements in both files. I assume, that
their styles are different (e.g. with or without field name list).
In phpMyAdmin, you can switch several styles on or off.

--
Erick
It means that it's the same thing using one of the two methods?
Thanks.

Reply With Quote
  #4  
Old   
Erick T. Barkhuis
 
Posts: n/a

Default Re: doubt about backup - 06-24-2010 , 04:46 AM



remigio:

Quote:
On 24 Giu, 09:53, "Erick T. Barkhuis" <erick.use-... (AT) ardane (DOT) c.o.m
wrote:
remigio:

I've tried to dump a database using "Sql export" on Phpmyadmin
interface and the resulting file size is 1.031 KB.
I've also tried a dump with:

mysqldump -u root -ppassword --databases dbname > destination

and the resulting file size is about 900 Kb.

Please, compare the INSERT statements in both files. I assume, that
their styles are different (e.g. with or without field name list).
In phpMyAdmin, you can switch several styles on or off.


It means that it's the same thing using one of the two methods?
Both backups will contain all data. The generated INSERTs are
differently written.
So yes, you can use both files and, upon restore, the table contents
will be as backed up.

Technically, it's not "the same thing", but both methods will lead to
the same result.


--
Erick

Reply With Quote
  #5  
Old   
Brian Cryer
 
Posts: n/a

Default Re: doubt about backup - 06-24-2010 , 05:25 AM



"remigio" <linoreale (AT) gmail (DOT) com> wrote

Quote:
Hi,
I've a doubt about the backup method to dump a mysql database.
I've tried to dump a database using "Sql export" on Phpmyadmin
interface and the resulting file size is 1.031 KB.
I've also tried a dump with:

mysqldump -u root -ppassword --databases dbname > destination

and the resulting file size is about 900 Kb.
Your Phpmyadmin sql export dump, should that be 1.031MB rather than KB? (If
it were KB then 1.031KB vs 900KB would indicate a serious problem with the
sql export in phpmyadmin.)

Quote:
My question is:
are there some lost data using mysqldump instead of export on
Phpmyadmin?
Are there some other options to include in mysqldump for a complete
dump?
Thank you so much.
I don't use PHP so haven't used Phpmyadmin, but I fully trust mysqldump and
would expect the sql export from phpmyadmin to be as good.

Why not test it and restore both to different and new databases and you can
then run some sql to check that the data in both is the same. But (like
Erick has indicated) I think you'll just be chasing the fact that they both
structure the backup file slightly differently and that that is what
accounts for the difference in size.
--
Brian Cryer
http://www.cryer.co.uk/brian

Reply With Quote
  #6  
Old   
Erick T. Barkhuis
 
Posts: n/a

Default Re: doubt about backup - 06-24-2010 , 05:30 AM



Brian Cryer:

Quote:
"remigio" <linoreale (AT) gmail (DOT) com> wrote in message
news:864c780c-b062-492a-984d-3aa85ad2a95a (AT) e5g2000yqn (DOT) googlegroups.com.
..
... and the resulting file size is 1.031 KB.

Your Phpmyadmin sql export dump, should that be 1.031MB rather than
KB? (If it were KB then 1.031KB vs 900KB would indicate a serious
problem with the sql export in phpmyadmin.)
The dot is most likely not a decimal point. It's a thousands separator,
for which some still use a silly comma.
(But I'm pretty sure you were aware of this)


Quote:
Why not test it and restore both to different and new databases and
you can then run some sql to check that the data in both is the same.
Sounds like a good idea.

--
Erick

Reply With Quote
  #7  
Old   
Erick T. Barkhuis
 
Posts: n/a

Default Re: doubt about backup - 06-24-2010 , 05:34 AM



Brian Cryer:

Quote:
"remigio" <linoreale (AT) gmail (DOT) com> wrote in message
news:864c780c-b062-492a-984d-3aa85ad2a95a (AT) e5g2000yqn (DOT) googlegroups.com.
..
... and the resulting file size is 1.031 KB.

Your Phpmyadmin sql export dump, should that be 1.031MB rather than
KB? (If it were KB then 1.031KB vs 900KB would indicate a serious
problem with the sql export in phpmyadmin.)
The dot is most likely not a decimal point. It's a thousands separator,
for which some still use a silly comma.
(But I'm pretty sure you were aware of this)


Quote:
Why not test it and restore both to different and new databases and
you can then run some sql to check that the data in both is the same.
Sounds like a good idea.
Perhaps even better yet: also check the number of records and the size
statistics for each table after restore (using phpMyAdmin, which offers
such info at first glance). They should be the same in both versions.

--
Erick

Reply With Quote
  #8  
Old   
remigio
 
Posts: n/a

Default Re: doubt about backup - 06-24-2010 , 06:09 AM



On 24 Giu, 11:25, "Brian Cryer" <not.here@localhost> wrote:
Quote:
"remigio" <linore... (AT) gmail (DOT) com> wrote in message

news:864c780c-b062-492a-984d-3aa85ad2a95a (AT) e5g2000yqn (DOT) googlegroups.com...

Hi,
I've a doubt about the backup method to dump a mysql database.
I've tried to dump a database using "Sql export" on Phpmyadmin
interface and the resulting file size is 1.031 KB.
I've also tried a dump with:

mysqldump -u root -ppassword --databases dbname > destination

and the resulting file size is about 900 Kb.

Your Phpmyadmin sql export dump, should that be 1.031MB rather than KB? (If
it were KB then 1.031KB vs 900KB would indicate a serious problem with the
sql export in phpmyadmin.)

My question is:
are there some lost data using mysqldump instead of export on
Phpmyadmin?
Are there some other options to include in mysqldump for a complete
dump?
Thank you so much.

I don't use PHP so haven't used Phpmyadmin, but I fully trust mysqldump and
would expect the sql export from phpmyadmin to be as good.

Why not test it and restore both to different and new databases and you can
then run some sql to check that the data in both is the same. But (like
Erick has indicated) I think you'll just be chasing the fact that they both
structure the backup file slightly differently and that that is what
accounts for the difference in size.
--
Brian Cryerhttp://www.cryer.co.uk/brian
Thanks.

Reply With Quote
  #9  
Old   
remigio
 
Posts: n/a

Default Re: doubt about backup - 06-24-2010 , 06:10 AM



On 24 Giu, 10:46, "Erick T. Barkhuis" <erick.use-... (AT) ardane (DOT) c.o.m>
wrote:
Quote:
remigio:



On 24 Giu, 09:53, "Erick T. Barkhuis" <erick.use-... (AT) ardane (DOT) c.o.m
wrote:
remigio:

I've tried to dump a database using "Sql export" on Phpmyadmin
interface and the resulting file size is 1.031 KB.
I've also tried a dump with:

mysqldump -u root -ppassword --databases dbname > destination

and the resulting file size is about 900 Kb.

Please, compare the INSERT statements in both files. I assume, that
their styles are different (e.g. with or without field name list).
In phpMyAdmin, you can switch several styles on or off.

It means that it's the same thing using one of the two methods?

Both backups will contain all data. The generated INSERTs are
differently written.
So yes, you can use both files and, upon restore, the table contents
will be as backed up.

Technically, it's not "the same thing", but both methods will lead to
the same result.

--
Erick
Thank you.

Reply With Quote
  #10  
Old   
Brian Cryer
 
Posts: n/a

Default Re: doubt about backup - 06-24-2010 , 07:20 AM



"Erick T. Barkhuis" <erick.use-net (AT) ardane (DOT) c.o.m> wrote

Quote:
Brian Cryer:

"remigio" <linoreale (AT) gmail (DOT) com> wrote in message
news:864c780c-b062-492a-984d-3aa85ad2a95a (AT) e5g2000yqn (DOT) googlegroups.com.
..
... and the resulting file size is 1.031 KB.

Your Phpmyadmin sql export dump, should that be 1.031MB rather than
KB? (If it were KB then 1.031KB vs 900KB would indicate a serious
problem with the sql export in phpmyadmin.)

The dot is most likely not a decimal point. It's a thousands separator,
for which some still use a silly comma.
(But I'm pretty sure you were aware of this)
I wasn't aware or I wouldn't have posted - but in retrospect you are right,
it seems logical that it is being used as a thousands separator here (and I
should have guessed it). I disagree about the comma being silly - to use a
dot as a thousands separator is ambiguous as it means you end up guessing
whether its a decimal point or not ... but I don't want to start an
off-topic debateon this and its probably a discussion for alt.english.usage
rather than comp.databases.mysql and may depend simply on your locale.
--
Brian Cryer
http://www.cryer.co.uk/brian

Reply With Quote
Reply




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.