|
Not logged in [Login - Register] |
You Are Not Registered Or Not Logged In |
Corsa Sport » Message Board » Off Day » Geek Day » How do I go about making a CRON job to do these 2 commands??? » Post Reply
|
PaulW |
posted on 12th Jan 06 at 19:05 |
lol basically gona backup the entire thing every sunday at 3am... script creates a .SQL.GZ backup of the database on the host, then all contents are backed up... | |
willay |
posted on 12th Jan 06 at 18:56 |
elite, though your plan for backups sounds pretty smacky, good luck! | |
PaulW |
posted on 12th Jan 06 at 18:54 |
cheers willay :thumbs: it really was a case of chmod +x the file! | |
PaulW |
posted on 12th Jan 06 at 18:50 |
i cant do any cron jobs on the server, as its not enabled on the hosting plan | |
willay |
posted on 12th Jan 06 at 18:45 |
btw - have you considered doing this on the server where the website is hosted? you could do a dirty script to call up tar and make the archive with the date in the filename, then use ftp/scp to transfer the file over to your backup location. | |
willay |
posted on 12th Jan 06 at 18:44 |
also do a whereis wget and get the full path name to wget, then put this into the script as crontab may not be using the same enviromentials as your shell. | |
willay |
posted on 12th Jan 06 at 18:43 |
try: code: then save it somewhere, chmod +x the file (executable) then add the cronentry as /path/to/script.sh (dont put sh at the start) | |
PaulW |
posted on 12th Jan 06 at 18:28 |
have added commands into /etc/cron_dome.sh | |
James_DT |
posted on 12th Jan 06 at 18:08 |
Write a script that executes those commands, and set the Cron to run the script? | |
PaulW |
posted on 12th Jan 06 at 17:50 |
also... would this overwrite all existing files with any newer ones & leave all unaltered files intact, or would it not overwrite any files?? as I would of assumed the -m command for wget litterally will 'mirror' the sites contents... | |
PaulW |
posted on 12th Jan 06 at 17:48 |
code: Basically... the wget is used to call a backup script which does a database backup, then second part does complete image of the poo folder from within the host... I'm using -nH so it doesnt create the folder ftp.blah.com, BUT its still making a poo folder... how can I make a cron job to do both these tasks as 1 job, in the order above (so FTP only starts AFTER wget has ran)??? cheers |