You are not logged in.

#1 2006-03-08 15:05:15

peque
Member
From: Denmark - Møn
Registered: 2005-06-26
Posts: 441

Crond - works - but not automatic

Hi !
I have build a network on a school. And the last thing i need to work, is the back-up of the important files on the mainserver.
I have 2machines (a fileserver and a backup server) And I want to automatic to make backup of the fileservers /home... It seems that everything is working well, when I do it manuel, but i wont do it automatic???  It is my mening to make a backup each day,week and month.
I have made and ekstra crond.daily(daily1 and 2) and when I call the rsync.sh manuelt - its working. So I can´t se what the problem should be - I made some SSH-authorized_keys so it aint a passwd problem..

Does anybody in here know what´s wrong - or am i missing something.
Here is the crontab -e:

02 00 * * 0,2,4,6 /usr/sbin/run-cron /etc/cron.daily1/rsync-backup.sh
02 00 * * 1,3,5 /usr/sbin/run-cron /etc/cron.daily2/rsync-backup.sh
22 00 * * 0 /usr/sbin/run-cron /etc/cron.weekly/rsync-backup.sh
42 00 1 * * /usr/sbin/run-cron /etc/cron.monthly/rsync-backup.sh

~
And the script it self:
#!/bin/bash

rsync -av --delete 192.168.0.10:/home /home/daily1
~
~
Could some one have an ide of what it could be - ???
I have verifyed the task by crontab -l

THX
P.


Just getting better .... All the time

Offline

#2 2006-03-15 09:02:10

FUBAR
Member
From: Belgium
Registered: 2004-12-08
Posts: 1,029
Website

Re: Crond - works - but not automatic

You don't need "/usr/sbin/run-cron" in your crontabs, just the frequency, the user who you want to run the command as and the command.

Check the output of "/usr/sbin/run-cron /etc/cron.daily1/rsync-backup.sh" to see what happens exactly.


A bus station is where a bus stops.
A train station is where a train stops.
On my desk I have a workstation.

Offline

Board footer

Powered by FluxBB