Tagged Questions

Rsync is an open source command line tool for Unix and Windows systems that provides fast incremental file transfer to copy files and synchronize directories locally or between remote hosts. It is widely used for mirroring and backup.

learn more… | top users | synonyms

0
votes
2answers
75 views

Rsync fails to sync flags

I am trying to sync two folders along their extended attributes, however some files are always synced every single time without any apparent reason. Debugging rsync I found out that the remote file ...
1
vote
1answer
387 views

Multiple rsync versions conflict

RSYNC only fails when I try to sync extended attributes (Mac OS X) with the following error. rsync error: protocol incompatibility (code 2) at io.c(599) [sender=3.1.0] rsync: [receiver] write error: ...
0
votes
1answer
58 views

Linux shell command to compare two directories and remove dupes

As a part of an app I'm developing, I need to remove any files in directory A that are already into directory B. I thought of rsync but I can't stop it from copying the files missing from source to ...
0
votes
1answer
820 views

Specifying an alternate shell with rsync

I'm using rsync to sync up files between two computers. On one machine, my default shell is set to fish, which breaks rsync ("protocol version mismatch -- is your shell clean?"). Is there a way to ...
1
vote
2answers
918 views

Linux: What is the best way to copy from a damaged HD, only the files that can be completely read?

I am copying from a damaged HDD (not SDD) where about 15% files would cause I/O error. I only want the rest of the 85% complete files, and get a list of damanged files. How to do that? cp stops on ...
3
votes
2answers
4k views

RSYNC Does Not Delete Source Directories

I'm using rsync to essential fetch files off a server, then delete the files from the server once I have them locally. The full command I'm running is below. This does successfully delete the files ...
2
votes
1answer
9k views

How to interpret and fix a Input/output error in Linux?

I am running a daily backup with rsync. Starting some days ago, one of the files has been throwing this error during the backup: rsync: read errors mapping "/home/folder/file.ext": Input/output error ...
3
votes
3answers
2k views

How to arbitrarily map user/group ownerships in rsync

I need to rsync a directory to a remote server so that all files belonging to user X and group Y on the source (local) machine are mapped to user W and group Z on the destination (remote) machine. If ...
0
votes
1answer
201 views

Error while executing bash command stored in string

Wrote a bash shell script that uses rsync to deploy files to live web server. Right before executing, the script outputs the full command that the my shell script generates: rsync --chmod="ug=rwx" ...
0
votes
1answer
198 views

Scripting with rsync, pulling more than the return status

I have a script to backup my images and alert me to the status of the script which gets run every 5 minutes. However, I want to figure out how to identify when rsync was successful, but didn't do ...
3
votes
1answer
74 views

How can I rename files and subdirectories in a copied directory based on changes in the original?

I have a directory structure with many hundreds of files and folders underneath it for organising files (in this case photos). I create backups of that directory structure by rsyncing it to identical ...
2
votes
0answers
409 views

Rsync fails for files that start with underscore when destination is zfs

I'm using rsync3.1.0pre1 on Mac OS X 10.8.5, and am trying to rsync one folder to another. The destination is a ZFS volume mounted via SMB. The problem I'm having is that files that start with ...
0
votes
1answer
313 views

rsync filter: not finding the filter file

Wrote a shell script to aid me in deployment of website. Everything finally comes together as supposed, but the rsync command refuses to work. rsync --chmod="ug+rwx" -e="ssh" --filter="merge ...
0
votes
1answer
91 views

Rsync --backup-dir seems to be ignored

I want to use rsync to backup a directory from a local location to a remote location, and store changed files in another remote location. I did use: rsync -rcvhL --progress --backup ...
1
vote
1answer
585 views

How can I direct rsync output / log to the remote server?

I am able to output rsync logs on the client machine using --log-file=FILE but I want the output to be sent to the server instead. The client is a W7 machine (cygwin) and the server a Linux NAS. This ...
2
votes
0answers
163 views

External drive has strange files “_*” appearing - culprit is maybe rsync or SMB access?

I'm using rsync to back up folders from my iMac to a WD MyBook and the process seems to leave files such as these: _0O1MN~H.MP4 _2C0X2~3.AVI _ALLYW~B.SRT _VUC69~7 The last one is the most ...
1
vote
2answers
3k views

Permission problems with rsync

I wanna do daily ssh synchronization of some of my local machines files with my server. I want to do this via rsync, since it sounds the most promising tool for this task to me. Sadly I get the ...
0
votes
1answer
163 views

Rsync from godaddy to OS X

I would like to use rsync to backup my website to my local computer (OS X). I started of with this guide and got pretty far. I use the following rsync-line: rsync -PzrlptgD --del --delete-excluded ...
3
votes
1answer
454 views

Fastest way to delete a non empty directory in Linux

I use the command rm -rf directory but i came across the following article : Article That suggests that rsynch to an empty folder is the fastest way? rsync -a –delete empty/ a Why is this the case ? ...
1
vote
3answers
2k views

Are periodic full backups really necessary on an incremental backup setup?

I intend to use an old computer I have as a remote backup server for myself and a few other people. We are all geographically separated, and the plan is to do incremental daily backups using rsync and ...
1
vote
1answer
487 views

rsync include all directories and certain subdirectories and *.java of the last sub

I am trying to rsync include all directories but only one of each of those subdirectories which contain certain files. For example, rsync -auvz --include '*' --include '*/certain_sub/' --include ...
1
vote
2answers
226 views

Why does my rsync server on windows always set the read-only flag when I write to it?

I'm using cwrsync on windows. This is my daemon config file use chroot = false strict modes = false hosts allow = * log file = rsyncd.log pid file = rsyncd.pid port = 11011 # Module definitions # ...
0
votes
1answer
214 views

Backup files from Linux client to Windows Server

I'm trying to backup my files from my Linux box to my Windows Server 2008 as a push, and when I delete them from my Linux box, they remain on my Windows Server. I've found lots of sources that are ...
0
votes
2answers
69 views

Sycronizing/deploying scripts across several systems

I have a few time consuming tasks that I like to spread across several computers. These tasks require running an identical ruby or python script (or series of scripts that call each other) on each ...
0
votes
1answer
62 views

two-way sync between mac and unix

I would like to work on a directory on two different macs and have access to a unix server that I ssh into. I would like to just start a script at the end of the day that let's me upload all my ...
1
vote
1answer
170 views

rsync backup messes up permissions on files

I use rsync backup on my Android device to backup some files from my device to my *nix server. It sort of works, except the target directory and all files under it have their file mode flags set to ...
0
votes
1answer
176 views

Can't get rsync to sync two external harddrives

I'm trying to use rsync to copy files from one external HDD to another external HDD. I use the following commands rsync -rv --exclude=.DS_Store ~/Volumes/Backed /Volumes/Hero where Backed is the ...
1
vote
2answers
204 views

Is there an rsync equivlent of .gitignore?

I have a file that should never be synced in a directory that will be rsynced often. Rather than relying on --exclude (and my ability to remember to use it), can I tell rsync to ignore the file in a ...
0
votes
1answer
57 views

Does a successful exit of rsync -acvvv s d guarantee identical directory trees?

I have two volumes, one xfs, and another ntfs - ntfs was empty, and xfs had 10 subitems. I needed to sync them. I initially copied a few of the subitems by dragging them over in a gui fm. Several of ...
0
votes
1answer
300 views

Will the option NOATIME in /etc/fstab ruin my Unison synchronizations?

I read here in ArchWiki that the option noatime can improve hard disk performance and durability: The use of noatime, nodiratime or relatime can improve drive performance. Linux by default uses ...
4
votes
2answers
437 views

How can completely back up my linux computer so that it can be fully restored easily?

I want to be able to blindly back up my entire hard disk, so that I can blindly and automatically restore in case there is any problem. I am not interested in merely backing up data, but specifically ...
0
votes
0answers
257 views

Caveats with gzip --rsyncable - no speedup

I am using (trying) gzip to compress an SQL file in an rsyncable way in order to transfer the backup with minimal delay. However it appears that this is not working, since the speedup is always 1.00. ...
1
vote
2answers
4k views

What is more efficient / faster, rsync compression or ssh compression?

I currently rsync files: (i) locally and (ii) remotely over WAN (connection c. 8mbps down / 1.5mbps up). I am considering adding to rsync: -z to compress files. Or alternatively adding to ...
1
vote
0answers
58 views

Running a symlink locally

I am running the same program multiple times over a linux platform. It is compiled at another server, and frequently updated, and it's uploaded over through rsync to all "hosting" servers, which do ...
3
votes
2answers
213 views

restrict rsync (or bash script) to a directory

After a bad accident with rsync deleting wrong files due to wrong destination parameter, I want to restrict rsync (or the bash script running it) to be able to delete/modify files only under a certain ...
1
vote
3answers
455 views

Moving files over SSH and delete on source after successful final copy

I have a folder of ~200 000 files with a total size around 300 GB that I need to transfer over an SSH connection to a remote host. I'm looking for a way to have the local files deleted after it's been ...
1
vote
1answer
519 views

Bash script fails from Windows 7 task scheduler

In order to use rsync I created a Bash script. It runs fine from the Cygwin 32-bit shell in Win 7 but fails when run from the Win 7 Task Scheduler. My Task Scheduler script is a simple: ...
0
votes
1answer
76 views

Copying Thousands of Files on the same HD

I found myself in a situation I am copying an entire filesystem across two different HD partitions (different sizes and filesystem types). The problem so far is taht both cp and rsync will read a ...
2
votes
1answer
111 views

rsync via gateway ssh while defining .pem key

I need to sync my local files through a gateway to an Amazon EC2 instance that requires specifying my .pem key. I can do this as a three step like so (assuming no typos): rsync -avzh -e ssh ...
2
votes
1answer
2k views

Permission denied using Rsync as root

All topics that I've come across involved rsync over ssh or rsync using a user with restricted access. I'm getting permission denied (13) errors as root. Here are my config files: /etc/rsyncd.conf: ...
15
votes
3answers
932 views

Moving 2TB (10 mil files + dirs), what's my bottleneck?

Background I ran out of space on /home/data and need to transfer /home/data/repo to /home/data2. /home/data/repo contains 1M dirs, each of which contain 11 dirs and 10 files. It totals 2TB. ...
3
votes
2answers
2k views

make linux server allow rsync/scp/sftp but not a terminal login

I'd like to configure a linux box (probably an Ubuntu server) so that I can setup users, so that it is possible to upload/download files via rsync/scp/sftp, but it should not be possible to ssh to the ...
2
votes
1answer
44 views

rsync - How to sync specifc files and delete the rest on destination

I want to sync specific files and delete anything else that exists on the destination server. Source = /dir1/A - Z How do I sync A - D and delete E - Z if they exist?
0
votes
1answer
87 views

How to copy directory from remote server

I came across following instruction to copy a directory to my local machine. copy the gems from styx server from "‪location/to/the/directory" to your local directory I know rsync and scp can do the ...
0
votes
3answers
191 views

What are good compression algorithms for delta synchronization?

When syncing large files over a slow link, it is often useful to use delta compression in order to reduce the bandwidth used. It is also useful to compress files as they take up much less space. ...
0
votes
1answer
949 views

Rsync Remote To Local Issue

I was wondering if I could get some help with this rsync command. I am trying to copy files from a remote system by running rsync on the local system. Here is my command: /usr/bin/rsync -avz ...
1
vote
1answer
168 views

How can I reallocate an ext4 file system in an extended partition without lose data?

I resize the disk using the Windows default program. I don't know why, the extended partition of Linux now result unallocated. I'm sure I don't "touch" the extended partition, and I don't know why ...
0
votes
0answers
78 views

Reducing OpenSSH session key size

I am running into severe performance issues using SSH/Rsync on a Synology NAS (model DS413j if anybody knows anything about it). Both the sshd and the rsync processes are taking 100% CPU on the NAS, ...
2
votes
0answers
179 views

rsync: large exclusion list adding 10 hours to sync

I have had an rsync backup script running on a Centos 6 box that has been syncing ~410gb of data from a local (LAN) server over a gigabit connection. This script runs hourly, and if there are no new ...
2
votes
0answers
275 views

Keep local folder in sync with Samba share

I have a local folder on my Linux Mint desktop (my Dropbox folder, though that shouldn't matter), and I'd like to keep it synced with my school's "datastore" Samba share, which I can connect to from ...