Operating System - HP-UX
1753797 Members
7879 Online
108799 Solutions
New Discussion юеВ

Moving cron to another system

 
SOLVED
Go to solution
Chrisl_2
Frequent Advisor

Moving cron to another system

HPUX 11.23 PA-RISC

Hi all.
I am in the process of moving an old production system on to another new system. My question is regarding all the cronjobs. To move them to the new system, can I just tar /var/spool/cron/crontabs on the old and untar it on the new system? I know that I will have to go thru each users crontab file and hunt down the scripts that are called. Am I missing anything else for this procedure?

TIA
5 REPLIES 5
Pete Randall
Outstanding Contributor
Solution

Re: Moving cron to another system

That should do it. Make sure that each of those users is in cron.allow, too.


Pete

Pete
spex
Honored Contributor

Re: Moving cron to another system

Hi,

Make sure that appropriate users exist on the new system, and that you you restart the cron daemon ('/sbin/init.d/cron stop && /sbin/init.d/cron start') after you untar.

PCS
DCE
Honored Contributor

Re: Moving cron to another system


Yes that will work provided

all the same users (uids need to be the same as well)exist

users are in cron.allow

cron is stopped and restarted after the restore
James R. Ferguson
Acclaimed Contributor

Re: Moving cron to another system

Hi:

While you can copy the contents of '/var/spool/cron/crontabs' from one server to another, you must stop and (re)start the 'cron' daemon afterwards to enable 'cron' to process the directory's contents. Do:

# /sbin/init.d/cron stop
# /sbin/init.d/cron start

Regards!

...JRF...
Chrisl_2
Frequent Advisor

Re: Moving cron to another system

Thanks all!!!!