rsync

rsync with ssh remote backup

感情迁移 提交于 2019-12-24 07:34:28
问题 I'm using rsync with ssh to perform remote backup but I am having trouble with one server (telling that host is unreachable) while it works with other servers. rsync -avz --delete -e ssh [USER]@[IP]:[PATH] . 回答1: Maybe this server use another port than the default one, then you have to specify this port : rsync -avz --delete -e "ssh -p [PORT]" [USER]@[IP]:[PATH] . 来源: https://stackoverflow.com/questions/38955707/rsync-with-ssh-remote-backup

Unix - Compare two directories recursively, output differences as a list minus directories

只谈情不闲聊 提交于 2019-12-24 06:40:32
问题 I have an archive system that archives any file (and the corresponding directory structure of where that file is located) to another volume. It ignores empty directories. After the archive has created a copy to an external volume, I've been using the following command to list the differences to make sure that no file has been missed: diff -qr dir1(original) dir2(archive) My problem is that all of the empty directories that the archive system ignores show up and clog the resulting list. Is

Windows 8.1 Task Scheduler Won't Execute Rsync/SSH Without being Logged On

只谈情不闲聊 提交于 2019-12-24 03:12:49
问题 I've created and scheduled a batch file in Windows 8.1 (to perform rsync offsite backups through an SSH tunnel) and I can run it: manually through task scheduler manually when I right click -> Run through task scheduler automatically when I am logged on and it's scheduled to run at a given time ... but when I'm not logged on, it just sits at "Running" even though I've set it as follows: user=me (I'm a member of admin group) run whether logged on or not run with highest privileges I can see in

Ways to synch many (small) files over high-latency network connection

女生的网名这么多〃 提交于 2019-12-24 01:15:24
问题 We typically deploy our software applications to our clients using Subversion (svn update on the clients; unidirectional). We're currently experiencing problems with one of our clients because of the high latency (large file download speeds are good) because they are in China and our server is in Canada. Subversion simply times out with an error after a very long period of time. Our application has lots of small files (.aspx, .config, etc.) and a few larger files (.dll, .jpg) for a total of

Deploy with rsync(or svn, git, cvs) and ignore inconsistent state during deployment?

♀尐吖头ヾ 提交于 2019-12-24 01:09:51
问题 We are currently talking about deploying a website via rsync. However, during rsyncing the application is left in an inconsistent state, as some files may already be synced while others still are left with the old version right? How do people deal with this issue? I guess the same problem exists when deploying via svn/git/cvs. Should I just close the site, rsync, and open up again? Or do people simply ignore this inconsistency problem? 回答1: Use a two-step deployment. rsync to a test directory

nginx+docker+nfs部署

有些话、适合烂在心里 提交于 2019-12-24 00:03:34
一.体系架构 在Keepalived + Nginx高可用负载均衡架构中,keepalived负责实现High-availability (HA) 功能控制前端机VIP(虚拟网络地址),当有设备发生故障时,热备服务器可以瞬间将VIP自动切换过来,实际运行中体验只有2秒钟切换时间,DNS服务可以负责前端VIP的负载均衡。 nginx负责控制后端web服务器的负载均衡,将客户端的请求按照一定的算法转发给后端Real Server处理,而Real Server将响应直接返回给客户端。 nfs服务器做实时备份,给web服务器提供web界面。 二.简单原理 NGINX_MASTER、NGINX_BACKUP两台服务器均通过keepalived软件把ens33网卡绑上一个虚拟IP(VIP)地址192.168.1.40,此VIP当前由谁承载着服务就绑定在谁的ens32上,当NGINX_MASTER发生故障时,NGINX_BACKUP会通过/etc/keepalived/keepalived.conf文件中设置的心跳时间advert_int 1检查,无法获取NGINX_MASTER正常状态的话,NGINX_BACKUP会瞬间绑定VIP来接替nginx_master的工作,当NGINX_MASTER恢复后keepalived会通过priority参数判断优先权将虚拟VIP地址192.168.1

rsync远程同步和时间同步

倖福魔咒の 提交于 2019-12-23 22:06:48
1、基本语法 rsync -rvl $pdir/$fname $user@hadoop$host:$pdir/$fname 2、xsync集群分发脚本 touch xsync.sh vim xsync.sh #!/bin/bash # $#:表示传递给脚本或函数的参数个数。 #1 获取输入参数个数,如果没有参数,直接退出 pcount=$# if((pcount==0)); then echo no args; exit; fi #2 获取文件名称 p1=$1 fname=`basename $p1` echo fname=$fname #3 获取上级目录到绝对路径 pdir=`cd -P $(dirname $p1); pwd` echo pdir=$pdir #4 获取当前用户名称 user=`whoami` #5 循环 #for((host=0; host<5; host++)); do #echo $pdir/$fname $user@hadoop$host:$pdir # echo --------------- hadoop$host ---------------- # rsync -rvl $pdir/$fname $user@192.168.3.15$host:$pdir #done #5 循环 for host in {master,slaver1

sync two computers going through a bridge with rsync

天涯浪子 提交于 2019-12-23 21:56:53
问题 I want to sync two computers (A and C). Unfortunately I cannot connect from the computer A to the computer C via ssh (no one knows why). This is why I have to use a another computer (B), which is recognized by C. To sync A and C I build-up two scripts: the first one "sync_A_2_B.sh" (located in A), and "sync_B_2_C.sh" (located in B). Each of those contain rsync instructions. From A to B: rsync -av ~/BACK_UP/ username1@blablabla1:/home/BACK_UP/ From B to C: rsync -av ~/BACK_UP/ username2

Ansible prompts password when using synchronize

匆匆过客 提交于 2019-12-23 06:55:07
问题 I'm using ansible in the following way: ansible-playbook -f 1 my-play-book.yaml --ask-pass --ask-sudo-pass After this I'm asked to enter the ssh & sudo passwords (same password for both). Inside my playbook file I'm using synchronize task: synchronize: mode=push src=rel/path/myfolder/ dest=/abs/path/myfolder/ For each host, I'm prompted to enter the ssh password of the remote host (the same that I entered in the beginning of the playbook run) How can I avoid entering the password when

hadoop集群配合

谁都会走 提交于 2019-12-23 01:59:36
Hadoop是什么 Hadoop三大发行版本 Hadoop三大发行版本:Apache、Cloudera、Hortonworks。 Apache版本最原始(最基础)的版本,对于入门学习最好。 Cloudera在大型互联网企业中用的较多。 Hortonworks文档较好。 Hadoop的优势(4高) 1)可靠性: Hadoop底层维护多个数据副本,所以即使Hadoop某个计算元素 或存储出现故障,也不得致数据的秩。 2)扩展性:在集群间分配任务数据,可防便的扩展数以千计的节点。 3)高效性:在MapReduce的思想下,Hadoop是并行工作的,以加快任务处理 速度。 4)高容错性:能够自动将失败的任务重新分配。 Hadoop组成(面试重点) 虚拟机准备 完全分布式运行模式(开发重点) 1)准备3台客户机(关闭防火墙、静态ip、主机名称) 2)安装JDK 3)配置环境变量 4)安装Hadoop 5)配置环境变量 6)配置集群 7)单点启动 8)配置ssh rsync 远程同步工具 rsync主要用于备份和镜像。具有速度快、避免复制相同内容和支持符号链接的优点。 rsync和scp区别:用rsync做文件的复制要比scp的速度快,rsync只对差异文件做更新。scp是把所有文件都复制过去。 (1)基本语法 rsync -av p d i r / pdir/ p d i r / fname