DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2009-08-08 21:08:39

bjoernB
New member
Registered: 2009-08-08
Posts: 3

restoring cronjobs

hi,

i tried backup from one disk to another via rsync script, but then i decided to do via download schedule from the web interface.
i wanted to delete the cronjob for rsync-script, before i removed editcron.sh

but unfortunately i used command crontab -r and now also the two cronjobs that was there before are deleted.
anyone know how to restore them ?

thx

Offline

 

#2 2009-08-08 23:03:51

bdmclacken
New member
Registered: 2008-05-28
Posts: 2

Re: restoring cronjobs

Try running
$ crontab /var/spool/cron/crontabs/root

Then
$ crontab -l
to see if this restored your original crontab

Offline

 

#3 2009-08-08 23:05:53

mig
Member
From: Seattle, WA
Registered: 2006-12-21
Posts: 532

Re: restoring cronjobs

Since the crontab file is saved in RAM, it needs to be recreated at each startup. 
You should be able to re-boot your DNS-323 and the default crontab will be restored.


DNS-323 • 2x Seagate Barracuda ES 7200.10 ST3250620NS 250GB SATAII (3.0Gb/s) 7200RPM 16MB • RAID1 • FW1.03 • ext2 
Fonz's v0.3 fun_plug http://www.inreto.de/dns323/fun-plug

Offline

 

#4 2009-08-08 23:06:22

bjoernB
New member
Registered: 2009-08-08
Posts: 3

Re: restoring cronjobs

hm, this doesn't work:
/ # crontab /var/spool/cron/crontabs/root
crontab: can't open '/var/spool/cron/crontabs/root': No such file or directory
crontab: user root cannot read /var/spool/cron/crontabs/root
/ #


ok, next one i try is restart (sounds too easy although, eh?)
:-)

Last edited by bjoernB (2009-08-08 23:07:14)

Offline

 

#5 2009-08-08 23:07:34

mig
Member
From: Seattle, WA
Registered: 2006-12-21
Posts: 532

Re: restoring cronjobs

which version of firmware are you running?


DNS-323 • 2x Seagate Barracuda ES 7200.10 ST3250620NS 250GB SATAII (3.0Gb/s) 7200RPM 16MB • RAID1 • FW1.03 • ext2 
Fonz's v0.3 fun_plug http://www.inreto.de/dns323/fun-plug

Offline

 

#6 2009-08-08 23:11:42

bjoernB
New member
Registered: 2009-08-08
Posts: 3

Re: restoring cronjobs

mig wrote:

Since the crontab file is saved in RAM, it needs to be recreated at each startup. 
You should be able to re-boot your DNS-323 and the default crontab will be restored.

thx, that did work

Current Firmware Version :     1.07
Firmware Date :     03/27/2009

Last edited by bjoernB (2009-08-08 23:12:24)

Offline

 

#7 2009-08-08 23:19:28

mig
Member
From: Seattle, WA
Registered: 2006-12-21
Posts: 532

Re: restoring cronjobs

Your welcome smile

I was trying to find where in the startup scripts the original crontab was setup,
but I could not find that.  I'm not sure exactly what script sets the crontab.
I was looking at FW v1.08.

Last edited by mig (2009-08-08 23:19:57)


DNS-323 • 2x Seagate Barracuda ES 7200.10 ST3250620NS 250GB SATAII (3.0Gb/s) 7200RPM 16MB • RAID1 • FW1.03 • ext2 
Fonz's v0.3 fun_plug http://www.inreto.de/dns323/fun-plug

Offline

 

#8 2009-09-30 00:08:09

ssss25
Member
Registered: 2009-09-26
Posts: 5

Re: restoring cronjobs

Hi,

I am trying to save entries into crontab but have them there parmenanrly, is that possible?

Is there a file that I can edit to add my entries? I usually do crontab -e to edit.

Thanks

Offline

 

#9 2009-09-30 00:16:31

mig
Member
From: Seattle, WA
Registered: 2006-12-21
Posts: 532

Re: restoring cronjobs

Take a look at this thread on how to edit the crontab at startup:  http://dns323.kood.org/forum/viewtopic. … 7199#p7199


DNS-323 • 2x Seagate Barracuda ES 7200.10 ST3250620NS 250GB SATAII (3.0Gb/s) 7200RPM 16MB • RAID1 • FW1.03 • ext2 
Fonz's v0.3 fun_plug http://www.inreto.de/dns323/fun-plug

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB