| DavidBloor |
|
NetHosted Customer
Joined: 02 Jan 2005 Posts: 70
|
Posted: 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 |
|
| NetHosted - Josh |
|
NetHosted Staff

Joined: 16 May 2004 Posts: 235
|
Posted: 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 |
|
| TheJuice |
|
NetHosted Customer
Joined: 29 Dec 2005 Posts: 10
|
Posted: 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 |
|
| NetHosted - Andrew |
|
NetHosted Staff

Joined: 22 Mar 2004 Posts: 5651
|
|
| Back to top |
|
| TheJuice |
|
NetHosted Customer
Joined: 29 Dec 2005 Posts: 10
|
Posted: Sat Dec 31, 2005 2:43 pm Post subject: |
| |
Thanks for that, I'll take a look. _________________ Visit Headphone News  |
|
| Back to top |
|
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
|
| |