Client Support Community Server Status Contact Us Client Login
Email Hosting Website Hosting Reseller Hosting VPS Hosting Dedicated Servers

    Join our Community      Check your private messages       Profile       Search       FAQ       Memberlist       Log in


Scheduled MySQL backups

 
Post new topic   Reply to topic    NetHosted Community Index -> FTP/SQL Support
DavidBloor Reply with quote
 NetHosted Customer

 

 Joined: 02 Jan 2005
 Posts: 70
 

PostPosted: Fri Jan 07, 2005 12:53 am    Post subject: Scheduled MySQL backups
 
Is there an easy way (via cron) to schedule backups of a MySQL database what I am looking for is the DB outputted to a folder and regular intervals but have each "backup run" as an individual file.

Hope that makes sense!
Back to top
View user's profile Send private message
NetHosted - Josh Reply with quote
 NetHosted Staff

 

 Joined: 16 May 2004
 Posts: 235
 

PostPosted: Fri Jan 07, 2005 1:18 am    Post subject:
 
Hi,

Go to cron, standard, put
Code:
mysqldump -u cpanel_user_name -d db -ppassword > output_directory_and_file_name.sql
(no space between -p and your database password) and choose the interval you want. cpanel_user_name is your control panel username, db is the database you want to backup, and output_directory_and_file_name.sql should be the place you want to store the file as well as the file's name.

Josh

_________________
| Josh
| Customer Service & Sales, NetHosted Ltd
| Resellers, take a look at overselling !
| Members, tell us what you think  of NetHosted!
Back to top
View user's profile Send private message
TheJuice Reply with quote
 NetHosted Customer

 

 Joined: 29 Dec 2005
 Posts: 10
 

PostPosted: Sat Dec 31, 2005 2:28 pm    Post subject:
 
Sorry to resurrect an old topic but it answers most of my question.

Should the output_directory_and_file_name.sql directory path be the complete server path or is there some relative path I should enter?

Also, will this overwrite the previous back up every time it is run?

_________________
Visit Headphone News 
Back to top
View user's profile Send private message Visit poster's website
NetHosted - Andrew Reply with quote
 NetHosted Staff

 

 Joined: 22 Mar 2004
 Posts: 5684
 

PostPosted: Sat Dec 31, 2005 2:34 pm    Post subject:
 
I'd recommend the tool mentioned by webstar in this thread: http://community.nethosted.co.uk/topic576.html 

Andrew

_________________
| Andrew Bassett
| Managing Director, NetHosted Ltd.
| Resellers, take a look at overselling !
| Members, tell us what you think  of NetHosted!
Back to top
View user's profile Send private message
TheJuice Reply with quote
 NetHosted Customer

 

 Joined: 29 Dec 2005
 Posts: 10
 

PostPosted: Sat Dec 31, 2005 2:43 pm    Post subject:
 
Thanks for that, I'll take a look.
_________________
Visit Headphone News 
Back to top
View user's profile Send private message Visit poster's website
Post new topic   Reply to topic    NetHosted Community Index -> FTP/SQL Support
Page 1 of 1

User Permissions
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum

 
Jump to: