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
1answer
2k views

rsync error: Time value of file truncated on receiver

I run the following rsync command to back up my data. I am on Ubuntu 12.04. rsync -rt --delete --links --exclude-from '/home/john/rsync-exclude.txt' /media/data/ server:/backup/data The data ...
0
votes
1answer
903 views

rsync “unknown module” error [duplicate]

I use rsync for backing up the data from servers to a backup machine. For that purpose I start bash scripts via cronjobs but one of them is not working. I searched through the web to see if there is a ...
0
votes
1answer
36 views

rsync files that are in remote directory's subfolder

I have an old copy of the remote folder (FD) user@IP:/folder1/folder2/folder3/FD/ which has subfolders fol1, fol2, ..., user@IP:/folder1/folder2/folder3/FD/ |__fol1 ...
1
vote
2answers
100 views

How to tell rsync not to delete some folders at destination?

So I use pelican for writing my blog and I upload the whole thing using rsync. OK. But I use also Let's Encrypt and therefor need the repository .well-known preserved at the root of my website. So ...
3
votes
2answers
71 views

How to make ssh account capabele to only sshfs and rsync?

I'd like to make ssh account that is capable of doing two things: mounting (can be one) directory via sshfs performing backup&recovery of his/her desired directories using rsync I would love ...
0
votes
1answer
41 views

Automating Backup and Shutdown

I want to backup my entire internal hard drive files into an external hardrive and execute system shutdown once the backup is finished. The reason why I want to do that is to execute the backup during ...
0
votes
1answer
58 views

rsync over ssh without typing the password each time [duplicate]

I got a bash script to synchronize data between two computers. It works fine but I have to type my password every time the rsync command is called. #!/bin/bash sourceIP="192.168.178.128" sourceUser=...
71
votes
6answers
71k views

scp without replacing existing files in the destination

How do I copy an entire directory into a directory of the same name without replacing the content in the destination directory? (instead, I would like to add to the contents of the destination folder)
11
votes
1answer
30k 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 ...
3
votes
2answers
1k 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 rsync....
3
votes
2answers
58 views

RAID1 vs rsync - security?

I'm setting up a NAS-Server using an Odroid XU4 and two 2TB HDDs. Which setup would be more secure (lower risk of losing data / easier recovery): setup a RAID1 with mdadm have two separate devices, ...
1
vote
2answers
174 views

Looking for rsync+ssh-based method as alternative to Dropbox

I want to set up a personal (i.e. one user) Dropbox alternative using rsync, to keep some directories synchronized over several Unix hosts. Since only one user (namely, me) will be changing the ...
3
votes
1answer
107 views

Stopping rsync without leaving temporary files behind

When copying files from directory A to B with rsync using $ rsync -a --backup --suffix=.$(date +"%Y%m%d%H%M%S") A/ B/ a file called filename in A will temporarily be called something on the form ....
1
vote
1answer
116 views

Allow the restricted rsync (rrsync) script for arbitrary directories with authorized_keys

Automating Backups I would like to implement a backup solution with copies data from various directories from a Web server (WebServer) to a local backup server (BackupServer). The backup should run ...
1
vote
2answers
60 views

Backup with rsnapshot only if there are changes

I use rsnapshot to make regular backups of my systems' filesystems to a remote server. (For those familiar with rsync but less used to rsnapshot here is a brief introduction to its workings. A backup ...
1
vote
4answers
238 views

Bash command help to “search and replace” file in changing directory tree

The Scenario: I've built a collection of files for research in a central repository on my server. I'm continually curating the repo changing the directory's tree structure by renaming and moving ...
19
votes
5answers
19k views

view stdout for another pts [duplicate]

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 ...
1
vote
0answers
57 views

Does a file move operation over SAMBA preserve the inode number?

If I have a directory exposed over a SAMBA share and a user, from either a Linux or Windows system, moves a file from one place to another on that share, does SAMBA know to ask the operating system ...
0
votes
1answer
36 views

Invoke rsync with specific defaults for current folder?

I have a local folder which I want to synchronize with a remote folder through SSH, and I'd like to do it through rsync. I would always call rsync with the same arguments, and same source and ...
0
votes
1answer
36 views

Conditions sent over ssh are performed locally, not remotely [duplicate]

So I am trying to do something like this: ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i \ /home/backupboy/.ssh/id_rsa user@server.com \ "[[ $(ls -1 /mnt/dir | wc -l) -gt 4 ]]...
34
votes
4answers
35k 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 ...
3
votes
0answers
66 views

Speed up / avoid calculation of rsync file lists

I use rsync 3.1.1 to keep in sync two discs, one of which is on the network and mounted as a samba share on /mnt/ROUTER_WD_2TB/. This is the source, with a speed of 30-40MB/s maximum due to network ...
1
vote
0answers
4k views

@ERROR: chdir failed but directory exists

I have a D-Link DNS-320 and I've installed FFP and I'm trying to get rsync running on it. So far I've got the daemon up and running and I've defined a module in my rsyncd.conf like so: max ...
1
vote
2answers
78 views

Trying to run rsync between two remote servers via reverse port forwarding with ssh key

I'm trying to run an rsync between two servers. I'm basing things off of this post: How to rsync files between two remotes? What I find missing is how to facilitate the rsync (via ssh) when a key (...
4
votes
1answer
430 views

rsync 3.1.0 is creating empty backup directories

I just noticed that there is a discrepancy between version 3.0.9 and 3.1.0 of rsync. Running the command $ rsync -a --delete --backup --backup-dir=../old source/ dest/ with version 3.1.0 gives the ...
0
votes
1answer
30 views

Copy files if directory does not exist on target

Can you copy files (using rsync ideally but any scriptable tool considered) from server A to server B skipping directories that already exist on the target, and any files they contain? Server A FEED -...
1
vote
1answer
51 views

How to set up permissions on external hard drive in order to use it to backup using rsync?

So I have recently installed arch linux, and I was looking into a good way to back up my data. Looking at the wiki, I decided I followed this gude: https://wiki.archlinux.org/index.php/...
1
vote
3answers
122 views

rsync to remote server without password [duplicate]

I seem to be having a little issue with connecting to a remote server, to rsync my backups what i have done so far run ssh-keygen created public and private key run ssh-copy-id -i my.key.pub ...
15
votes
3answers
30k 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 ...
0
votes
1answer
65 views

Using --delete option with rsync

We are using the following rsync command in a script to copy files from source to destination. rsync -av --exclude 'share/web/sessions/' --rsync-path "sudo rsync" /sdata/ 172.31.X.X:/sdata/ &>...
0
votes
0answers
28 views

How to rsync files from machine A to machine C via machine B? [duplicate]

I need to rsync files from machine A which is not accessible from my machine (machine C) and it can only be accessed from machine B. How do I rsync files via another machine? files (machine A) ---...
3
votes
2answers
1k views

Deduplication tool for rsync?

Is there a Linux / Unix tool that does de-duplication similar to the way Veeam does it before compressing and sending a backup with rsync to a mirrored location?
5
votes
1answer
38 views

prevent backup from running in parallel

In my script /usr/local/bin/backup, that I call every hour from /etc/crontab, I use rsync to copy data to an off-site server. That all worked fine, even in cases where we had somewhat more new data ...
1
vote
0answers
54 views

rsync + chmod only selected files

I'm trying to sync specific cron files between 2 servers and change the permissions for them. However, the command I am trying is also changing the permissions on the main directory. Command used: ...
0
votes
2answers
50 views

What is the meaning of the option formatting in the rsync man page?

If you run man rsync and go to the options summary, there are alot of long form (i.e. --long-option) style options which are either an alias of, or grouped with a short form option. e.g. OPTIONS ...
0
votes
0answers
50 views

mysterious out-of-space message from rsync

I am mystified by the out-of-space message from rsync - I have enough freespace on the destination to hold everything, and I blv enough also on --vg-root as well. This doesn't seem to be the same ...
15
votes
6answers
23k 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 + ...
0
votes
1answer
26 views

how to mirror a samba folder into an ext4 folder via rsync?

I have a FreeBSD file server and I also have just setup a xUbuntu 15.10 desktop. The desktop was previously running OS X but I backed up my files to the FreeBSD server before installing xUbuntu. ...
0
votes
2answers
27 views

CentOS rsync directory contents but not directory?

I'm trying to get the contents of /deploy/ to populate to /panda/ but it doesn't seem to work. I searched on here and found instruction to leave the trailing slashes; however each time I run it a ...
1
vote
3answers
147 views

File System Permissions: User who can backup all files

I am setting up an automated backup job for some computers on my network. There is a server that will, daily, run an rsync command to backup each of the other computers. I'd like the user that the ...
0
votes
0answers
32 views

rsync doesn't delete files from ~/tmp

I'm trying to sync my home folder, named "kjs", with another folder (my usb drive mounted in /mnt/USB1). I use the following command: rsync -aAXv --delete /home/kjs/ /mnt/USB1/kjs This works mostly ...
0
votes
2answers
47 views

rsync to USB flash drive always transferring all data

When rsyncing a directory to a freshly plugged-in external USB flash drive, via rsync -av /source/ /dest/ all files get transferred (i.e. rewritten) despite no changes in the files. Note that ...
2
votes
2answers
45 views

How can Bash determine if it is running due to an rsync over ssh?

I need my Bash init scripts to be able to distinguish between having been invoked like ssh me@host /some/complicated/operation, and having been invoked like rsync -e ssh /src me@host:/dest In the ...
1
vote
2answers
1k views

How to rsync just the current folder?

I want to sync some files from a remote server to my local computer. How can I make rsync to just copy the files with a certain file extension in the directory but no subdirectories? I assumed this ...
21
votes
8answers
20k views

How to rsync over ssh when directory names have spaces

I am new to Linux and am trying to rsync from one server to another. The servers have the same directory structure but I am having trouble getting the remotes server to properly recognize the path ...
0
votes
1answer
90 views

Screen/system hangs when using scp or rsync + ssh in local network

First, I noticed frequent hang ups with the mouse when using scp in local network. I checked RAM usage, but free -m showed me about 33% usage without buffers/caches. (I have 8G RAM.) The CPU usage was ...
10
votes
2answers
19k 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 ...
0
votes
0answers
42 views

problem during rsync backup to a ntfs network share

I'm running a machine with Linux 3.16.0-4-686-pae #1 SMP Debian 3.16.7-ckt20-1+deb8u3 (2016-01-17) i686 GNU/Linux, during a rsync backup to a ntfs network share (succesfully mounted with: mount -t ...
0
votes
0answers
23 views

Rsync update only destination files where file size is zero

I am using rsync to download the images from ftp server every night. Some of the images get copied but have zero size on it with the exact same name as on source but empty . how can I tell to run the ...
0
votes
0answers
100 views

rsync fails when ssh can't open /dev/tty

I've got a script that needs to rsync some files to a remote machine. The rsync command looks like this: rsync -avz -e 'ssh -vv -o IdentitiesOnly=yes -i /data/credentials/rsync2.key' \ --rsync-...