当前位置:网站首页>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
边栏推荐
猜你喜欢
链读推荐:从瓷砖到生成式 NFT
pytorch框架学习(4)torchvision模块&训练一个简单的自己的CNN (一)
链读好文:热加密存储与冷加密存储有什么区别?
pytorch框架学习(7) tensorboard使用
.las转.txt 再转.pcd,编译运行中出现的错误
Chain Reading Recommendation: From Tiles to Generative NFTs
Collection工具类
十年磨一剑!数字藏品行情软件,链读APP正式开放内测!
ORACLE system table space SYSTEM is full and cannot expand table space problem solving process
Count down the six weapons of the domestic interface collaboration platform!
随机推荐
shell脚本中利用sqlplus操作数据库
自适应空间特征融合( adaptively spatial feature fusion)一种基于数据驱动的金字塔特征融合策略
【格式转换】将JPEG图片批量处理为jpg格式
速刷正则表达式一周目(上)
集合 Map
文本元素
Content related to ZigBee network devices
impdp 导入数据
opencv
Chain Reading|The latest and most complete digital collection sales calendar-08.02
十年磨一剑!数字藏品行情软件,链读APP正式开放内测!
图纸怎么折?(A0,A1,A2,A3の图纸如何折成A4大小)
【论文笔记1】小样本分类
链读好文:热加密存储与冷加密存储有什么区别?
来亲自手搭一个ResNet18网络
pytorch框架学习(1)网络的简单构建
Four characteristics of ACID
每天一个小知识点
三维点云分割
2021-06-22