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

9
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 ...
1
vote
1answer
83 views

rsync only leaves partial files?

I am trying to copy files from my hard drive to a networked external disk (WDMyCloud). I have enabled the FTP access to the hard drive and mounted it to a local directory using curlftpf to a local ...
2
votes
2answers
71 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 ...
4
votes
2answers
305 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 ...
5
votes
2answers
9k views

Asking rsync to delete files on the receiving side that don't exist on the sending side, with exceptions on the receiving side

I have read these threads: rsync --delete --files-from=list / dest/ does not delete unwanted files Delete extraneous files from dest dir via rsync? But, as far as I can tell (maybe I am missing ...
2
votes
2answers
4k 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 ...
1
vote
1answer
332 views

How does rsync patch files when there is a difference in the middle?

I know how rsync works. My doubt is how does rsync patches the parts which are different between source and destination file. After calculating the block which is different, it sends that part to ...
2
votes
0answers
168 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 ...
1
vote
0answers
29 views

How to efficiently create (read-only) both a snapshot and a diffshot at the same time?

I use rsync to regularly create snapshots of some directories via PAR="-aP --chmod=a-w --no-owner" # Create diffshot rsync $PAR --compare-dest=$CURRENT_SNAPSHOT $SOURCE/ $DEST.changeset.incomplete ...
3
votes
4answers
438 views

How to prepare files for rsync on a case insensitive filesystem?

I am transferring a large number of files on a HFS+ filesystem. The files are currently on ext2 partitions. I have conflicts due to case insensitivity of the target partition (HFS+). I want to ...
2
votes
1answer
233 views

Permission issues when doing system backup using rsync [duplicate]

I'm trying to backup my linux system (arch linux on a laptop) to a remote computer on the same network using ssh (or NFS). I use rsync extensively to backup my /home directory to the remote computer ...
2
votes
1answer
541 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
113 views

why do I get no output from zenity in shell script under gnome-schedule

I am using Fedora Linux 12, and intend to update to an up-to-date version soon. To prepare for this I have made a full backup on an external drive. I want to keep this backup up to date, using rsync, ...
0
votes
1answer
292 views

Cannot install rsync (unable to create…Input/output error)

How do I resolve the following error to get rsync installed? unable to create '/usr/bin/rsync.dpkg-new' (while processing './usr/bin/rsync'): Input/output error Full log follows: ...
3
votes
1answer
139 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 ...
0
votes
1answer
165 views

Periodically sync local folders using rsync (no symlinks!)

I am using Dropbox to have an online backup of some data. However I want to encrypt my data before uploading it to Dropbox. Therefore I have created a TrueCrypt container and I am using rsync to ...
3
votes
5answers
1k views

How can a filesystem be copied exactly as is?

I have a file system for a device I am programming that I would like to make an exact copy of. Ideally I would like this copy to be identical to the folder that it was copied from. I have tried using ...
3
votes
1answer
434 views

Rsync over ssh tunnel - using gateway server

Environment: ---------- ---------- /| ------------ | Work | | Gateway| | | | cluster | |Station |--------------------------------| ...
1
vote
0answers
118 views

Can I install a sync completion hook with rsync daemon?

Like hooks in svn or git, can I install a server-side hook script for rsync daemon? For sync completion event. I am using FreeBSD9/rsyncd.
2
votes
0answers
239 views

How to use rsync to backup large files by either appending or replacing

I am using rsync to backup some large files regularly: rsync --archive --update --append-verify [source] [destination] Most of the times, the files increase in size (like a log file), but sometimes ...
1
vote
3answers
3k views

Using cygwin and rsync — “password file must not be other-accessible”

I've finally got an old computer of mine running as a backup server with Ubuntu 11.10. I'm planning on using it to backup my Windows 7 machine weekly using rsync. I've got cygwin installed, and rsync ...
3
votes
3answers
566 views

Rsync problem with cron and no problem manually

I have a backup.sh file that launch an rsync command. This rsync is to backup my dedicated server on a RaspberryPi running raspbian. (I use keychain so I don't need to type any password etc ...) The ...
3
votes
3answers
310 views

How to avoid unnecessary deletion and recopying of moved folders when using rsync? [duplicate]

I've read that rsync cannot detect moved folders, and simply delete and recopy them into the new folder structure. Since the only change I did to my master copy is the simple introduction of a top ...
0
votes
1answer
169 views

Get a clean list of files transferred from rsync

I'm trying to get an itemized list of files transferred by rsync. Using the -i and --out-format options, I'm instead ending up with output that looks like this: 3HMP1MO_001.tif 974.68K 100% ...
0
votes
0answers
126 views

rsync flock not deleting flocktmp.lock file?

Recently, I changed my rsync flock command, and now it has stopped deleting the flock file when the sync is done. Can anyone see the error in my command? That would really help me out! flock -xn ...
14
votes
4answers
961 views

Why not always use rsync?

I wanted to ask is there any reason not to use rsync for everything and abandon cp? I wasn't aware of rsync and now I don't know why cp is ever needed.
1
vote
0answers
53 views

looking for name of a userspace tool for disk/network caching? [closed]

I remember seeing a blog post a month back that used a tool in the command which acted like a user space caching tool to buffer/cache reads and writes in RAM to overcome disk or network contention. I ...
4
votes
2answers
6k views

rsync is very slow (factor 8 to 10) compared to cp on copying files from nfs-share to local dir

I have a freshly installed ubuntu-server which is ought to be the new backup-server for our VM-storage. The server has 4 nics, 2 of them 10Gbit (in fact an intel x540-T2 with the newest driver ...
3
votes
1answer
852 views

sudo askpass: ask from other tty

Context I want to setup rsync backups of my server, so I run the following command rsync -r -e ssh --rsync-path="sudo rsync" rsyncuser@example.com:/ /backup/ Ideally, that command would ask my ...
2
votes
1answer
39 views

Can I set defaults for rsync in non daemon mode?

Can I set defaults for rsync in non daemon mode? I know the daemon mode has this configuration file: /etc/rsyncd.conf But I typically use the non daemon version in this sort of manner: rsync -avzcO ...
6
votes
1answer
1k views

Is using rsync while source is being updated safe?

Is it safe to use rsync when the source filesystem is mounted and writeable, assuming that it may very well be modified while rsync is running? I presume that under race conditions I may not get the ...
2
votes
2answers
447 views

How can I add an array of arguments inside my rsync call inside a script?

I want to copy a folder to another location, while excluding some specific files Here is my current script: #!/bin/bash if [ -n "$2" ] then source=$(readlink -f $1) destination=$(readlink ...
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 ...
1
vote
1answer
73 views

Finding out whether rsync modified target?

My program copies/synchronizes several directories from source to target, each using rsync. For each directory, if the version in target is not identical to source, and thus rsync modifies the target, ...
1
vote
2answers
41 views

Reverse rysnc with multiple sources

I'm working on some backup script right now. To speed the process up I used rsync with all folders to be backed up. (Something like this: rysnc -a --delete --progress $folder1 $folder2 $folder3 ...
0
votes
1answer
733 views

Rsync from multiple folders to one

Is it safe to have multiple folders Rsync simultaneously into one? Each of the source folders contains a subset of the destination folder, and everybody just syncs into a master destination folder. I ...
1
vote
0answers
14 views

Combining rsync --files-from with --delete [duplicate]

I'm doing rsync --files-from=find-output.txt ~/backup/ (simplified). I'm trying to add --delete, to make rsync delete files in backup that are not included in the file list, but it does not delete ...
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 ...
1
vote
2answers
183 views

Delete files that exist in the source with rsync

I have a folder on server "A" called ./delete. I want to delete everything in the folder ./stuff on server "B" that exists in the ./delete folder on server "A". Its like the reverse of rsync. ...
4
votes
3answers
2k views

`cp -al` snapshot whose hard links get directed to a new file when edited

I am trying to take snapshots of a massive folder regularly. I have read here: http://www.mikerubel.org/computers/rsync_snapshots/#Incremental that cp -al takes a snapshot of a folder by simply ...
1
vote
1answer
152 views

Remote PC accessible by ssh, scp/rsync not working (anymore) [closed]

I've got a remote machine running Ubuntu 12.04 LTS. I've used it lots of times to log in to via ssh and to copy files to via scp and rsync. Today I was able to log in via ssh, but I'm not able to ...
3
votes
1answer
611 views

find and rysnc?

I want to be able to search for files over 14 days and over 10k and than rsync those found files to a destination. Is there a way to combine these two commands? find ./ -mtime +14 -size +10k rsync ...
3
votes
1answer
2k views

suppress rsync warning: some files vanished before they could be transferred

I get loads of warnings when backing up my running Postfix and Courier server files like: file has vanished: /var/kunden/mail/username/name@mymail.de/tmp/courier.lock How do I suppress those ...
1
vote
2answers
78 views

Rsync and take name/path changes into account [duplicate]

I maintain a large folder, and this folder is regularly rsync'ed to another folder far away. Sometimes I change a name on my local folder, and then the next time I rsync to the remote folder the ...
2
votes
2answers
109 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 ...
3
votes
1answer
211 views

How do I backup a non-empty directory and preserve metadata like permissions/user-group ownership/time file was modified?

I used rsync for creating a backup copy: bash-3.2$ rsync -tvrog /export/home/kent/Scripts /export/home/kent/TEST_Scripts_rsync With these options: Options: -v, --verbose ...
1
vote
1answer
714 views

Why rsync attempts to copy file that is already up-to-date?

I have two same files, on local machine and on remote one. Their sizes are equal, and file on local machine is newer than on remote one - but rsync still attempts to copy the file. I invoke rsync as ...
0
votes
1answer
102 views

rsnapshot LVM without root

I'd like to cron a local backup to a locally mounted USB drive. I'm using rsnapshot and want it to back up an LVM snapshot onto the USB drive. But, unless I run the cron as root it complains that I ...
4
votes
1answer
6k views

Move files and delete directories with rsync?

Recently I needed to delete a large number of files (over 1 million) and I read that doing: rsync -av --delete `mktemp -d`/ ~/source && rmdir ~/source Was one of the most optimized ways to ...
3
votes
1answer
66 views

Edge cases in filesystem operations during backup and file copy

I have a question about file access in Linux that I cannot sum it up completely. Consider that I have a home directory that I backup it using rsync triggered via cron. My home directory is on an EXT4 ...