当前位置:网站首页>Copy large files with crontab
Copy large files with crontab
2022-08-10 05:48:00 【development old man】
Scenario
Some large files will fail to be transferred due to the long time when using the scp command in SHELL to transfer the client computer that opens the SHELL window.night time), delete the timing plan in the crontab after the copy is completed;
Format of crontab:
- Points (0-59)
- hours (0-23)
- Date (1-31)
- Month (1-12)
- Day of the week (0-6, 0 is Sunday)
- Specific commands
crontab query command:
crontab -l
crontab editing command:
crontab -e
1 19 1 8 1 /usr/bin/scp /data/file1.tar.gz [email protected]_server_ip:/home/data-bak/1 20 1 8 1 /usr/bin/scp /data/file2.tar.gz [email protected]_server_ip:/home/data-bak/
Set password-free login
You also need to configure password-free login to automatically execute the copy command
Run on the server where crontab is set up:
ssh-keygen -t rsa -P '' -f ~/.ssh/id_rsa
ssh-copy-id [email protected]_server_ip
边栏推荐
猜你喜欢
随机推荐
opencv
行盒子的盒模型
Privatisation build personal network backup NextCloud
kaggle小白必看:小白常见的2个错误解决方案
小记录:Pytorch做深度学习必要加载的包
impdp 导入数据
链读精选:星巴克着眼于数字收藏品并更好地吸引客户
链读好文:热加密存储与冷加密存储有什么区别?
第十天作业
训练集Loss收敛,但是测试集Loss震荡的厉害?
ZigBee 网络设备相关内容
Canal reports Could not find first log file name in binary log index file
你不知道的常规流
Module build failed TypeError this.getOptions is not a function报错解决方案
PCL点云滤波
深度学习中的学习率调整策略(1)
清览题库--C语言程序设计第五版编程题解析(1)
利用PyQt5制作YOLOv5的GUI界面
深度学习模型训练前的必做工作:总览模型信息
文章复现:超分辨率网络FSRCNN