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
2answers
2k views

Synchronizing same files with different filenames using rsync [duplicate]

I have a directory ~/music that contains all my music files and a directory /media/backup/music that I wish to synchronize with the first one using rsync. Initially, I did a rsync -a ~/music ...
0
votes
1answer
401 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 ...
3
votes
4answers
534 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
0answers
212 views

Cannot get rsync to keep source file ownership, tried many tricks

I'm trying to rsync some directories from a webserver running RHEL5 to a system running Xubuntu. I have rsync, ssh, and keys setup for the machines. I've tried everything so that when i backup from ...
6
votes
1answer
512 views

rsync: skip files for which I don't have permissions

I'm using rsync -rlptD to copy a directory from another user. There are a few files (I have no way of knowing these in advance) which I don't have permission to copy. Is there a way have rsync ignore ...
2
votes
1answer
3k views

rsync all directories that start with a specific digit

I have directory loaded with thousands of sub directories: /home/tmp/ 1 12 123 1234 2345 234 3456 345 34 ...
5
votes
1answer
211 views

Can I exclude /run from my backup scheme?

I have written a rsync-based system backup for my Linux system. The aim is to be able to redeploy the system entirely from the saves, so I don't only backup homedirs. I have excluded a few top-level ...
2
votes
1answer
276 views

Unison can't synchronize Dropbox configuration (socket files)

I'm using Unison to synchronize my home across several computers, and I've addressed everything but this. The Dropbox configuration is partially skipped, and as a result Dropbox thinks there is no ...
3
votes
2answers
145 views

Any ideas to simplify the awkward rsync expression below?

Here is expression: rsync -avz --progress -e "ssh -i /where/is/my/id_dsa" vivek@some.host:`ssh -i /where/is/my/id_dsa vivek@some.host "find /remote/source/dir -type f -name '*.sql' | sort -nr | head ...
3
votes
1answer
301 views

rsync: how to relocate absolute symlinks?

I've pored over the rsync manpage as well as on several related questions here on serverfault. I've played with -R and -L and -l options, but no luck. Here is the question: when sending a dir from ...
6
votes
2answers
233 views

Rsync different behavior when syncing folders HDD-HDD or HDD-Ext HD

When I sync two folders between two HDDs, rsync only lists the changes made at the end. However if I sync a folder between a HDD and an external HD, while the sync is running it is listing each ...
1
vote
1answer
624 views

rsync to SFTP while moving completed uploads to another folder

I'm going to be moving a lot of data (30GB) to a server which is split up into multiple 200MB tar.gz files. This is going to take time, and I'm going to need to stop and start my computer again during ...
3
votes
1answer
236 views

Pausing rsync via bash script?

Is there a way to pause rsync via command line, if it transfers data for over X minutes? I'm working on using it as a backup and would like it to pause every once in a while to prevent the hard disks ...
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 ...
1
vote
0answers
121 views

Use rsync with closed files only

I am interested in using rsync with the --remove-source-files option. I am planning on pointing it to a directory, with a command like: rsync -avm --remove-source-files --include='*.dat' -f 'hide,! ...
1
vote
1answer
830 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
0answers
78 views

Is there any rsync parameter for show at the end the changes made?

I have a script that sync (mirror mode) four folders between two disks. While it is running it shows the directory where it is in this very moment, and at the end it shows bytes sent, speed, etc. I'm ...
2
votes
2answers
2k views

how to move (not copy) files from one server to another?

I want to move files from server1 to server2. A producer on server1 will keep generating the files, and a consumer on server2 will keep processing them. I can copy files using the following shell ...
4
votes
2answers
909 views

Restrict file access to append only

I have a directory with log files and I'm putting logs from script launched by users into them. Logging with syslog doesn't seem possible in this case. (non-daemon rsync) I want the users to have ...
2
votes
3answers
2k 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 ...
4
votes
2answers
181 views

Is there a way to put comments in an rsync --files-from file?

I have a file that rsync uses as --files-from: dir1 dir2 dir3 I want to be able to put comments above each dir entry like that: # my dir1 comment dir1 #dir2 comment dir2 #yet another comment ...
3
votes
3answers
331 views

How to diff two folders by inodes

I'm currently using a script to backup files on my computer. In a nutshell, it works like this: rsync --link-dest=$FOLDER/current $SOURCE $DESTINATION However, I think that my script may be ...
3
votes
1answer
5k views

rsync compare directories?

Is it possible to compare two directories with rsync and only print the differences? There's a dry-run option, but when I increase verbosity to a certain level, every file compared is shown. ls -alR ...
2
votes
1answer
889 views

How to rsync to different directory?

Here is what I want to achieve: Run Rsync to compare two directories recursively like this: rsync -r /source /target but don't actually rsync between the directories. I want the resulting ...
2
votes
2answers
1k views

Using rsync to sync two directories on server and localhost, but size is different

I'm using rsync to sync a directory from server to localhost: rsync -avz --delete ./Stuff user@host:/Stuff This all works fine, but how come when I type 'du -s' in both the server and the localhost ...
5
votes
1answer
3k views

Rsync — Itemized List of Changes

I've learned that with the -i option, I can get rsync to list all the changes it makes. I've been using it along with the -n or --dry-run options so that I can always learn about all expected changes ...
6
votes
2answers
5k views

Rsync except .svn folders and their sub-contents?

Dealing with a subversion repo and a new user that didn't quite understand how it worked. Long story short, since their local structure was messed up due to copying random .svn folders about, I did ...
2
votes
1answer
192 views

rsync redoing files?

I found rsync redoing files that have no modification. One file is >1gb so it takes a bit to do. My command is below. I'm running the command via ssh. The filesystem in question is a NTFS usb HDD to a ...
1
vote
2answers
442 views

Synchronize the files from One folder of a Server to other

I need a script in which Files of One server will be copied to other folder of another server ONLY AND ONLY IF the file on SOURCE SERVER file doesn't exist on DESTINATION SERVER. Further Detail ...
2
votes
3answers
691 views

rsync server/daemon security

I have a NAS (Netgear Readynas NV+) at home and a linux (Arch) box at work that is always on. The linux box is already running an ssh server/daemon and the NAS is already running an rsync ...
1
vote
0answers
102 views

Running rsync as a daemon for a local transfer

My coworker is trying to talk me into running rsync as a daemon on my EM server. I'm currently using rsync to copy a NFS share on my storage cluster to USB external drives so the data can be reviewed ...
5
votes
1answer
196 views

How can I synchronize all PDFs from one directory with Dropbox?

I want to synchronize all the PDFs from one directory (my Zotero library) to Dropbox. Finally, I want to have a list of all the PDFs, not the directory names. I successfully synchronized all my PDFs ...
4
votes
2answers
300 views

light weight disk based backup solution

Currently I am using Dirvish to backup a handful remote machines, both Linux and Windows to local disks. But Dirvish hasn't seen any updates for many years and it has a couple of small annoyances ...
1
vote
1answer
521 views

how to download linux kernel using rsync

I tried git clone, but it's too slow, how to do it with rsync? is it faster? If I do rsync rsync://rsync.kernel.org/pub/ it just shows: drwxr-sr-x 4096 2011/11/16 04:40:02 kernel
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 ...
1
vote
1answer
306 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, ...
3
votes
3answers
1k views

rsync list of files in sub-directories to remote server and delete extraneous

I haven't been able to find the answer to this one. I have tried all kinds of combinations of --include, --exclude, -r, --delete-excluded, and source directory. This is what I'm trying to accomplish: ...
5
votes
1answer
339 views

How to merge multiple WebDAV accounts for backup?

I use davfs, aufs, rsync: sudo mount -t davfs -o uid=wd,gid=wd,dir_mode=777,rw https://wd1.wd.wd/ /mnt/webdav1 sudo mount -t davfs -o uid=wd,gid=wd,dir_mode=777,rw https://wd1.wd.wd/ /mnt/webdav2 ...
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 ...
2
votes
1answer
2k views

Adjusting rsync TCP timeout

I'm using rsync in my own C++ program by issueing the command system("rsync -rauzvq root@host:/folder"); I use this for keeping multiple systems in sync. Now I have the problem that when a remote ...
4
votes
2answers
542 views

How to rsync a chroot without breaking symlinks?

I'd like to rsync (backup) a chroot environment from outside the chroot. For that I first make a lvm snapshot of the chroot volume and then run rsync on that. The only problem with this approach: ...
2
votes
1answer
4k views

How to force rsync to overwrite read-only archive files?

I'm using rsync to copy some source code. The copied code must not be modified at the destination place by my mistake while code editing. So I set --chmod=u-w flag to make it read-only after copying. ...
2
votes
1answer
170 views

Backing Up to a Compressed Archive on Linux

How would you go about backing up just some files and subdirectories of a given directory to a compressed archive so that the tree structure could then easily be recreated from that archive. ...
5
votes
2answers
984 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, ...
0
votes
1answer
98 views

Creating the first backup

I heard that rsync isn't the best one when creating the first backup in terms of performance. Instead it is the best for the later backups. So I wonder what are some better commands for creating the ...
3
votes
1answer
1k views

What do you filter / exclude list when doing backup with rsync? [closed]

I'm trying to build a comprehensive filter / exclude file, to prevent backuping stuff that doesn't make sense do backup, such as temporary / cache data or easily recreatable files. I would appreciate ...
3
votes
2answers
6k 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 ...
3
votes
1answer
2k views

How to examine the fast output of rsync

I am using rsync for backup about 100GB files and directories. My command is sudo rsync -azvv /home/path/folder1/ /home/path/folder2 However, the output for each file goes up so quickly and there ...
4
votes
2answers
3k views

How can I send single file to multiple remote sites at the same time?

Can scp be used to send a single file to multiple remote servers at the same time? If so, how? If not, what's the alternative?
3
votes
3answers
3k views

How do I backup via rsync to a remote machine, preserving permissions and ownership?

Drive A is 2TB in a closet at home. Drive B is 2TB in my office at work. I'd like drive A to be the one I use regularly and to have rsync mirror A to B nightly/weekly. The problem I have with this ...