CP and SCP are two commands commonly used for file copying in Ubuntu. Generally, we use the CP command on the same server, and we have used the SCP command across services. However, Rsync is better than the above two commands for file synchronization, both across servers and not across servers. Because Rsync can only synchronize the files that need to be updated, instead of copying all the files in the specified path and then overwriting the source files in the target path. For example, the local /mnt/tem folder should be connected to the remote xx. xx. The /mnt/tem path of 123 can be synchronized using the following: rsync -avu --progress /www/wwwroot/cdn.gouuuu.com [email protected]:/www/wwwroot/cdn.mateing.xyz -V detailed output -A archiving mode means that files are transferred recursively and all file attributes are maintained. If the file attributes change, it is considered to be a different file -U option ignore duplicate data Current host option displays the transfer details process transfer file or folder path target host user name @ target host IP address planned transfer file storage path test-rsync-command 中文版 Linux 服务器文件同步命令 rsync: cp和scp是ubuntu中文件拷贝常用的两个命令,一般在同一台服务器上我们是用cp命令,跨服务时使用过scp命令,但是如果做文件同步的话,rsync要比上述两个命令更好用一些,跨不跨服务器都是如此。因为rsync可以只同步需要更新的文件,而不是将所有的指定路径内的文件都拷贝一份,然后再目标路径下去覆盖源文件,比如本地的/mnt/tem文件夹要和远程xx.xx.xx.123的/mnt/tem路径做同步,可以使用: rsync -avu --progress /www/wwwroot/cdn.gouuuu.com [email protected]:/www/wwwroot/cdn.mateing.xyz -v 详细输出 -a 归档模式,表示以递归方式传输文件,并保持所有文件属性,如果文件属性变了,认为是不同文件 -u 选项忽略重复的数据 当前主机 选项 显示传输细节进程 传输的文件或文件夹路径 目标主机用户名@目标主机IP地址计划传输的文件存储路径
Tag: Linux server file synchronization
1 Posts
Tags
404-article 1adblock plus 1adobe premier 0Adult content 1Anna 1attack 1autocratic 1Bae Joo-hyun 1Bae Sue Ji 1Bandwidth 1banned 1Bboom Bboom 1Blueming 1BTC 1buyvn 1Chaeyoung 1China 14chrome 2cloudflare 2cov-19 1cov-2019 1covid-19 5dahyun 2daily 2decode 1deformed real estate market 0democracy 1DINNER FOR FEW 1download 1epidemic 2exam 0Explicit 1extensions 1external disk 1family 1Federal Reserve 1fog 0free 1Full Concert | Atlanta 2023 (2nd Row POV) 1futrue 1Future 1GFW 1Girls' Generation 1gloden-hour-iu 1golden hour concert 1h265 1helpless 1hevc 1history 1hongkong 1hongkong doll 1ipfs 1ipv6 1Irene 2Isul Live Festival 1IU 5ive 1Jeongyeon 1jihoo 0Jihyo 1k-pop 12Kim DaHyun 1Korean drama 2lbc 0Lee Ji Eun 6Lee JiEun 4life 1life-in-university 0Lin Yoona 2linux 1Linux server file synchronization 1lockdown 1love dive 1malaysia 1mina 3MJJ 1Momo 1momoland 1mount 1movie 1Nayeon 1nmap 1nucleic acid test 1nucleic acid testing 1original soundtrack 1pron 1protected 0Ready To Be 1Red Velvet 4reduce balance sheet 1rsync 1sad 1sana 1satirical 1sexy 1shanghai 1shenzhen 1social 1source files 1steam 1strawberry moon 0talk 1talk that talk 0The 20th National Congress of the Communist Party of China 1Trauma 1trojan 1twice 3twice.jype.com 1Tzuyu 1ubuntu 1university 0US 1video 0video clips 1video-acceleration 1vps 2VPS Downtime 1vultr 1wallpaper 1Wallpaper Engine 1web3.0 1Windows7 0Workshop. 1yoona 1zero-covid policy 1Zibo Barbecue 1上海 1中国共产党第二十次全国代表大会 1二十大 1剪映 0区块链视频平台 0医学生 1医生 0困境 1徐志焄 1李知恩 1李诗宇 1梅斯医学 1没用的谎言 1疫情 1秦妇吟 1简体中文 1转载 1金所泫 1韦庄 1韩剧 1黄旼炫 1배주현 1이슬 라이브 페스티벌 1트와이스 1