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

26
votes
7answers
24k views

Rsync filter: copying one pattern only

I am trying to create a directory that will house all and only my PDFs compiled from LaTeX. I like keeping each project in a separate folder, all housed in a big folder called LaTeX. So I tried ...
7
votes
2answers
10k 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 ...
12
votes
5answers
9k views

view stdout for another pts

Here is the situation. I left my pc at home doing an rsync from a 2TB hard drive to another 2TB hard drive (it's going to take a while since they are both USB 2.0). I am now at work and I have ssh-ed ...
17
votes
3answers
17k views

How can I pause/resume rsync

How can I pause an rsync that's running? First time I did Ctrl+C to kill it and used the -P flag to run again. Is this prone to corrupt the current file transfer? Second time I simply put MacOS to ...
22
votes
1answer
14k views

Delete extraneous files from dest dir via rsync?

Say I have SRC 001.jpg 002.jpg 001.txt a.zip DEST hello.jpg rsync -d --delete SRC:{*.jpg,*.txt} DEST It doesn't remove hello.jpg from DEST, any idea how to archive this?
3
votes
1answer
1k views

Incremental system backup and restore w/ rsync or rdiff-backup issues

I've been reading about using rsync and rdiff-backup to make incremental backups of my entire Linux system. I am planning to practise that by setting up a Linux system, making some changes to it, ...
4
votes
2answers
891 views

How to use rsync with a remote remote host

I am a happy user of rsync -e ssh and use it to synchronize data between my machine and a remote host using rsync -avz -e ssh me@hostA:~/folder ~/folder And this did what I needed until now. I am ...
0
votes
1answer
76 views

How to backup all my data?

I need to backup all my data from a server (in 10 minutes), preferably keeping the symlinks. Any suggestions?
11
votes
6answers
10k views

tar + rsync + untar. Any speed benefit over just rsync?

I often find myself sending folders with 10K - 100K of files to a remote machine (within the same network on-campus). I was just wondering if there are reasons to believe that, tar + rsync + ...
8
votes
5answers
12k views

Syncing directories in both directions with rsync

I happen to know about rsyn, and I use rsync to sync between my mac and a linux server as follows. rsync -r -t -v MAC LINUX rsync -r -t -v LINUX MAC I expected to run the first command to sync, but ...
7
votes
1answer
1k views

Reusing ssh session for repeated rsync commands [duplicate]

Possible Duplicate: Using an already established SSH channel I have a remote server accessible via a chain of SSH proxies. The resulting channel is wide and fast enough, but setting it up ...
6
votes
2answers
3k views

How do I save changed files?

I have two folders: ORIGINAL/ ORIGINAL_AND_MY_CHANGES/ My friend has a copy of ORIGINAL/. I would like to generate MY_CHANGES.tgz -- it should contain only new/changed files from ...
5
votes
2answers
997 views

Can't share an ssh connection with rsync

In my .ssh/config file I have the following: Host xxx User yyy HostName zzzz ControlMaster auto ControlPath ~/.ssh/%r@%h:%p This works great for multiplexing my ssh connections (i.e. login once, ...
5
votes
3answers
385 views

Copying large tree from one machine to another, maintaining ownership

I am trying to copy a large folder structure between machines. I want to maintain the ownership/rights during the copy as it is not reasonable to 'fix' the privs afterwards. Therefore, I am using the ...
5
votes
2answers
563 views

Sync files from a mac to a flash drive - automatically?

I have a flash drive, let's name it FLASH. I want, when on my mac, when FLASH is plugged (and automatically mounted), execute a specific script and make ~/Documents to be automatically copied to ...
3
votes
1answer
261 views

Bash remote autocompletion : change the 'starting' directory

I'm regularly downloading files from a remote server, always from the same directory. So I wrote a custom function that I put in my bashrc: download_from_myserver () { for file in "$@" do ...
3
votes
1answer
7k views

how to tell rsync to preserve time stamp on files when source tree has a mounted point

Related to this question Short description of the problem: When source tree has a mounted point inside it, then time stamps on files inside that mounted point when copied to target tree are not ...
8
votes
3answers
2k views

Why does rsync fail to copy files from /sys in Linux?

I have a bash script which uses rsync to backup files in Archlinux. I noticed that rsync failed to copy a file from /sys, while cp worked just fine: # rsync /sys/class/net/enp3s1/address /tmp ...
7
votes
2answers
960 views

sync files recursively between two folders where files are less than 24 hours old

I want to find all the files under a directory which are within 24 hours then rsync those files with another server. There are some old files that I do not want to transfer, however if those old ...
6
votes
1answer
493 views

preserving extended attributes with cp/rsync

When copying with cp, the extended attributes are not preserved, even with explicit cp -a --preserve=all /source /dest or cp -a --preserve=xattr /source /dest The same is with rsync, i.e. ...
4
votes
3answers
2k views

Performing accurate snapshot and incremental backups to a remote server

I have a few Ubuntu (and potentially RHEL) servers I'd like to back up to a central backup server (via rsh/SSH). I'd like to do both snapshot and incremental backups. The goal is that if one of the ...
2
votes
0answers
156 views

easy rsync solution with file manager (thunar or nautilus or…)

A common tasks I teach new users in UNIX is how to make backups. Since most are not comfortable with the command line (CLI) and I want to have them make backups (more than forcing them to use the ...
2
votes
1answer
390 views

rsync an mpd playlist

An mpd playlist looks like this: syncrel.m3u Bob Dylan - The Times They Are A-Changin' [V0]/04. One Too Many Mornings.mp3 Bob Dylan - The Times They Are A-Changin' [V0]/01. The Times They Are ...
1
vote
2answers
97 views

How can i keep the mtime of files and directories in bash when I use rsync or cp? For use in Backup/Incremental Backup

I have a new NAS box and after looking through numerous backup solutions I've found doing it manually through PuTTy to work the best. After logging in to the box through PuTTy as root, I first need ...
6
votes
3answers
2k views

How do you compare two folders and copy the difference to a third folder?

You've got three folders: folder current, which contains your current files folder old, which contains an older version of the same files folder difference, which is just an empty folder How do ...
5
votes
1answer
10k views

Preserve the permissions with rsync

Let's say I have a file a.txt in LINUX with permission of 0664. When I use rsync to copy the file to my Mac with rsync -r -t -v LINUX MAC, the file's permission becomes 0644. How can I keep the ...
5
votes
2answers
18k views

Why do I get an “rsync: failed to set times on … : Operation not permitted (1)” error on Ubuntu 10.10 with SME Server 7.4? [duplicate]

I am trying to cron an rsync via ssh between two fileservers that are running SME Server 7.4 and Ubuntu 10.10, respectively. The first rsync worked just fine (for reasons that I do not know), but now, ...
3
votes
2answers
934 views

Rsyncing files with special characters to USB FAT32

I want to copy a large number of files to a USB drive that is formatted FAT32 (and cannot be formatted anything else, unfortunately). Many of these files have names with characters such as : and ? ...
3
votes
4answers
537 views

Most Efficient way to back up/sync large directories over SSH

I'm looking to back up some large directories on a Dedicated Server to another Server on a daily basis using minimal bandwidth RSync looks like its up to the task but I'm unsure of the best command ...
1
vote
1answer
133 views

Caching write changes on SSD to avoid HDD spin-up? ZFS, but (probably) not L2ARC

I have a home server, which - between other things - stores my documents, mail archives etc.. It uses a ZFS RAIDZ, based on spinning hdds. The server also runs an off-line IMAP service, synchronizing ...
1
vote
1answer
834 views

rsync command to backup home tree to another disk

I want to make sure I am using the correct rsync command on Linux. I do not want to run an rsync and end up losing data as I am new to Linux and I have no backup now. On Linux Mint, I want to backup ...
1
vote
1answer
307 views

How to let rsync additionally store an differential changelog in another directory?

I'm using rsync --link-dir to obtain daily snapshots with little space usage due to the hardlinking. It would however be nice to also have a directory that, while mirroring the original structure, ...
0
votes
2answers
164 views

How to detect particular system call called or not in a whole workflow?

EDIT No. 1 My task is mirroring , i.e., copying updated data from master server to all mirrors, by using rsync and rsh. But during rsync and rsh, I found some delay. My thinking is , the reason for ...