Click to See Complete Forum and Search --> : How do I access "/etc/cron.daily"...confused about linux commands


SpockBert
02-24-2009, 01:35 PM
Hi

I'm trying to install some script that automatically backs up mysql Dbs. This is the one: http://www.debianhelp.co.uk/mysqlscript.htm

I've followed it and it seems straightforward, the bit I'm stuck on is when it starts talking about "/etc/cron.daily" and command lines.

I feel kind of silly but how do you use these command lines for a linux server?

It says "Now you can run it using the command line "./automysqlbackup.sh" "

er how? where do i put that command in?! I've tried FTPing my site from my Comman Prompt, FTP commands in CueFTP.

All this "usr/etc" stuff, how do you see it?

Does it make a difference that I'm using a shared Linux server, is that why I can't see this stuff?

Thanks for any help! :)

boemboem
02-24-2009, 02:36 PM
Try those commands in a tool called Putty

shawty
02-25-2009, 05:04 PM
Spockbert,

As boemboem points out you need an SSH shell connection to your server, and for this putty is highly recomended.

However, be aware that if this is a shared web host where youe are just renting space then there will be a very high chance that you do not have access to write to any other folder than your home folder.

You will ONLY be able to write to /etc (and for that matter, /bin, /opt and many others) if you have superuser (root) privliges on the server you are connected to.

This is not really a PHP question, as the script on the debian page is actually a bash shell script, however what the document means is that you will need to copy the script to the folder called etc from the root of the file system.

(I'm not going to explain the linux file system here as this is not the place.)

as for cron.daily, in the etc folder you will find a text file called 'cron.daily' if you load this file into a text editor such as vi or mcedit you can edit it and add new lines describing how to run and at what time to run certain commands, such as your shell script.

Cheers

Shawty