Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Nightly backups to my local machine

Status
Not open for further replies.

DrumAt5280

Technical User
Sep 8, 2003
194
US
I have a MySQL database on one of my sites with shared hosting company which has nightly DB backups. However I would like to have a nightly copy for myself on my local machine.

Is there a way to automatically expoxt the entire MySQL database and FTP it to my local machine nightly?

Do i just need an FTP program that provides scheduling or are there other ways?
 
are you running linux?

If so write a shell script that executes a backup of the databases, tar.gz it and sends it to your machine.

Cheers

QatQat

Life is what happens when you are making other plans.
 
QatQat,

My site is hosted on a Windows 2003 server. I am not sure what the MySQL database is on - probably on the same.

I thought there might be a program that would do this since this might be a common request.

Thanks.
 
mysqldump is the command to dump the DB, then you can ftp the resulting file to your server.

 
Cool.

Does anyone know of a FTP program that does automatic scheduling?
 
No, but the OS does. Windows -> "Scheduled Tasks", Unix -> cron.

Windows supports a command file for ftp. Putting the commands in ftp.txt, you'd run "ftp -s:ftp.txt hostname" to automate the session.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top