LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-27-2011, 01:27 AM   #1
ramecare
Member
 
Registered: Feb 2011
Posts: 179

Rep: Reputation: 0
mysqldump backup & restore with stored procedure & function


Dear all,

Iam taking mysql backup from the below command

mysqldump -u root -pecare2@ softwareinfo > test1.sql
while restoring mysql backup iam using the below command

mysql -u root -pecare2@ softwareinfo < test1.sql

while restoring the mysqldump backup i was not able to get the database stored procedure,triggers& functions,can any one help on the command how to take database backup with stored procedure,triggers & functions.

Thanks
 
Old 07-27-2011, 02:58 AM   #2
radoulov
Member
 
Registered: Apr 2007
Location: Milano, Italia/Варна, България
Distribution: Ubuntu, Open SUSE
Posts: 212

Rep: Reputation: 38
You need to add --routines and --triggers to the backup command.
 
1 members found this post helpful.
Old 07-27-2011, 03:07 AM   #3
roastinghosting
LQ Newbie
 
Registered: Jul 2011
Posts: 3

Rep: Reputation: Disabled
We used to use this mysqldump method for backups for a while but you might find using automysqlbackup.sh a better solution - it will dump your database and take care of daily,weekly,monthly rotations of the backups for you. We then grab these using backuppc.

---------- Post added 07-27-11 at 08:07 AM ----------

Sorry it's available here: http://sourceforge.net/projects/automysqlbackup/
 
1 members found this post helpful.
Old 07-27-2011, 07:06 AM   #4
ramecare
Member
 
Registered: Feb 2011
Posts: 179

Original Poster
Rep: Reputation: 0
Thank u very much as per radoulov advice i used the below command its working fine.
mysqldump -u root -pecare2@ --routines dumile_deskas_misdemo > /netdrive/dumile_deskas_misdemo.sql

Thanks,
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] How to restore mysqldump --all-databases backup ramecare Linux - Server 4 07-25-2011 03:58 AM
Backup & restore siawash Linux - Software 2 11-28-2010 04:05 PM
Backup & Restore RHEL 5 kelvin.ng Linux - Distributions 1 09-06-2010 02:07 PM
what is the procedure for copying files(in this case a fulldump & backup) onto dvd andy curran Linux - Newbie 3 02-04-2008 10:50 AM
Backup & Restore chaitu_iiit Linux - Software 2 10-30-2004 12:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration