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

3
votes
1answer
640 views

Export a m3u playlist to a directory in order they appear in the playlist

There is a way to rsync a m3u playlist into a destination directory. How can I process the list and number the output so it orders the files to match the playlist order? For example the m3u: ...
3
votes
1answer
487 views

Rsync ssh include & exclude

Here is my current rsync shell script upload.sh SOURCEDIR=/Users/thomas/sites/dreamhost/ DESTDIR=******@reggi.com:/home/thomasreggi/sites/ ##rsync -avzL --delete --include '*/' ...
3
votes
2answers
1k views

rsync pattern copy: dotfiles

I followed the advice given in the question Rsync filter: copying one pattern only to setup a command line I need to backup only the dotfiles .inF* Yet with the command: rsync -av --include='.inF*' ...
3
votes
1answer
852 views

Is there any way to rsync absolute symlinks alone?

I want to sync a big folder hierarchy between two machines. I want to copy the contents of the symlinks if they are absolute, for eg it points to /some/folder/someFile I want to retain the symlinks if ...
3
votes
1answer
398 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 ...
3
votes
1answer
297 views

Why does this exclude pattern for rsync give different results when the source directory has a trailing slash?

When I do something like rsync -a --exclude=/e/garbage /e /dest the exclusion works, but with rsync -a --exclude=/e/garbage /e/ /dest/e it doesn't. I'm using version 3.0.7 protocol version 30 ...
3
votes
1answer
147 views

Snapshot large changing files

At home I have the following backup scheme: All machines daily rsync to the servers $FULL_COPY directory. The server takes snapshots of that directory daily (also weekly/monthly), keeping at most X ...
3
votes
4answers
589 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 ...
3
votes
1answer
248 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
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
3answers
1k views

rsync and write permissions at the target

I always wondered why rsync tries to transfer a file to a remote location where it has read/execute permissions for the target dir, but no write permissions to create the actual destination file. This ...
3
votes
1answer
1k views

How to recursively synchronize file timestamps across servers?

Suppose I run an rsync command to mirror a server, but forget to supply the -t option. The mirror will now have different timestamps to the original. What is the easiest way to fix this, without ...
3
votes
2answers
130 views

transfer a file to remote dir only if doesn't exist without replacing

I'm using CentOS linux. In one line cmd, that returns 0 if success, non-0 if failure, I need: Transfer a file to a remote server. Don't transfer the file if filename exists in remote server ...
3
votes
3answers
2k 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: ...
2
votes
3answers
351 views

How do you fire a sequence of commands at the command tool?

I had a previous question (deleted it) and I still don't understand why it is so hard to understand what I'm trying to ask, but I'll try once again and more clearly. So I'm copying over several ...
2
votes
3answers
753 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 ...
2
votes
2answers
2k views

How to copy large files over the network

I need to copy large files over the network, but I am not sure about the command line to use for it. I have been using rsync, but I feel maybe I could zip the files first? I am a Unix beginner, so ...
2
votes
2answers
238 views

rsync: does it uses invisible configuration files?

I've a question about rsync command in unix. Does it save some configuration invisible files into the directories ? How does it know which files need to be added or not ? Or is just checking file by ...
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 ...
2
votes
1answer
162 views

No password prompt when using rsync remotely?

I have a bash script that executes rsync transfers to a remote location, and every time I execute the script I get asked for a password. Is there a way to avoid this? This is the command I use: ...
2
votes
4answers
79 views

Why would I use a rsync mirror?

Most Linux distributions offer mirrors that use rsync. I know that rsync is best used on mirrors because it only copies the delta between the local file and the remote one. What benefits do I get as ...
2
votes
3answers
741 views

Filtering paths to a specific depth

I'm using rsync and the flags -nPaAXz ~/ to check which files are going to be copied. This is far too verbose to make any sense of. How could I filter the output so I view the list of files/folders ...
2
votes
2answers
2k views

Specify identity file (id_rsa) with rsync

I need to make periodic backups of a directory on a remote server which is a virtual machine hosted by a research organisation. They mandate that access to VMs is through ssh keys, which is all good, ...
2
votes
2answers
145 views

Basic rsync command for bit-identical copies

As far as I undstand, the following command: sudo rsync --delete -azvr /home/oshiro/Desktop/source/ /home/oshiro/Desktop/destination Is this all I need to create a simple synchronisation of files ...
2
votes
1answer
207 views

ssh/scp works but rsync just constantly says “no”

Hi I have a windows 2003 server that I need to back up onto a linux client so I install cygwin on the Win2k3. On the Win2k3 I have enabled ssh, scp but (because the Win2k3 server uses an customised ...
2
votes
3answers
91 views

Get files on remote copy but not local

I have a folder. I have one copy of this folder locally and one on a server. I edited my local folder as I wanted and then rsync it to the server. Is there any way of comparing those two copies, ...
2
votes
1answer
174 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. ...
2
votes
1answer
42 views

Using rsync to copy from local to remote server with cronjob, asking for password

I want to copy files from a local machine to a remote machine. I have the command all set up and it looks like this: rsync -a project root@123.456.789.0:~ However, when running this command, I'm ...
2
votes
1answer
35 views

Is rsync really bidirectional or more unidirectional?

So I understand that rsync works by using a checksum algorithm that updates files according to file size and date. But isn't this synchronization dependent on how source and destination are called? ...
2
votes
2answers
560 views

Meaning of Crossing filesystem boundaries, --one-file-system, etc

I'm planning to use rsnapshot to backup my whole Linux system, though I'm confused by -x option (same of one_fs in rsnapshot.conf). The man page says: -x one filesystem, don't cross partitions ...
2
votes
2answers
110 views

Do files not copied matter when using rsync?

I have used rsync to back up my / directory to an external hard drive, using this command in user (not su) mode (about 200,000 files copied in one hour and forty minutes) and it seemed to finish ...
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 ...
2
votes
2answers
1k views

Sync local files to remote git repository

I have my git repository on a linux located on the company server. I ssh into my linux machine and edit files there. Problem This method is great until I have a good connection to the server. in ...
2
votes
3answers
1k views

Decreasing hard drive sync time with Unison

I'm using Unison to synchronize my music collection to a few different sources, namely a couple computers over SSH and a hard drive. One thing I've noticed is that SSH updates are incredibly fast in ...
2
votes
1answer
1k views

Rsync protocol name full path,not a module

Is it possible to name the full path to source directory in rsync command instead of the name of the module. For example: rsync -av rsync://10.171.73.23/home/user/work/tests . instead of : ...
2
votes
1answer
46 views

rsync to copy files which has changed

I need to copy some files from a particular directory to a different location on a daily basis. I want to copy the changes only, so planning to use rsync. These files follows the following naming ...
2
votes
2answers
48 views

how to filteri by asterisk or similar expression by rsync in zsh

I have a lot of files named like: /var/log/foo/2014-07-06-01.log ... /var/log/foo/2014-07-20-04.log Everyday I have several log files and I want to download specified day's log files: $ rsync ...
2
votes
1answer
252 views

Incremental file back up by date

Is there any backup tool that supports partial back up by date? What I mean is that I have some small drives such as on a laptop that can't hold a full copy of all the files on an external 2TB drive. ...
2
votes
2answers
73 views

Replace all files except one with rsync

I'm currently using rsync as follows rsync -az --delete ... What option can I use with rsync to replace all destination files that already exist except for one specific file that should not be ...
2
votes
2answers
5k views

rsync ignore owner, group, time, and perms

I want to know how use rsync for sync to folders recursive but I only need to update the new files or the updated files (only the content not the owner, group or timestamp) and I want to delete the ...
2
votes
1answer
879 views

rsync failing to choose the correct target directory

I'm trying to write a short shell script which also handles copying a file called webcam.jpg into a date coded subdirectory. I'm using rsync for this as it automatically creates a directory if it ...
2
votes
1answer
178 views

Rsync over Rsync via cronjob

I have a local server which Rsync's from some computers on the LAN. It's a part of a backup solution. This Rsync runs via cronjob twice a day. Occationally people add gigantic amounts of data, like a ...
2
votes
1answer
209 views

`mv` has failed because of insufficient disk space, what now?

I have tried to move a folder A from partition a to partition b as folder B with mv. Now the target file system was not big enough for all the data (I know I should have checked this first). Anyway, ...
2
votes
1answer
574 views

rsync and backup and changing timezone

I back up my pictures from my camera using rsync, using: rsync -vzrtl --progress --stats --timeout=0 host destination Now I was in a different timezone when I did my first backup then I moved to a ...
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 ...
2
votes
1answer
218 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 ...
2
votes
2answers
217 views

Want to rsync some files after they've been sedded

I would like to rsync some HTML files to a webserver that are in production form. To get them in production form I have to trivially insert a ".production" string in a script tag. I can do this with ...
2
votes
1answer
51 views

Which config files in /etc folder must be unique for each computer?

I am doing a restoration test of backup files on a computer. Without putting much thought into it, I did an rsync to replace all files in /etc folder with the ones in the backup. Then, I realize I ...
2
votes
2answers
57 views

Preserve ownership with rsync and nonexistent user

I have two computers with the same user, me@Home and me@Work. I usually kept their folders synced by bringing Work home (it's a laptop) and rsyncing over LAN. However, now I'm not bringing Work home ...
2
votes
1answer
29 views

skipping copying contents of sub directories using rsync

rsync -avzm -e ssh /path/to/src/folder/ /path/to/dest/folder --include=*/ --include=*/config.xml --exclude=* I need to copy files(say config.xml) that are in the 2nd level directories using rsync. ...