Re: Cron Job
- From: ibuprofin@xxxxxxxxxxxxxxxxxxxxxx (Moe Trin)
- Date: Sun, 25 Jun 2006 16:51:22 -0500
On 25 Jun 2006, in the Usenet newsgroup comp.os.linux.misc, in article
<1151222477.353385.210200@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>, Pankaj wrote:
I've had a look at /bin/backup.. the contents of the file are
/usr/bin/rsync -aqxpor /home/httpd/vhosts/ / backup
Probably shouldn't be in /bin/ as it's not part of Red Hat or Fedora, but
it's not my system.
Is this of any help ?
Does that command do what you want?
In your original post, you wrote:
I am new to Linux and I have to setup a cron job which would take
backup from the server to a tape drive. The job should start whenever
the server is restared.
When you say "server", do you mean the application (probably Apache) or
the computer itself? If you mean the computer itself, put that command
at the end of /etc/rc.d/rc.local (or where-ever rc.local is hiding). If
you mean when the application, put the command at the end of that section
of the script that starts the application - there is likely a 'case'
statement, with the values 'start', 'stop', 'status', 'restart' and
perhaps 'reload'. One probable location would be just before the
double semi-colons that end the 'start' case.
In another post, you write:
what I have understood is that I need a cron job and not an init or
@reboot
The standard 'cron' (vixie-cron) runs jobs at a specific time/date.
There is also a 'anacron' package for systems that are not run 24 hours
a day, and runs jobs that are scheduled by day or day-of-week some set
amount of time after the computer boots. Init or @reboot run jobs when
the computer starts or reboots.
Now, how do I do this ?
If you want cron to run as it does on the other system (backup every
Sunday night at 02:00) then copy the script and cron entry. If you
want the job to run when the computer or application starts, then you
don't want a cron job and must put the backup command either in the
rc.local or application startup script.
Old guy
.
- References:
- Cron Job
- From: Pankaj
- Re: Cron Job
- From: s. keeling
- Re: Cron Job
- From: John-Paul Stewart
- Re: Cron Job
- From: Pankaj
- Re: Cron Job
- From: Moe Trin
- Re: Cron Job
- From: Pankaj
- Cron Job
- Prev by Date: Re: C Library Missing?
- Next by Date: Stats comp.os.linux.misc (last 7 days)
- Previous by thread: Re: Cron Job
- Next by thread: Re: Cron Job
- Index(es):
Relevant Pages
|