IT Community - Software Programming, Web Development and Technical Support

mysql database dump tips and tricks

This is a discussion on mysql database dump tips and tricks within the Database Support forums, part of the Web Development category; Hi, To write additional information in the dump file such as program version, server version, and host. . This option "--...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Web Development > Database Support

Register FAQ Members List Calendar Mark Forums Read
  #21 (permalink)  
Old 11-12-2007, 05:04 AM
write2ashokkumar write2ashokkumar is offline
D-Web Programmer
 
Join Date: Mar 2007
Posts: 85
write2ashokkumar is on a distinguished road
Default Re: mysql database dump tips and tricks

Hi,

To write additional information in the dump file such as program version, server version, and host. . This option "--comments" is enabled by default. To suppress additional, use --skip-comments.


Quote:

mysqldump -u root --skip-comments test_db > /home/backup/dump_sample.sql
Regards,
S.Ashokkumar
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #22 (permalink)  
Old 11-24-2007, 01:51 AM
priyan priyan is offline
D-Web Sr.Programmer
 
Join Date: Mar 2007
Posts: 133
priyan is on a distinguished road
Default Re: mysql database dump tips and tricks

Hi,

what's the difference between mysqldump and mysqlhotcopy ?
__________________
Keep smiling...
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #23 (permalink)  
Old 11-28-2007, 01:37 AM
write2ashokkumar write2ashokkumar is offline
D-Web Programmer
 
Join Date: Mar 2007
Posts: 85
write2ashokkumar is on a distinguished road
Default Re: mysql database dump tips and tricks

mysqlhotcopy :
It is the fastest way to make a backup of the database or single tables, but it can be run only on the same machine where the database directories are located. mysqlhotcopy works only for backing up MyISAM and ARCHIVE tables. It runs on Unix and NetWare.

mysqldump :
A client that dumps a MySQL database into a file as SQL statements or as tab-separated text files. It takes backup of all database tables regardless of the storage engine. This utility can be executed in any platform.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #24 (permalink)  
Old 11-29-2007, 04:26 AM
priyan priyan is offline
D-Web Sr.Programmer
 
Join Date: Mar 2007
Posts: 133
priyan is on a distinguished road
Default Re: mysql database dump tips and tricks

Ashok, Do u any idea about raw backup ?
__________________
Keep smiling...
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #25 (permalink)  
Old 11-29-2007, 05:50 AM
write2ashokkumar write2ashokkumar is offline
D-Web Programmer
 
Join Date: Mar 2007
Posts: 85
write2ashokkumar is on a distinguished road
Default Re: mysql database dump tips and tricks

RAW Backup :

It's more efficient to use a raw backup technique rather than using dumps. A raw backup is a direct copy of MySQL's data files as they exist on disk. Because the records aren't converted from their native format to ASCII, raw backups are much faster and more efficient than dumps. For ISAM and MyISAM tables, this means copying the data, index, and table definition files. For BDB and InnoDB tables, it also involves preserving the transaction logs and the data.

The dump SQL file we get using mysqldump utility occupies more disk space than raw backup.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #26 (permalink)  
Old 11-29-2007, 06:05 AM
priyan priyan is offline
D-Web Sr.Programmer
 
Join Date: Mar 2007
Posts: 133
priyan is on a distinguished road
Default Re: mysql database dump tips and tricks

Thanks ashok... got some idea about raw backup and this can be achieved using mysqlhotcopy utility... is that rite ?
__________________
Keep smiling...
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #27 (permalink)  
Old 11-30-2007, 10:33 PM
write2ashokkumar write2ashokkumar is offline
D-Web Programmer
 
Join Date: Mar 2007
Posts: 85
write2ashokkumar is on a distinguished road
Default Re: mysql database dump tips and tricks

yes prakash, you are correct.. but mysqlhotcopy will take raw backup only for myisam and archive tables.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #28 (permalink)  
Old 12-06-2007, 07:42 AM
priyan priyan is offline
D-Web Sr.Programmer
 
Join Date: Mar 2007
Posts: 133
priyan is on a distinguished road
Default Re: mysql database dump tips and tricks

Is mysql provides Online backup solution ?
__________________
Keep smiling...
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #29 (permalink)  
Old 12-08-2007, 01:08 AM
write2ashokkumar write2ashokkumar is offline
D-Web Programmer
 
Join Date: Mar 2007
Posts: 85
write2ashokkumar is on a distinguished road
Default Re: mysql database dump tips and tricks

Online backup solution for mysql is being developed by MySQL, probably we may get this in MySQL 6.0 release ;-) But there is a commercial tool available for mysql online backup, that's called INNODB Hot Backup.

InnoDB Hot Backup is the ideal solution for online backups of InnoDB tables in MySQL—and for setting up replication.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #30 (permalink)  
Old 12-12-2007, 04:53 AM
priyan priyan is offline
D-Web Sr.Programmer
 
Join Date: Mar 2007
Posts: 133
priyan is on a distinguished road
Default Re: mysql database dump tips and tricks

Yes ashok, i have checked in MySQL website and got the while paper for online backup solution that is being developed for mysql database..
__________________
Keep smiling...
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #31 (permalink)  
Old 12-13-2007, 06:39 AM
Gopisoft Gopisoft is offline
D-Web Sr.Programmer
 
Join Date: Feb 2007
Posts: 117
Gopisoft is on a distinguished road
Default Re: mysql database dump tips and tricks

HI,

mysqlshow
- This command is used to Shows the structure of a mysql database (databases,tables and columns).

Code:
Syntax
shell> mysqlshow [OPTIONS] [database [table [column]]]
DESCRIPTION
-#|--debug=...
output debug log. Often this is 'd:t,filename`

-?|--help
display help and exit

-c|--character-sets-dir=...
Directory where character sets are

-C|--compress
Use compression in server/client protocol

-h|--host=...
connect to host

-i|--status
Shows a lot of extra information about each table

-k|--keys
show keys for table

-p|--password[=...]
password to use connecting to server

-P|--port=...
Using Port number to connecting it

-S|--socket=...
Connecting the Socket file

-u|--user=#
user for login

-V|--version
output version information and exit

Code:
Example
shell> mysqlshow -V
mysqlshow  Ver 9.5 Distrib 5.0.27, for unknown-linux-gnu (x86_64)
Thanks,
R.Gopi
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #32 (permalink)  
Old 12-14-2007, 11:54 PM
priyan priyan is offline
D-Web Sr.Programmer
 
Join Date: Mar 2007
Posts: 133
priyan is on a distinguished road
Default Re: mysql database dump tips and tricks

Short note on MySQL Cold Backup

The MySQL server is stopped, the underlying data and configuration files
are copied to another location, and the MySQL server is restarted.
__________________
Keep smiling...
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
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
Trackbacks are On
Pingbacks are On
Refbacks are On

LinkBacks (?)
LinkBack to this Thread: http://www.discussweb.com/database-support/3927-mysql-database-dump-tips-tricks.html
Posted By For Type Date
DiscussWeb IT Community - Technical Support and Technology Discussions This thread Refback 09-24-2007 12:55 AM

Similar Threads
Thread Thread Starter Forum Replies Last Post
Toad for MySQL Tips & Tricks Sabari Database Support 56 12-20-2007 01:46 AM
Upload Files to MySQL using PHP Tips & Tricks Sabari PHP Programming 3 12-18-2007 06:32 AM
Importing mysql dump file to my Local Server Murali Database Support 1 12-12-2007 07:10 AM
How to import MySQL Dump files? kingmaker Database Support 2 07-24-2007 04:47 AM
mysql dump JSureshkumar PHP Programming 3 03-14-2007 04:55 AM


All times are GMT -7. The time now is 12:07 AM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0