rsync is a tool to efficiently copy directory hierarchies, locally or remotely, with powerful filters to decide what gets copied.

learn more… | top users | synonyms

1
vote
1answer
30 views

rsync --delete did not remove file in destination while with ssh

On my RHEL6 pair of servers, I tested the rsync from server-1 to Server-2 with SSH. Everything was good as expected. However, when I moved a file under A directory, A/x.file to B/ of /home/user on ...
0
votes
1answer
12 views

Cleanup archive and archive files only if sources exist using rsync, scp or sftp

I have to cleanup an archive directory on a remote host only if there are files to be archived; the source files are on the same host. I should run something similar to: cd $source_dir if [ -f ...
2
votes
3answers
92 views

List transient files by numerical value having number greater than a given constantly varying filename

I've a directory having constantly changing filenames (by numerical value) listed as: -rw-rw----. 1 root root 10493952 May 7 10:39 A0000000.LOG -rw-rw----. 1 root root 10493952 May 7 08:38 ...
25
votes
3answers
23k views

Can rsync resume after being interrupted?

I used rsync to copy a large number of files, but my OS (Ubuntu) restarted unexpectedly. After reboot, I ran rsync again, but from the output on the terminal, I found that rsync still copied those ...
0
votes
0answers
18 views

Backup debian folder to qnap nas with rsync repeatly every day

Sorry for this dummy question, but I really stuck here. I have debian web server, which have a backup with usb hdd. I would like to get that backup and send it to my NAS. My NAS is QNAP model TS-231, ...
1
vote
1answer
23 views

Syncing folders where multiple files are partially changed

I have following directory structure on remote machine ALLLibs/LibA/LibA.1 ALLLibs/LibA/LibA.2 ALLLibs/LibB/LibB.1 ALLLibs/LibB/LibB.4 for info LibA.1 and LibA.2 are version of a directory, ...
0
votes
0answers
12 views

why does rsync log-file not contain updates to regular files when dry-run?

In dry-run-mode, the log file does not contain changed/ updated regular files, and no deletions at all. It only contains changed and created directories. Yet, when executed without dry-run, the log ...
1
vote
0answers
28 views

Why does rsync -e 'ssh' work but not rsync --rsh=ssh [closed]

This works: rsync -P --partial -e 'ssh -p 12345' me@host:/path . This doesn't: rsync -P --partial --rsh=ssh --port=12345 me@host:/path . AFIK they're supposed to do the same thing. What have I ...
2
votes
3answers
40 views

Migrate mail from dovecot on centos to dovecot on debian

I am trying to migrate a number of user mail accounts from dovecot 1.0.7 on a centos 5.11 server to dovecot 2.1.7 on a debian 7 server Foolishly I thought I could simply replicate the Maildirs from ...
1
vote
1answer
8 views

Only move folders not existing in target directory

I am looking for a way to move folders that are not already present in the target directory on my linux server. Example: Target directory folder1 folder2 folder3 folder4 Source directory folder1 ...
23
votes
4answers
13k views

Resume transfer of a single file by rsync

In Ubuntu, I want to copy a big file from my hard drive to a removable drive by rsync. For some other reason, the operation cannot complete in a single run. So I am trying to figure out how to use ...
2
votes
3answers
2k views

Rsync --bwlimit not working

I am currently using rsync to transfert large file from a host to another. I would like to limit the debit for this transfert. After reading the man page I found the option --bwlimit which is ...
8
votes
6answers
9k views

How to rsync over ssh when directory names have spaces

I am new to Linux and am trying to rsync from one server to another. The servers have the same directory structure but I am having trouble getting the remotes server to properly recognize the path ...
1
vote
2answers
686 views

How to setup a rsync server and client?

I have worked on rsync for the whole afternoon. I have set a rsync server,but I don't know how to use it. I have two machines:66 and 12. 66 is the server,I want to back 66's data to 12,so I use ...
2
votes
1answer
660 views

rsync mkstemp failed: Invalid argument (22) with USB flash drive

I use "Back In Time" which is nothing more than a front end GUI to rsync version 3.0.9 protocol version 30. I'm running ubuntu 12.04. My backup device is a locally mounted USB flash stick/drive ...
4
votes
1answer
40 views

Does rsync over any type of checksum? [duplicate]

I need to transfer files from several servers to a single remote host using Rsync over SSH. However, I need to be sure that before the file is deleted on the source using the --remove-from-source ...
0
votes
1answer
25 views

How to pull one day old data from remote server to local server?

From what I have searched till now I only found command to PUSH one day old data from local server to remoteServer but what I want is to PULL one day old data from remoteServer to localServer. I ...
2
votes
1answer
28 views

Is it feasible to update the modified times only without copying files when using rsync?

The modified times of a large amount of local files are incorrect. I wanna update the timestamps by syncing the timestamps on the server. It would be time-consuming if the files themselves are ...
1
vote
2answers
33 views

rsync option to exclude partial files

We are using rsync to sync two folders on same machine. Files will be written to source folder from another application. We have problem that, even file not completely written/copied to the source ...
1
vote
0answers
16 views

Using rsync with the verbose option and filtering the information displayed

I am using rsync with the -a -r and -v options to copy files and directories from one server to another. This all works fine. But when I make a change, for example, to a single file on the source ...
0
votes
1answer
714 views

Rsync doesn't skip existing files

I use rsync to backup all the files from a specific folder in a USB drive connected to my Mac (Osx 10.9) to a folder of my home network NAS. The problem is that rsync replace all files and it does not ...
2
votes
3answers
3k views

How to use `~/.ssh/config` setting for each server by `rsync`

I'm now using rsync with -e 'ssh -p 10022' option to specify the port. I have already ssh setting in ~/.ssh/config. Host myvps HostName example.com User ironsand Port 10022 Can I use this ...
0
votes
1answer
28 views

How to automate (copy) LDAP/Kereberos install

I have several machines running Debian that I'm configuring to work with Kerberos and LDAP. I thought I would automate using rsync. At first I tried a basic rsync clone excluding directories and ...
0
votes
1answer
674 views

lsyncd and additional parameters for rsync

Currently Im using lsyncd to monitor data and sync them (same machine) settings{ logfile = "/var/log/lsyncd/lsyncd.log", statusFile = "/var/log/lsyncd/lsyncd_status.log", ...
0
votes
2answers
1k views

rsync is changing my directory permissions

I have an rsync setup that transfers files from my local development machine to my production web server. On the production server, the storage directory needs to be 775. When the rsync completes, it ...
1
vote
1answer
69 views

lsyncd: Is it possible to sync individual files from a list?

I want to sync certain files from one linux system to another using lsyncd. The files are not confined to one directory, neither do I want all files from a directory. Specifically I'm trying to make ...
1
vote
1answer
27 views

rsync filter based on an intermediate directory name

I want to copy files /SRC/**/OK/**/*OK* to /DEST/**/OK/**/*OK* using rsync. For all the files to copy, there must be a folder named OK in the full path and a OK in the filename. I tried rsync -avP ...
0
votes
1answer
66 views

rsync rules to only sync specific sub-dirs in long paths

I'm trying to perform complex rsync include/excludes to backup only the following within the /home/x dir: Recursively all files/dirs in Documents Recursively all files/dirs in ...
2
votes
1answer
21 views

rsync selected subdirectories only

I want to rsync a part of my music library from external drive to my audio player. Generally speaking, say, there is a $source and $target directories, and a text file $subdirs with a list of ...
4
votes
1answer
113 views

Using inotifywait along with vim

I have simple script that monitors file for changes and rsyncs it with remote copy: #!/bin/bash while inotifywait -e close_write somefile do rsync somefile user@host.domain:./somefile done It ...
2
votes
3answers
76 views

Copy only directories with .mp3 files with rsync

I'm trying to copy only folders with .mp3 files in them to another device. And only the .mp3s in them. The structure looks like this: Band/Year - Album/*.flac Band/Year - Album/*.txt Band/Year - ...
2
votes
3answers
211 views

How to pass argument with char ( in remote path?

I'm trying to move a file with rsync to a remote location, The file has be be named : DRRS_(H264).mp4 but when I try : rsync -azR output.mp4 user@server.com:encoded/somepath/DRRS_(H264).mp4 it ...
3
votes
5answers
3k views

Suppress server message in rsync

When I rsync or scp from a particular server I get a rather long message telling me the rules of the server. However when I setup regular pulls, I'd like to be able to suppress those messages in my ...
1
vote
3answers
42 views

To Rsync files where permission denied

I want to find those files which I cannot copy to another location such that I could do Rsync. I have an external HDD and my system´s HDD. The external HDD has files which my system is missing. I ...
2
votes
1answer
63 views

rsync over SSH sometimes very slow--other times maxes out bandwidth

I have a bash script set up on computer A (Mac OS X) set to run every five minutes via a cronjob. This script checks for new files on remote computer B (Gentoo Linux) then rsyncs any new files to ...
1
vote
3answers
176 views

Save a list of files over SFTP to a text file

I have provided my own answer below. We have a number of bash scripts that work fine using SFTP, what I would like to do is to simply re-direct an ls or dir of a folder to a file on our SFTP Server.. ...
0
votes
1answer
20 views

rsync creates directories that are excluded

I'm confused about how rsync includes/excludes files and directories. I have an exclude file: /home/pi/rsync-exclude.txt with contents: /proc/* /sys/* /dev/* /boot/* /tmp/* /run/* /mnt/* /media/* ...
6
votes
1answer
86 views

Redo rsync to preserve hard links?

I'm copying a Raspbian partition from one SD Card to a stand alone Raspbian install on a new SD Card. Based on a suggestion elsewhere, I ran: rsync -av --exclude=/mnt / /mnt but now I'm concerned ...
2
votes
0answers
84 views

understanding the output of --info=progress2 from rsync

if I run rsync with --info=progress2, I get an output like 105.45M 13% 602.83kB/s 0:02:50 (xfr#495, ir-chk=1020/3825) But what do the single numbers mean? I haven't found a matching entry ...
2
votes
1answer
27 views

Best way to archive after rsync

We have an rsync job that copies thousands of tiny little files to a server. After the files are on that server, we use retrospect to back them up to tape. Retrospect is starting to choke due to the ...
0
votes
2answers
32 views

Is there a way to rate-limit an rsync user?

I have a user with a Shell account(with jailkit) that insists on rsyncing 500gb of data on a daily basis. Is there a way to limit that rsync to say just 2mbits per sec? If I have to do it by IP, how ...
4
votes
1answer
77 views

Should the key for an automatically running cron job that runs over ssh not have a passphrase?

I'm reading an article in Master Linux Now 2013 called OpenSSH: Easy Logins and it uses ssh-agent to allow you to enter a passphrase for your key once, and then you're able to connect to a remote ...
1
vote
1answer
30 views

How to avoid recursive directory traversal for syncing two directories? [closed]

I see a lot of useless recursive directory traversal in: rsync unison owncloud All above application (and many more) do recursive directory traversal over and over again. Since the application ...
0
votes
1answer
36 views

Want to use find with rsync in script

I'm trying to make a script that will run in cron, that will search a path for specific file name. In the path there might be more folders with that same file name. If found and they are newer than 2 ...
0
votes
1answer
67 views

Use rsync to transfer files from Windows to Ubuntu

I'm having trouble transferring files via ssh from a Windows box to an Ubuntu box using rsync and cygwin on Windows. The file transfer starts, but the newly created directories and files on the ...
9
votes
2answers
20k views

“rsync: failed to set permissions on …” error with rsync -a or -p option

When I use the -a option as is asked and answered in Preserve the permissions with rsync, I got a lot of "rsync: failed to set permissions on" errors. rsync: failed to set permissions on ...
7
votes
2answers
13k views

rsync is very slow (factor 8 to 10) compared to cp on copying files from nfs-share to local dir

I have a freshly installed Ubuntu-server which is ought to be the new backup-server for our VM-storage. The server has 4 nics, 2 of them 10Gbit (in fact an intel x540-T2 with the newest driver ...
-1
votes
1answer
17 views

Copy Month wise folders

Main_Dir | --------------------------------------------------------------------- Subdir1 ...
2
votes
2answers
169 views

rsync --backup-dir creates empty folders in backup dir

I have a folder structure like this: . ├── bkp ├── dst └── src └── folder └── file I run the following command: rsync -t -r -b --backup-dir /tmp/rsyncTest/bkp/ /tmp/rsyncTest/src/ ...
1
vote
2answers
35 views

Using rsync to Synchronize Directories

I have a script that I am using to backup a directory on a CentOS 6 machine. It's very basic but it is executing rsync -a remote:~/original ./backup Which works fine it is copying the contents of ...