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

3
votes
2answers
618 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 ? ...
17
votes
4answers
7k views

Do I need to have a passphrase for my SSH RSA key?

Before I started at my current job (at a small business), my office had no firewall on the network and literally nothing was ever being backed up. Now that I've signed on as a dedicated sysadmin / ...
9
votes
2answers
14k views

Rsync only changed files

Is it possible to have rsync transfer all files in a directory that have changed or have been created? I don't need something as sophisticated as a CRC diff check; files with different timestamps ...
0
votes
1answer
3k views

How to set/keep directory permissions?

I'm using CwRsync to connect from my Windows development machine to a linux webserver : rsync -avuz -e ./ssh --exclude=".svn" /cygdrive/c/xampp/htdocs/project123/ ...
0
votes
0answers
9 views

Unable to change owner on a mapped drive directory

I am using a script to copy files from amazon instances to a network drive using rsync. After the file copy I am trying to change the owner of these transferred files but am not able to. What is the ...
0
votes
1answer
23 views

How do I make Unison behave like rsync?

I have two roots, /sync and ssh://bob@remotehost//sync. These roots contain three subfolders: paul, bob and sam. I currently sync them using the following script: rsync -a --delete --delete-excluded ...
0
votes
1answer
253 views

Alternative to diff with progress for massive directory compare?

I just rsync-ed 2,000,000 files (3TB) from one RAID to another. I want to make sure my data is intact. rsync -c takes a really long time. diff doesn't show me what it's doing. Is there an ...
13
votes
3answers
10k views

linux merge folders: rsync?

I have two copies of a folder src/ dest/ I want to merge them, doing the following: If a file is only in src, I want it to be moved to dest If a file is only in dest, I want it ignored IE left ...
1
vote
1answer
18 views

Limit rsync to available space on destination

I have a directory, /data/snapshots, which I'd like to archive to an external drive mounted at /mnt. The external is 2tb, /data/snapshots is much more. If I: rysnc -av /data/snapshot /mnt Then ...
4
votes
4answers
3k views

rsync synchronizing files only without creating folders on destination

Is it possible with rsync to not create directories on destination? Imagine I have that source : a/ a/x.txt b/ b/y.txt And that I have this destination : a/ a/z.txt The wanted result of rsync ...
0
votes
0answers
21 views

Linux: sync/merge two (or more) directories, but keep older file versions?

got alotta help throughout the time just by simply scrolling and crawling through the vast landscape of qualified answers here from you, now's the time to ask my first question and it looks rather ...
0
votes
0answers
11 views

Making mbuffer faster

I'm trying to transfer files as fast as possible across a 10 gig network connection. Up until now, I've been using rsync to move large files across the network, but I'm trying mbuffer now because I've ...
4
votes
5answers
9k views

Does rsync --inplace write to the entire file, or just to the parts that need to be updated? (for btrfs+rsync backups)

I was reading several guides how combine btrfs snapshots with rsync to make an efficient backup solution with history. However it all depends on if rsync --inplace modifies only those portions of ...
18
votes
5answers
20k views

rsync file permissions on windows

I have an rsync service that syncs files from remote machine to a machine that drops them on a network drive. I need the copied files to take on the native permissions of the destination folder. ...
1
vote
2answers
6k 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
0answers
29 views

Accessing rsync folder after windows re-install

I am using cygwin to backup my Debian VPS to my Windows PC. All is fine, but if I re-install Windows I can't access the backup folder until I change the owner of the folder and all its children. ...
0
votes
0answers
15 views

How to roll back rsync backup, and having trouble targeting a particular partition for backup

I'm using Linux Mint 17.1. I tried to set up a backup with rsync using the following command: sudo rsync -aAXv --exclude={"/dev/*","/proc/*","/media/*"} /* /media/hex/ I just installed an m.2 SSD ...
1
vote
1answer
19 views

How to maintain a remote cloned directory with rsync?

I have SSH access (using a SSH key pair) to a remote machine. I want to keep a directory on the remote machine exactly equal to a given local directory (one way sync). The check for file equality ...
0
votes
0answers
17 views

rsync tree but ignore folders where a .git directory exists?

All I found were questions how to ignore the .git directory when using rsync - my question is a little different: I want to ignore the whole tree from the point where the .git directory exists. ./ ...
0
votes
1answer
15 views

How to properly migrate a constantly changing set of files from one NAS to another?

I am moving 4.4TB of files from one NAS to another, both running Ubuntu. However there is one thing that made me a bit worried whether rsync would work or not: there is a folder whose contents that is ...
0
votes
3answers
4k views

rsync option --log-file seems not to be working

I am using the --log-file option in rsync to see the logs. But when I tried to run, it says: --log-file unrecognized option Here is my command: #/usr/bin/rsync -av -u ...
2
votes
1answer
2k views

Rsync to a WebDAV filesystem on OS X copies all files regardless of being changed or not

I am trying to sync from my (Mac) desktop to an iPad and an iPhone. MacOS X mounts WebDAV as a native file system, but syncing results in all files in my directory structure being copied again. This ...
2
votes
2answers
2k views

rsync fails after server restart

Usually I use the command rsync -av --delete someroot/somedir user@remote_server_ip:/someroot/. on my development server to synchronize somedir to a remote server. It worked fine. But after the ...
4
votes
3answers
6k views

Rsync print only files that would have been changed

Is there a way to get rsync to print the full filepaths to all files that are different without actually transferring any files? Alternatively, I need a way to diff the files across two trees (over ...
0
votes
1answer
39 views

Fastest way to duplicate encrypted hard drives?

I used hard drive duplicator to do the sector-by-sector duplication of hard drives. I think it took about 5 hours. Pros: easy unattended, computer-free operation Cons: hard drive size ...
1
vote
1answer
17 views

Rsync behaviour/differences & newbie

From my understanding, rsync over SMB tries to build a file list each time on source/destination to check any changes have been modified before a copy takes please. I’m trying to understand the ...
0
votes
1answer
37 views

How to safely synchronize two folders without duplicates?

I have an account on mega and I want to synchronize it with a folder on my computer. The problem is, that this account is public to some extent so I can't just use rsync with --delete in case someone ...
0
votes
0answers
7 views

Use rsync on bare device

Is it feasible to use rsync on bare device files, like rsync /dev/sdb user@remote:/dev/sdb or even rsync /dev/sdb user@remote:images/sdb.img to sync two drives or a drive image?
1
vote
0answers
35 views

How to rsync root files over non-root ssh?

I have two machines, both providing no root login, but provide sudo root access. Now I like to initate a rsync transfer of root files over ssh. Is there an easy way make the the root access given by ...
55
votes
3answers
39k views

What are the differences between the rsync delete options?

I see on the rsync man page that there are a number of delete options, but don't really understand the differences between them. What are the differences between these options? --del ...
0
votes
1answer
52 views

Rsync-like automatic delta backup of a removable hard drive on windows

Well a lot of questions have been asked on the SE network about using rsync on Windows. But nothing seems to really do the trick so I'd like to expose the specific mechanism I need to setup. Lets say ...
1
vote
1answer
56 views

Cannot delete file on Linux

After backuping with 'rsync --archive --update' my home directory from ext4 to btrfs, rsync reports errors like this: rsync: ...
0
votes
2answers
116 views

OS X file copy fills up the system drive

I have a Mac Mini with a 40GB system drive and the time has come to move all the user data to an external drive, as I only have 750MB left. So I plugged in a 1TB firewire drive and used Finder to ...
0
votes
0answers
43 views

Synchronize two folders over sftp?

I have a cloned git repository in a directory and a sftp server, I want the server to be in sync with my repository. I've been trying multiple Atom/Sublime Text plugins with no luck, they only upload ...
1
vote
2answers
649 views

How to avoid rsync -b to backing up backup files

I always do a mutual sync by issuing always "rsync -avuzb src dest" and then "rsync -avuzb dest src". If I use "rsync -avuzb ", already existing files are renamed to ~ on the destination, due to the ...
0
votes
1answer
34 views

How to delete folder and files in the destination that are missing in the source (before copying)?

I sometimes have the problem that rsync tries to transfer a new file from the source to the destination (both have the same space) when there's already not enough space left, which causes this error ...
3
votes
2answers
68 views

How do I efficiently move a large, empty disk image to another system

I'm currently trying to move a fairly empty, fresh qcow2 image from one system to another that's far away. I've basically got a fresh install of ubuntu LTS (real size 6gb, apparent size 200gb). Most ...
0
votes
1answer
31 views

CentOs 6, rsync/scp of big file stop at 40% (2.4G)

I'm trying to download from the remote server to local laptop a big file (~5G), but the download stops at 40% of the size (2.4G). I'm using this rsync command: rsync --bwlimit=1200 -rh --progress ...
1
vote
0answers
30 views

rsync glitches with -X (extended attributes) flag

When I rsync files from ext4 file system to btrfs with the following set of flags: rsync --update -DHAXErlptgo the first copy of the backaped directory is done OK, but when this same command is ...
2
votes
2answers
2k views

How can I get rsync to ignore missing files?

I'm executing a command like the following to several different systems: $ rsync -a -v foo@machine.company.com:'/path/to/first/*.log path/to/second.txt' /dest/folder/0007/. Sometimes *.log does not ...
-1
votes
1answer
27 views

Why can't I use a specified port in /etc/ssh/sshd_config for remote transfers?

I have just setup a vps server on Ubuntu 14.04, for security reasons, I changed the allowed port for ssh connections in /etc/ssh/sshd_config. So far I've been able to connect remotely via this new ...
0
votes
1answer
29 views

rsync variables script syntax error

Really struggling with getting a command argument variable to work with rsync. The behavior i'm seeing is this error from the script: rsync: connection unexpectedly closed (0 bytes received so far) ...
0
votes
0answers
20 views

Cannot rsync 2 qnaps over ssh

Here is my case and question. Me and my dad both have a Qnap NAS. And I would like to back-up to him (and he to me) using rsync. On both sides we can reach each other over rsync and ssh. But as soon ...
0
votes
0answers
16 views

rsync a folder ignoring sud-dirs which has with circular symlink

I am trying to rsync a folder as below: rsync -ahLz ./src /tmp/ Dir "./src" has circulr symlink as: $ ls -l src/cpp/blddir lrwxrwxrwx 1 lnxbuild users 16 May 27 02:16 src/cpp/blddir -> ...
1
vote
1answer
197 views

Debian: rsync and cp is corrupting contents of CSV files

I have a weird problem. I wrote a script that scans a directory on a samba share (a OpenSUSE server on the LAN) and uses cp to copy certain CSV files to the local Debian server web root at /var/www. ...
0
votes
1answer
581 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. ...
0
votes
1answer
41 views

rsync multiple files with colons in their names

rsync interprets colons in file names as indicators that preceding is a remote machine name. When you try to rsync a file that has a colon in it's name, rsync typically gets confused, producing errors ...
0
votes
1answer
58 views

Rsync - resending all files, because files have different timestamp (off by 1 second!)

I am using rsync to backup files from my Mac laptop to a usb drive (exFAT) on my Windows laptop. The usb drive is shared within my home network, and mounted on my Mac. I noticed a weird problem when ...
1
vote
2answers
53 views

Backing up linux server on ntfs harddrive

I'm looking for a way to backup my debian server. For the data partition I have a solution using rsync, the backup goes to an encrypted ntfs-drive. NTFS because I often take the drive with me to watch ...
1
vote
0answers
16 views

How to set permissions and ownership when using rsync?

I'm using capistrano-wpcli (link), a program that uses 'rsync' to synchronize folders between development and testing servers. I've set the uploads folder's permission on the remote server to 777 ...