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

5
votes
1answer
11k 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 ...
1
vote
1answer
31 views

how to rsync certain directory and files - problem

I have looked at previous posts but cannot get this working. I want to just rsync all the server03 directories and any sub directories of them to a new server. I tried the following but it was picking ...
13
votes
8answers
12k views

How to rsync files between two remotes?

I would like to transfer files between two remote hosts using on local shell, but it seems rsync doesn't support synchronisation if two remotes are specified as follow: $ rsync -vuar host1:/var/www ...
0
votes
0answers
118 views

Rsync freezes while copying

I'm having trouble using rsync to back-up my system locally. I'm using this short guide from the arch wiki. Here's the modified one-liner I'm using : rsync -aAX --debug=all5 --delete --modify-window=...
3
votes
1answer
41 views

Recursive move (`mv -rn`, like `cp -rn`), a move that will only move not present files

Context I have user uploaded content that needs to be backed up. The content is over 3 separate servers at /var/www/domain/media/ (on each server it is in the same place). The backup is a NFS ...
1
vote
1answer
33 views

rsync wants to copy files that already exist in the destination directory

I am trying the following command using rsync to copy only files that are new have a different size rsync -niav --size-only /home/me/source/Electronica /media/externalDrive/dest/Electronica ...
2
votes
0answers
38 views

Why do two directories differ after syncing with rsync?

I copied some directories on one removable drive to another removable one using rsync. The command used was: rsync -avPS <source> <destination> rsync doesn't report any errors. After ...
2
votes
1answer
2k views

rsync specific directories

Below are the directories of my directory structure. I only want to run rsync on the content under the archive directory of any subdirectory and exclude everything else: ./ ap/ ap/aploader/ ap/...
0
votes
1answer
26 views

To rsync -rtvuc in Two Filesystems?

I am newbie with rsync. Systems OS_X_Extended/Source/ FAT32/Destination/ I want to rsync everything from OSX extended to Fat32 directory and delete those files/directories which I deleted from ...
2
votes
1answer
40 views

Rsync files, excluding a list

I am working on setting up cron jobs,and I am new to this. The purpose is to analyze the new data that is generated.The data is present in directories. I want to sync only the latest data/that has ...
2
votes
0answers
27 views

How to make rsync delete files/folders on backup server that no longer exist on main server? [closed]

I am using this command to backup a main server to a backup server. rsync -avz --delete-after --exclude-from '/usr/order/exclude.txt' --password-file=/usr/prod/masterpass.rsync /usr/order/ order@...
1
vote
2answers
176 views

rsync --delete did not remove file in destination while with ssh

On my RHEL6 pair of servers, I tested the rsync from server-1 to Server-2 with SSH. Everything was good as expected. However, when I moved a file under A directory, A/x.file to B/ of /home/user on ...
1
vote
2answers
58 views

rsync on AIX gives popt The module has an invalid magic number error

[SERVER:root:/home/user:] rsync -avz --delete ... Could not load program rsync: Dependent module /opt/freeware/lib/libpopt.a(libpopt.so.0) could not be loaded. The module has an invalid magic ...
1
vote
1answer
786 views

How rsync --compare-dest works

I know there's a very similar question here, but the accepted answer has nothing to do with rsync, and the OP's solution doesn't apply in my case. I'm trying to get all the updates from a CentOS ...
1
vote
2answers
19 views

Rsync rotating logfiles

currently I have an troublesome problem. I needed quite a time for identifying this problem. Anyhow that's what I'm doing: I collect log files with rsync from multiple servers to archive them. Its ...
2
votes
3answers
6k views

Parallelise rsync using GNU Parallel

I have been using a rsync script to synchronize data at one host with the data at another host. The data has numerous small-sized files that contribute to almost 1.2TB. In order to sync those files, ...
1
vote
1answer
43 views

rsync fails/hangs when copying from a Linux ext4 to a FreeBSD ZFS (via SSH)

When I try to copy directories from an ext4 on Linux to a ZFS on FreeBSD (via SSH), rsync immediately fails without copying anything: # rsync -haxHAX /mnt/source/ root@lethe:/mnt/dest/ -vvv opening ...
3
votes
2answers
40 views

How to copy just timestamps, or “I should have used cp -p”

I foolishly copied a very large amount of data using cp -r. Looking at it now, I've realized that this means I lost my file modification times. I should have used cp -rp. My directory structure and ...
2
votes
1answer
78 views

Transfer Size limit for SCP, SFTP, RSYNC?

Is there a maximum size limit to the size of collective size of the files that are to be transferred in one go for the above protocol. My intent is to know if for example after 1 GB any of these ...
3
votes
0answers
86 views

Sync with Onedrive

I would like to sync (and backup) my /home directory with OneDrive. I found some great terminal clients, where you can even mount your directory, but nowhere did I found an option to this with some ...
2
votes
2answers
19k views

rsync: error starting client-server protocol

I have rsyncd running on both the systems . When I am trying to check the connection it giving me following error: From host2: user@host2#rsync username@host1::share password: [password] @...
0
votes
1answer
19 views

help with rsync (with samba) and ignoring perm/time/group/owner

so this is what I'm trying to use: rsync -DHilrv --delete --progress /my-local-drive/ /my-network-share/ I've run the command above. After the operation was complete, I ran it again but this time I ...
8
votes
1answer
2k views

Understanding the output of --info=progress2 from rsync

If I run rsync with --info=progress2, I get an output like 105.45M 13% 602.83kB/s 0:02:50 (xfr#495, ir-chk=1020/3825) But what do the single numbers mean? I haven't found a matching entry ...
1
vote
2answers
330 views

lsyncd: Is it possible to sync individual files from a list?

I want to sync certain files from one linux system to another using lsyncd. The files are not confined to one directory, neither do I want all files from a directory. Specifically I'm trying to make ...
1
vote
1answer
46 views

How to rsync files between two remotes with an explicit port and different usernames?

I want to rsync files between two remote servers. I tried to follow the next solution of @roaima: http://unix.stackexchange.com/a/183516/137526, but I need a more delicate solution, for two reasons: ...
1
vote
2answers
83 views

Differences between rsync on remote and rsync local on mounted sshfs?

Is there any difference if I run rsync with remote host (ssh://) as source/destination or use local path to share mounted directory via sshfs? Could there be differences be with regards to security ...
0
votes
1answer
54 views

Rsync --dry-run not showing correct sent bytes

I'm trying to use rsyn with the --dry-run option to see if there is enough space for the real synchronization. For test purposes I'm trying to synchronize one directory Documents. The size of the ...
4
votes
1answer
227 views

How do you give a developer group access to apache, MySQL, php and the webroot?

We have 3 web designers that are currently logging in to our server via root to configure apache and setup websites. I have very basic linux knowledge (I'm a web designer) and have created users and ...
0
votes
1answer
32 views

rsync options to transfer big tgz files to zfs filesystem and snapshot later

I need transfer everyday a lot of compressed tar files from a hosting server to a zfs data storage server. The standard way to rsync transfer seems to not zfs snapshot friendly. Each snapshot keep ...
0
votes
2answers
43 views

One shell script to perform commands locally and remotely

So, here's the problem. I have a file on a remote machine available only to root, and a private-key-only no-root SSH access(I do have sudo though). I need to copy that file to the local machine, and ...
1
vote
2answers
80 views

rsync transfers unmodified files, why? [closed]

I have three servers A,B,C. A and B share a drive via nfs on A, and C is the UAT server where all changes have been made. After a successful change it transferred to server A via rsync. Earlier it was ...
3
votes
1answer
23 views

how do I exclude a specific folder on the destination when using rsync?

consider the following example: /source /source/folder1 /source/folder2 /source/folder3 /destination /destination/folder2 /destination/folder3 /destination/folder3/mytestfolder1 /...
1
vote
1answer
44 views

Migrating mounts with identical permissions not working

I have two mounts /mount1 and /mount2. I ran the command: rsync -azrt /mount1/* /mount2/ to clone everything from /mount1 to /mount2. I then altered the /etc/fstab (see below) to remove /mount1 ...
0
votes
2answers
41 views

NTFS compression and RSync

I currently have a hard drive that I backup using RSync. I do weekly; monthly snapshots. I would like to compress some of my hard drive using NTFS compression. How would that affect my future ...
5
votes
2answers
877 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 ...
38
votes
4answers
49k 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, ...
3
votes
4answers
85 views

du --exclude directories - is this possible?

How to calculate disk usage of a file tree but excluding directories. I'd like to have something like: du --exclude type d I use rsync to mirror/backup part of my home dir and I want to double ...
11
votes
5answers
10k views

How do you compare two folders and copy the difference to a third folder?

You've got three folders: folder current, which contains your current files folder old, which contains an older version of the same files folder difference, which is just an empty folder How do ...
0
votes
1answer
29 views

rsync wants to resend files after a recent run

I am using rsync to keep two directories in sync. Specifically I ran: rsync -avz /path/to/src /path/to/dest After this command finished, I ran: rsync --dry-run -avz /path/to/src /path/to/dest ...
0
votes
1answer
30 views

How shall I rsync changes in directory structure without actually recopying

I had the folder structure as below ./a/b/c_file synced to the destination ./a/b/c_file Now I changed the structure in source as ./a/d/e/c_file. But rsync seems to be delete the old directory ...
1
vote
0answers
21 views

How to reconfigure grub on a backed up arch linux on a USB flash disk

i managed to back up my arch linux suing rsync : # rsync -aAXv --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} / /run/media/username/archlinux edited ...
1
vote
1answer
2k 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 ...
5
votes
2answers
6k 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 ...
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
891 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
89 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
57 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=...