当前位置: 首页 > news >正文

电商网站建设目的及网站的优势肥西网站推广公司

电商网站建设目的及网站的优势,肥西网站推广公司,自己开一个网站要多少钱,关于门户网站建设通报rsync是什么#xff1f; rsync 是一个远程同步工具 下载 你的集群每一台都需要下载#xff01;#xff08;也就是你需要同步的机器#xff09; yum install -y xsync如果其他不下载就是报错的这样#xff08;使用脚本的情况下#xff0c;注意这里是提示 rsync没有找到…rsync是什么 rsync 是一个远程同步工具 下载 你的集群每一台都需要下载也就是你需要同步的机器 yum install -y xsync如果其他不下载就是报错的这样使用脚本的情况下注意这里是提示 rsync没有找到不是xsync [rootmaster bin]# xsync /opt/test/master sending incremental file listsent 97 bytes received 17 bytes 76.00 bytes/sec total size is 10 speedup is 0.09slave1 bash: rsync: 未找到命令 rsync: connection unexpectedly closed (0 bytes received so far) [sender] rsync error: remote command not found (code 127) at io.c(226) [sender3.1.2]slave2 bash: rsync: 未找到命令 rsync: connection unexpectedly closed (0 bytes received so far) [sender] rsync error: remote command not found (code 127) at io.c(226) [sender3.1.2]优点与scp对比 优点rsync主要用于备份和镜像。具有速度快、避免复制相同内容和支持符号链接的优点。 与scp对比rsync 要比scp复制速度快因为 rsync 是复制有差异性的文件它会自己检查而scp 则是把所有的文件统一复制过去达到的是一个 统统覆盖的意义 纯命令 Chat- GPT-3.5 演示 rsync 是一个用于文件同步和备份的工具可以在本地或远程系统之间高效地进行文件的复制和同步。以下是 rsync 命令的基本用法示例以及一些常用选项 rsync [options] source destination 其中 source 表示源文件或目录的路径destination 表示目标文件或目录的路径。常用的选项包括 -a归档模式用于保持文件的属性、权限和时间等。 -v详细输出模式显示正在复制的文件和目录。 -r递归复制目录及其内容。 -z传输时压缩数据可以减少传输时间。 --delete删除目标中不存在于源的文件。 --exclude排除指定的文件或目录。 -e指定远程 shell 的路径通常用于远程传输。以下是一些示例 本地文件同步 rsync -av /path/to/source /path/to/destination本地目录同步 rsync -av /path/to/source/ /path/to/destination/从本地到远程服务器同步 rsync -av /path/to/source usernameremote_server:/path/to/destination从远程服务器到本地同步 rsync -av usernameremote_server:/path/to/source /path/to/destination同步时排除特定文件或目录 rsync -av --exclude*.log /path/to/source /path/to/destination使用压缩传输 rsync -avz /path/to/source /path/to/destination请注意rsync 的选项和用法非常丰富你可以根据需要进行组合和定制。在使用之前建议查阅相关文档或执行 man rsync 命令来获取更详细的信息和帮助。 脚本 脚本来自这位仁兄 https://blog.csdn.net/qq_63756815/article/details/127016471 1、在 /bin 目录下创建 xsync文件脚本 2、需要修改的是在 第二步修改为自己的主机名 3、修改 文件权限为 777也可以单加一个可执行权限x chmod 777 xsync 4、 #!/bin/bash#1. 判断参数个数 if [ $# -lt 1 ] thenecho Not Enough Arguement!exit; fi#2. 遍历集群所有机器这里记得修改为自己的集群主机名 for host in hadoop102 hadoop103 hadoop104 doecho $host #3. 遍历所有目录挨个发送for file in $do#4. 判断文件是否存在if [ -e $file ]then#5. 获取父目录pdir$(cd -P $(dirname $file); pwd)#6. 获取当前文件的名称fname$(basename $file)ssh $host mkdir -p $pdirrsync -av $pdir/$fname $host:$pdirelseecho $file does not exists!fidone done演示 脚本 [rootmaster bin]# xsync /opt/test/master sending incremental file listsent 97 bytes received 17 bytes 76.00 bytes/sec total size is 10 speedup is 0.09slave1 sending incremental file list test/ test/a1.txt test/a2.txtsent 200 bytes received 58 bytes 172.00 bytes/sec total size is 10 speedup is 0.04slave2 sending incremental file list test/ test/a1.txt test/a2.txtsent 200 bytes received 58 bytes 516.00 bytes/sec total size is 10 speedup is 0.04 纯命令: [rootmaster bin]# echo 2222 /opt/test/a2.txt [rootmaster bin]# rsync -av /opt/test/ slave1:/opt/test/ sending incremental file list a2.txtsent 137 bytes received 41 bytes 118.67 bytes/sec total size is 10 speedup is 0.06 这里 我专门试了试会不会自动给我创建目录因为我没学过脚本发现是会的 但是 如果是纯命令的话你必须和scp命令相同的语法就是绝对路径且只会复制文件
http://www.yayakq.cn/news/4769/

相关文章:

  • 建一个网站大约多少钱网站建设 青少年宫
  • 洛阳有做网站开发的吗曼奇立德原画培训多少钱
  • 网页 网站免费域名注册永久
  • 网站建设与维护 前台温州网站升级
  • 做网站用什么配置的vps南昌微信网站建设
  • 网站建设怎么谈长春建筑学院
  • 租房网站开发文献综述模板二次网站开发
  • 紫网站建设合肥做网站推荐 晨飞网络
  • 阿里云建站售前咨询门户资源分享网站模板
  • 查派网站建设wordpress分表分库插件
  • 网站打不开是怎么回事深圳做自适应网站
  • 想学习网站建设微信软文范例100字
  • 公司网站的栏目设置国内做的好的帽子网站
  • html中文美食网站模板公司主页格式
  • 厦门市城市建设档案馆的网站宾馆酒店网站建设方案
  • 外贸自助建站微商城运营的主要工作
  • 开网站做淘宝客烟台网站制作山海云
  • 天津网站排名方案wordpress做导航网站
  • 专业建站公司的业务内容江苏省质量建设厅网站
  • 聊城手机网站建设服务tcga做多因素分析的网站
  • centos 网站搭建为什么不建议做运维
  • 深圳专业营销网站济宁建设局官方网站
  • 一般的网站建设网站首页分辨率
  • com域名的网站vs2017做的网站如何发布
  • 大连网站建设详细流程刚刚发生在昆明的大事
  • 网站怎么做前台跟后台的接口上海ktv最新通知
  • 什么网站需要icp备案dedecms可以做什么网站
  • 网站框架搭建德阳小程序开发
  • 承德网站建设规划注销网站 取消接入
  • 个人 可以备案做分类信息网站吗连山网站建设