一、需求分析
服务器A的数据目录内容变化后,改变要实时更新到服务器B的相关目录。

二、解决方案
1、使用ftp实现文件同步
2、使用crontab 定时器来调用ftp

三、安装配置
1连接FTP服务器,到指定路径同步
服务器文件推送
2 Contab 详细用法 定时任务
Cron 各项的描述
以下是 crontab 文件的格式:
{minute} {hour} {day-of-month} {month} {day-of-week} {full-path-to-shell-script}
o minute: 区间为 0 – 59
o hour: 区间为0 – 23
o day-of-month: 区间为0 – 31
o month: 区间为1 – 12. 1 是1月. 12是12月.
o Day-of-week: 区间为0 – 7. 周日可以是0或7.

使用crontab -e * * * * * (代表上面的5个参数) /**/***/test.sh(执行ftp同步文件)

相关文章:

  • 2021-12-28
  • 2022-01-02
  • 2021-12-15
  • 2022-12-23
  • 2021-03-28
猜你喜欢
  • 2021-12-04
  • 2021-12-04
  • 2021-12-05
  • 2021-12-31
  • 2021-09-15
  • 2021-12-15
相关资源
相似解决方案