rsync

rsync error: failed to set times on “/foo/bar”: Operation not permitted

拈花ヽ惹草 提交于 2019-12-20 07:58:22
问题 I'm getting a confusing error from rsync and the initial things I'm finding from web searches (as well as all the usual chmod'ing) are not solving it: rsync: failed to set times on "/foo/bar": Operation not permitted (1) rsync error: some files could not be transferred (code 23) at /SourceCache/rsync/rsync-35.2/rsync/main.c(992) [sender=2.6.9] It seems to be working despite that error, but it would be nice to get rid of that. 回答1: If /foo/bar is on NFS (or possibly some FUSE filesystem), that

Symfony 2.2.1 rsync deploy - not working on remote server

青春壹個敷衍的年華 提交于 2019-12-20 05:15:19
问题 I'm very new to Symfony and I'm trying to automate the deploy process with rsync, while keeping both the local and remote installs of Symfony working. What I've done so far: installed Cygwin on my local machine (Windows 7+Apache2.2+PHP 5.3+MySQL 5.1) done a basic Symfony install on my local machine from shell with the command php composer.phar create-project symfony/framework-standard-edition [path]/ 2.2.1 set up a remote LAMP Ubuntu server with php-fpm (fastcgi) set up two different

在 linux 上使用 rsync 实现文件同步

我是研究僧i 提交于 2019-12-19 10:02:04
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 1. 简介 rsync 是类 unix 系统下的数据镜像备份工具。一款支持快速完全备份和增量备份的工具,支持本地复制,远程同步等,类似 scp 命令; rsync 命令在同步文件之前要先登录目标主机进行用户身份认证,认证通过之后才能进行数据同步,身份认证方式取决于所使用的协议类型; rsync 一般使用两种协议进行数据同步:ssh 协议和 rsync 协议。 2. 特性 可以更新整个目录树和文件系统 有选择性的保留符号来接,硬连接,文件属性,权限,设备以及时间 对于安装来说,无任何特殊权限要求 对于多个文件来说,传输效率很高 能用 ssh 或自定义端口作为传入入口端口 3. 工作原理 rsync 在进行数据同步之前需要先验证用户身份,验证身份取决于连接方式: ssh 登录验证 使用 ssh 协议作为基础进行用户身份验证,然后进行数据同步。 rsync 登录验证 ( 比较麻烦 ) 使用 rsync 协议进行用户身份认证(非系统用户),然后进行数据同步 数据同步方式: 推送(上传,数据恢复)(rsync 服务器 向 其他服务器推送文件) 拉取(下载,数据备份)(其他服务器从 rsync 服务器下载文件) 4. 实战 使用 ssh 协议实现文件同步 准备工作 172.16.10.111(NFS 服务器) 新建

rsync --exclude not excluding specific files [closed]

和自甴很熟 提交于 2019-12-19 08:32:12
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . I am currently running an rsync command to backup my specific folder. Here is the command: rsync -rtzv -e --exclude "generator/" --exclude "workspace/gallery/server/lib/personas_constants.php" /home/brandon/workspace/gallery /home/brandon/workspace/gallery2 The issue I am having is the --exclude is not excluding

Bash not trapping interrupts during rsync/subshell exec statements

匆匆过客 提交于 2019-12-18 20:53:17
问题 Context: I have a bash script that contains a subshell and a trap for the EXIT pseudosignal, and it's not properly trapping interrupts during an rsync . Here's an example: #!/bin/bash logfile=/path/to/file; directory1=/path/to/dir directory2=/path/to/dir cleanup () { echo "Cleaning up!" #do stuff trap - EXIT } trap '{ (cleanup;) | 2>&1 tee -a $logfile }' EXIT ( #main script logic, including the following lines: (exec sleep 10;); (exec rsync --progress -av --delete $directory1 /var/tmp/

git checkout - how can I maintain timestamps when switching branches?

六月ゝ 毕业季﹏ 提交于 2019-12-18 20:02:33
问题 I often switch back and forth between branches. I have a script which pushes the contents of the checkout to a 'running' environment where I can see the code run and test it (it's a web app). This push script uses rsync at its heart and it uses timestamps to detect what files should really be transferred. Because git-checkout seems to set the timestamps on the files to the current time, rsync reports all files are being pushed up, only because timestamps will be updated. How can I have git

Technical Hurdles for Win32 rsync port

↘锁芯ラ 提交于 2019-12-18 13:37:09
问题 Despite primarily being a windows user, I am a huge fan of rsync. Now, I don't want to argue the virtues of rsync vs any other tool...this is not my point. The only way I've ever found of running rsync on windows is via a version that is built to run on top of Cygwin, and as Cygwin has issues with Unicode, so does rsync. Is anyone familiar enough with the workings of rsync to say if there are any real technical programming hurdles to porting rsync to a native Win32 binary? Or is it maybe that

rsync服务部署

自闭症网瘾萝莉.ら 提交于 2019-12-18 13:00:54
1.服务端: 安装: [root@localhost ~]# yum -y install rsync 创建配置文件: [root@localhost ~]# vim /etc/rsyncd.conf(手动建立配置文件) uid = user gid = user(此处关键,与后边ip漂移后断点续传相关) use chroot = yes address = 192.168.10.101 port 873 log file = /var/log/rsyncd.log pid file = /var/run/rsyncd.pid hosts allow = 192.168.10.0/24 [ftproot](共享模块名) path = /home/sprixin1/(最后必须带反撇) comment = ftp export area read only = no dont compress = *.gz *.bz2 *.tgz *.zip *.rar *.z auth users = user(认证用户名) secrets file = /etc/rsyncd_users.db(认证密码文件) 创建认证密码文件: [root@localhost ~]# echo "user:123456" > /etc/rsyncd_users.db [root@localhost ~]#

Using Rsync include and exclude options to include directory and file by pattern

谁都会走 提交于 2019-12-18 10:11:28
问题 I'm having problems getting my rsync syntax right and I'm wondering if my scenario can actually be handled with rsync. First, I've confirmed that rsync is working just fine between my local host and my remote host. Doing a straight sync on a directory is successful. Here's what my filesystem looks like: uploads/ 1260000000/ file_11_00.jpg file_11_01.jpg file_12_00.jpg 1270000000/ file_11_00.jpg file_11_01.jpg file_12_00.jpg 1280000000/ file_11_00.jpg file_11_01.jpg file_12_00.jpg What I want

linux系统中rsync+inotify实现服务器之间文件实时同步

喜欢而已 提交于 2019-12-18 04:46:04
最近需要对服务器上的文件实施动态备份,我又不想每次都手动来进行备份,在网上找了挺多资料,发现使用rsync就可以实现,如果想要实现实时同步,还可以使用rsync+inotify组合,本文就是以组合方式来完成的。 先介绍一下rsync与inotify。 1、rsync 与传统的cp、tar备份方式相比,rsync具有安全性高、备份迅速、支持增量备份等优点,通过rsync可以解决对实时性要求不高的数据备份需求,例如定期的备份文件服务器数据到远端服务器,对本地磁盘定期做数据镜像等。 随着应用系统规模的不断扩大,对数据的安全性和可靠性也提出的更好的要求,rsync在高端业务系统中也逐渐暴露出了很多不足,首先,rsync同步数据时,需要扫描所有文件后进行比对,进行差量传输。如果文件数量达到了百万甚至千万量级,扫描所有文件将是非常耗时的。而且正在发生变化的往往是其中很少的一部分,这是非常低效的方式。其次,rsync不能实时的去监测、同步数据,虽然它可以通过linux守护进程的方式进行触发同步,但是两次触发动作一定会有时间差,这样就导致了服务端和客户端数据可能出现不一致,无法在应用故障时完全的恢复数据。基于以上原因,rsync+inotify组合出现了! 2、inotify Inotify 是一种强大的、细粒度的、异步的文件系统事件监控机制,linux内核从2.6.13起