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

0
votes
0answers
18 views

rsync directory and subdirectories structure with max depth and except some specific folders [duplicate]

I want to rysnc all folders and subfolders only without their files but with a max depth of 3 (/folder1/folder2/folder3) and exclude some specific folder (ex. cache) I have tried this: $ rsync -azv ...
-2
votes
1answer
33 views

Update files from server to server

I am building a tool using bash script, to move the files from server to server. But the tool for update, so I don't want to overwrite the exist files, in the other server from the first moment. I ...
0
votes
2answers
63 views

checking rsync run status

We have a cron job running to rsync files from one server to a different host. The cron runs daily at midnight. The file copy is critical for us so we want to monitor the backup runs. We want to ...
2
votes
3answers
64 views

How can I keep rsync from using encryption and compression for the file transfers after the connection is authorized?

I understand that a secure connection (i.e. ssh) is needed to authorize a connection to the remote server. But after that is authorized can the data be transmitted without encryption and compression ...
0
votes
0answers
34 views

rsync failed on SSH even after changing Maxstartup option in sshd_config

I am using following command to copy file from another system. sshpass -p 'XXXXX' rsync --partial -avvvv --inplace --rsh=ssh -e 'ssh -vvvv -p 62002 -o StrictHostKeyChecking=no -l username' ...
7
votes
5answers
2k views

force copying a corrupted home directory

I have a home directory in a disk that has a lot of corrupted files. I am trying to save most files as possible. I am trying to create a backup of my home directory on an external drive using tar ...
0
votes
0answers
30 views

Exclude pattern not working for rsync

The following command is working correctly for copying only files matching Mem* rsync -uvma '--include=*/' '--include=**/Mem*' '--exclude=*' ../srcdir/ /targdir I would like to also exclude a ...
0
votes
1answer
368 views

RSync - Permission denied (13) while executing rsync as a root

I am trying to set up hourly rsync beetwen my local machine and remote server. I have already created a ssh certificate to enable login less connection to remote machine. Now however when I execute ...
2
votes
2answers
72 views

RSync Error in script

At my job, we have a central Backup server, running Debian Wheezy, and on-site servers at each site, also running Debian Wheezy. A few weeks ago, the central office tech emailed me that the backup ...
0
votes
1answer
18 views

Verbose copying of complete folder deleting target

I want to copy a development folder that has some changes into the server folder with rsync. Without rsync I would do it like rm -Rf /var/www/site cp -a dev /var/www/ But I would like to use rsync, ...
1
vote
0answers
34 views

Exchanging huge file trees between disks

I have two 1TB disks and a huge file tree on each. Each takes up about 85% of their disk. I want to swap/exchange the trees between disks. The only spare (USB) disk that big I have is nearly full. ...
1
vote
1answer
373 views

rsync and xfr#1, to-chk=0/1, what do they mean?

I do stuff such as :- $ copy debian-8.2.0-amd64-DVD-1.iso /media/shirish/4719-38E5/ Copy here is an alias for :- $ alias copy alias copy='rsync --progress -ravz' When it does the command it ...
1
vote
2answers
29 views

I am trying to copy files from a server to my local directory using rsync.I don't want to copy the files which are copied earlier and being removed

I am trying to copy files from a server to my local directory using rsync.But after some times local files are being moved to archive.So, next time when I will copy the contents from the remote ...
0
votes
1answer
120 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 ...
2
votes
1answer
68 views

How to backup readable but not writable files using rsync?

I am using rsync to backup some folders in my home directory to a remote server using the following commands: cd rsync -Favz --inplace --delete --delete-excluded folder1 folder2 folder3 ...
2
votes
1answer
155 views

rsync complains about symlinks

I'm using the dry-run (-n) option of rsync to compare directories on two different systems. Everything works fine with standard files and directories. However, when I use a directory that includes ...
0
votes
1answer
68 views

rsync command not preserving permissions

rsync is not preserving permissions/ownesrship after file transfer. Here is the scenario Source host(192.168.2.14 from where files are copied): Source Path # ls -l "/shareddata/tesz/" total 4 ...
1
vote
2answers
2k views

Unexplained rsync disconnect

I'm rsyncing in to a shared web host from a Yosemite client. I've set up my authorized keys and can ssh in just fine, and scp files over no problem. When I rsync with the -n (dry-run) option, it ...
29
votes
6answers
32k views

rsync all files of remote machine over SSH without root user?

I have this command to backup a remote machine. The problem is that I need root rights to read and copy all files. I have no root user enabled for security reasons and use sudo the Ubuntu way. Would I ...
2
votes
1answer
14 views

How do I avoid the creation of root folder of the source in the destination when using rsync?

For example, when I copy all *.txt files in /tmp/src and its subfolders to /tmp/dst by rsync -avm --include='*.txt' --include='*/' --exclude='*' "/tmp/src" "/tmp/dst" it makes src under /tmp/dst. ...
1
vote
3answers
189 views

rsync command does incremental copying or overwrites the file?

rsync command is used to sync a folder data to another folder. I want to know if this command overwrites the entire file and sync or copies only the new file or changed file. Does it prompt if similar ...
0
votes
2answers
51 views

Delete destination directories with rsync (contents as well as parent)

I have a versions/ directory on a remote server to which I have only rsync daemon and ftp access. This directory contains a set of subdirectories, each named after the datetime of a deployed codebase ...
2
votes
3answers
140 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 ...
0
votes
2answers
51 views

rsync question syncing source with destination (archiving surplus files on destination)

rsync is pretty clear to me but I have a specific task I could not figure out yet. I want to sync source with destination 1:1. I believe the --delete option would cover that. So if I add a file on ...
1
vote
1answer
91 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
26 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 ...
0
votes
0answers
158 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
47 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, ...
1
vote
0answers
254 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
76 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
15 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 ...
27
votes
4answers
16k 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 ...
3
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 ...
12
votes
6answers
14k 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 ...
4
votes
1answer
57 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
58 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 ...
1
vote
0answers
31 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
1k 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 ...
4
votes
3answers
4k 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
31 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
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
176 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
33 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
85 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
39 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
272 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
204 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
250 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
4k 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
134 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 ...