|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today! |
|
#1
|
|||
|
|||
|
MySQL Backup
Does anyone know of a application that runs on OS X that automatically backs up MySQL databases off of a schedule locally and on remote servers?
|
|
#3
|
|||
|
|||
|
is there a gui application? If not can you assist me in doing what was suggested?
|
|
#4
|
|||||
|
|||||
|
i don't know of any GUI to do it, but i could help with doing it
first make a shell script to do the backup, something like this will do (its just a text file make it with whatever your want, but not TextEdit as that likes to save as RTF, something like TextMate will do), this file can have pretty much any name and should be saved somewhere that you can leave it and not delete it you will need the terminal (/Applications/Utilities/Terminal) for a lot of this too bash Code:
then open the terminal and its time to test it out first chmod that file so it can be run, type this Note: /path/to/script is the full filename of the script you just created, you can type it into the terminal by just dragging it into there when you need to type it Note2: all commands in the terminal need to be run by hitting enter at the end Code:
chmod 755 /path/to/script now test it by typing in the filename and hitting enter, it should upload to the server, once you have confirmed that it works its time to make it run on a schedule first get a copy of your crontab, run this Code:
crontab -l > ~/Desktop/myCronTab.txt now edit the file on your desktop, add a line that look like this Code:
30 4 * * * /path/to/script (note the syntax for the file can be found here, my example it will run nightly at 4:30 AM) then save the file and add it to your crontab Code:
crontab ~/Desktop/myCronTab.txt and it should work, just make sure that you don't delete the script you made in the first place (the myCronTab.txt on your desktop can be deleted at the end) also i didn't test the script i wrote above, but i believe it should work, if you have any problems just post back here also with this method you username/password for mysql and your ftp server will show on the process list when the commands are running, if this is a shared server or people you don't trust have login rights to the computer you may want to edit the commands a bit which may require a bit more work (basically you need to save the passwords in config files or something and tell all programs that need it to read the file instead) Last edited by edman007 : March 26th, 2007 at 12:29 PM. |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > Mac Help > MySQL Backup |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|