我最近做了一个从专用的centos服务器到另一个专用的centos服务器的迁移。 我的旧服务器上运行的备份cron作业很less。 我想将它们复制到新的服务器。 任何人都可以指导我。 使用bash是可取的。
Centos使用cronie,并从以下位置读取文件/ crontabs:
/etc/cron.d/ # Put any readable file here. Syntax example in /etc/crontab /etc/cron.daily/ # Any root executable files here. runs daily /etc/cron.deny # newline separated list of users to deny crontab. /etc/cron.hourly/ # Same setup as daily /etc/cron.monthly/ # same setup as daily /etc/crontab # Shell variables that all cron jobs source before running. /etc/cron.weekly/ # same setup as daily /var/spool/cron/* # most user defined cron jobs are put here.
您将不得不手动重新创buildcron作业。
/etc/cron.d或/etc/cron.daily等文件中,将脚本从那里复制到新服务器