|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Mysql - Need Help with creating a Cron Job
Hello Guys.
I really need some help creating a cron job. I want to back up my mySQL database, which runs a phpBB Forum. I need the backup to run every 6 hours - but the host can make it run every 6 hours. I need it to backup to a directory called Backups (on the root) and i dont want it to overwrite the last backup - so if they could be called backup(date/Time), backup(date/Time) that would be great. Can anyone help me - i know basic MYSQL etc, but not too good with it, so I would really appreciate the help. Cheers |
|
#2
|
|||
|
|||
|
You need an sh script to do that, there are many variations, the below is one of them:
Code:
#!/bin/sh cd Backups CUR_DTIME = `date +%F+%T` mkdir $CUR_DTIME cd $CUR_DTIME mysqldump --options database > file.sql ____________________ HostingZoom.com Shared, Reseller, VPS, Dedicated, Windows Web Hosting |
|
#3
|
|||
|
|||
|
Quote:
Last edited by centrifuge : March 14th, 2009 at 09:31 AM. Reason: close "QUOTE" tag |
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Server Administration > Mysql - Need Help with creating a Cron Job |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|