Tagged Questions

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

0
votes
1answer
186 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 ...
8
votes
3answers
524 views

rsync most recent x GB

I'm looking for a command/script to allow the most recently modified files (up to) 10GB be copied to another computer. So if there are 4 files 4 GB each, only 2 of them should be transferred by the ...
3
votes
5answers
2k 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
473 views

Rsync over ssh tunnel - using gateway server

Environment: ---------- ---------- /| ------------ | Work | | Gateway| | | | cluster | |Station |--------------------------------| ...
1
vote
0answers
131 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
338 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
2answers
1k views

How to use `~/.ssh/config` setting for each server by `rsync`

I'm now using rsync with -e 'ssh -p 10022' option to specify the port. I have already ssh setting in ~/.ssh/config. Host myvps HostName example.com User ironsand Port 10022 Can I use this ...
3
votes
3answers
646 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
395 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 ...
4
votes
1answer
1k views

Using setfacl to create recursive permissions for Apache with rsync

I have a Dokuwiki installation locally, which I regularly sync to my server with rsync. I'm also going to give a friend of mine an ssh account, and host his public Dokuwiki installation. However, I'm ...
0
votes
1answer
218 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% ...
13
votes
5answers
9k views

rsync all files of remote machine over SSH without root user?

I have this command to backup a remote machine. The problem is that I need root rights to read and copy all files. I have no root user enabled for security reasons and use sudo the Ubuntu way. Would I ...
1
vote
0answers
54 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
7k 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
960 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 ...
14
votes
4answers
973 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.
8
votes
1answer
2k 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
518 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 ...
2
votes
1answer
40 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 ...
1
vote
1answer
82 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
46 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
763 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 ...
1
vote
2answers
199 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. ...
1
vote
1answer
179 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
805 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 ...
2
votes
2answers
112 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 ...
1
vote
1answer
953 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 ...
1
vote
2answers
82 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 ...
0
votes
1answer
113 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
70 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 ...
2
votes
2answers
173 views

How do I only copy files to a destination that exist in the folder from the source, everything else should not be copied

How can I copy files from source to destination, where in all the files existing in destination (with directory structure), only should be copied from the source, overwritten in the destination. Rest ...
1
vote
0answers
2k views

Occasional rsync error code 12 “Connection reset by peer (104)” from cron task that runs every 20 minutes

I have a script run by cron that rsync's various folders to a server in a different city to publish files to websites. In case it matters, the source server is within the corporate firewall and the ...
1
vote
1answer
406 views

why isn't rsync copying files to the server

I'm following along with a Railscast that teaches how to set up Chef solo. It uses two interesting terminal commands that I had never seen before, only one of which I can get to work. When I do scp ...
0
votes
1answer
598 views

rsync “Permission denied” despite ownership

I just rsync'd a bunch of files, from a Windows box running cygwin sshd, to a CentOS 6.4 box. I ran rsync -e sshd... on CentOS to do this. Then I plugged in a USB drive on the CentOS box, formatted ...
3
votes
4answers
1k views

rsync over ssh tunnel

---------- /| /| ------------ | Home | | | | | | Work | | |--------| |---------------------| ...
3
votes
2answers
2k views

rsync exclude directory not working

I am running Fedora 17 64-bit and the rsync --exclude=/home/ben/<dir> is not working as expected. I am trying to rsync my home directory to a thumb drive, but I want to exclude certainly ...
1
vote
2answers
152 views

mlbackup / rsync / hard links data size

I am new to mlbackup/rsync and the concept of hard links, so I am a little confused after creating a backup data set via mlbackup. So here's the scenario: I am backing up "folder A" to "folder B". ...
1
vote
3answers
769 views

rsync: samba vs ftp for backup

I need to back up ~0.5 TB of files (about 600,000 of them) from a Windows Server 2003 machine to a CentOS 6.4 machine across a 100MB network, and update them once a night. The backup script would be ...
1
vote
1answer
123 views

Rsync is skipping encrypted (but mounted) home directory

I have two user-home-directories in /home/, /home/user1 and /home/user2, whereas user1 is encrypted (using ecryptfs) and user2 is not. If I use rsync like this (invoked as user1 which is a sudo user) ...
1
vote
2answers
209 views

Is there a way to prevent emerge --sync from deleting files from the portage tree?

Although PORTAGE_RSYNC_OPTS, a make.conf option, allows one to change the rsync options but removing --delete from it causes emerge to fail. I think with it remarking about missing md5-cache entries ...
2
votes
1answer
909 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 ...
1
vote
1answer
69 views

Non-persistent differencing file

I have a large file (5-10 GB) and want to access this file in a special file system with the following conditions/features: There is a single process that reads and write on the file. When the ...
0
votes
1answer
668 views

rsync remote to local automatic backup

Because all my work is stored on a remote server I would like to auto backup my server monthly and weekly. My server is running Centos 5.5 and while searching the web I'm found a tool named rsync. I ...
1
vote
3answers
461 views

rsync only subdirectories and content

I have a directory that contains a number of files and subdirectories. See below: baseDir bad1 bad2 subDir1 file1 subDir2 file1 I would like to rsync the contents of baseDir without ...
3
votes
1answer
233 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
8k views

force rsync to overwrite files at destination even if they're newer

I have an rsync backup script I run, which also restores files back where they came from when I ask. But if the files at the destination are newer than those in the backup when I try to restore, it ...
8
votes
2answers
2k views

Why does my rsync not allow block-size>128K?

Running rsync with a large* --block-size like this: rsync -avvz --rsh 'ssh -c arcfour' --block-size 1048576 --inplace --progress example.com:/big.file /big.file I get the following error: Invalid ...
0
votes
2answers
248 views

How to setup a rsync server and client?

I have worked on rsync for the whole afternoon. I have set a rsync server,but I don't know how to use it. I have two machines:66 and 12. 66 is the server,I want to back 66's data to 12,so I use ...