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
15 views

moving a linux to another device

I am working on an embedded linux ip-camera. I need to have a backup of our Linux for testing and repairing cameras. I have tested multiple options like using tar and rsync , but it does not work and ...
1
vote
3answers
880 views

Smarter filetransfers than rsync? [closed]

I have a large file (2-3 GB, binary, undocumented format) that I use on two different computers (normally I use it on a desktop system but when I travel I put it on my laptop). I use rsync to transfer ...
5
votes
3answers
9k views

rsync mkstemp failed Invalid argument (22) with davfs mount of Box.com cloud

I mounted Box.com cloud storage using davfs according to these instructions. I mounted my Box.com account under /home/me/Cloud/Box I can access the mounted filesystem via Dolphin as well as via the ...
13
votes
3answers
15k 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
0answers
33 views

Proper way to create a compressed, rsyncable mirror of a directory?

I would like to create a compressed mirror of some directories in such a way that it can be rsynced again, both from the original destination and to a remote destination. I can do it inefficiently in ...
4
votes
3answers
54 views

Is there a way to send custom arguments to an rsync server?

I have a backup server that clients use with rsync over SSH. The server is configured to run a custom shell script that wraps the invocation of the rsync server side. The client side is unaware of ...
1
vote
1answer
21 views

rsync to backup and delete remote files [on hold]

I have to cleanup some space on the server where we have 23 GB of audio files stored in data directory. I want to take the backup of that audio recordings on my local system and then delete those ...
1
vote
0answers
21 views

Rsync link-dest - unsure if its creating hard links

This is my first attempt at a shell script. I'm simply trying to make incremental copies of certain folders from a server to another server using Rsync, but using the link-dest option to create ...
3
votes
4answers
635 views

How to diff two folders by inodes

I'm currently using a script to backup files on my computer. In a nutshell, it works like this: rsync --link-dest=$FOLDER/current $SOURCE $DESTINATION However, I think that my script may be ...
2
votes
1answer
54 views

How can I mount encrypted folder via SSH in Synology NAS?

Now I mount an encrypted folder: open browser and login to NAS gui click Control panel -> Shared Folder > Encryption > Mount enter key after folder is mounted: rsync -ah --progress --delete /path/*...
0
votes
2answers
367 views

How does rsync encode filenames?

By using strace on the active rsync process, I can see output like: read(4, "9\0\0\7\1\10\0\1\10\0\1\10\0\1\10\0\1\10\0\1\10\0\1\10\0\1\10\0\1\10\0\1"..., 16384) = 61 write(3, "\357\265mD0e\233:\337\...
-3
votes
0answers
31 views

When running bash /cygdrive/ in front of Windows path issue

On my Windows Visual Studio project javing build file to build project. but when it runs this line it stopping execution rsync -av --exclude="*.mdb" --exclude="*.pdb" ./Services/...
5
votes
2answers
53 views

Can you scp, sftp, or rsync, a pipe?

I want to tar and send a ~700GiB directory to a remote drive I don't control. I don't have the HDD space locally to create the tarball and then copy that over. The remote is also protected by rssh - ...
0
votes
1answer
34 views

Rsync (No need to copy the time stamp)

With rsync command I want only copy/sync changed files/folder to the destination folder. I had some issue with Rsync-like whenever am executing the rsync command am copied along with the time stamp as ...
3
votes
0answers
45 views

rsync --verbose always shows directory structure when syncing to NTFS volume

When you run rsync with the -v option, for example rsync -av "/from/this/dir/" "/to/this/dir" ... you will get a list of what was updated/deleted etc. So, the first run will give you a bunch of ...
1
vote
0answers
49 views

BTRFS send only new files without deleting anything on remote

I'm looking into replacing rsync with BTRFS tools, but I'm not sure if what I want to do is even possible. I have a small local volume and a large remote volume used for archiving. Files will be ...
4
votes
1answer
45 views

sudo rsync -a does not preserve mtime

In order to debug my repeatedly crashing Ubuntu 16.04 I want to backup /var/log from my HDD to an external USB medium. I am running an live OS (Ubuntu 16.04) and using the --archive option: $ sudo ...
24
votes
5answers
27k views

Is there ever a reason to use scp instead of rsync?

Is there a reason to use scp instead of rsync? I can see no reason for using scp ever again, rsync does everything that scp does, with more safety (can preserve symlinks etc).
3
votes
1answer
34 views

Fit timestamps of multiple files/folders to existing ones

I've copied a large directory to another location (through a network). I needed to preserve all the timestamps (especially ctime and mtime). However somewhere in the process I screwed things up. (I ...
3
votes
2answers
48 views

rsync claims different files, but diff does not?

I have a file both locally and on server. I first try running rsync in "dry-run" mode, to see if there are some differences between the files: $ rsync -aP --dry-run USER@192.168.0.55:/home/dir . USER@...
0
votes
1answer
20 views

Rsync: Prioritise files and folders

I'm copying a large directory from one computer to another using rsync. Is there a way to tell rsync I would like it to copy some files and / or folders first, before others so that I can start ...
0
votes
1answer
45 views

Can rsync be used to make only hard links, not copies? [duplicate]

I'm working on a system to automatically back up my computer using rsync and the Google Drive app (I have a Macintosh computer). (This app creates a directory whose contents are saved to the Google ...
39
votes
4answers
28k views

Does rsync verify files copied between two local drives?

I want to make a fresh new copy of a large number of files from one local drive to another. I've read that rsync does a checksum comparison of files when sending them to a remote machine over a ...
0
votes
1answer
43 views

Expect Rsync with Double quotes

Below is my code: #!/usr/bin/expect -f set timeout -1 spawn rsync -arvz -e 'ssh -p 1690' --protect-args --progress /home/pappu/ 'backup@xx.xx.xx.xx:/volume1/56 - Backup Server/pappu' expect "password:...
1
vote
2answers
658 views

How can i keep the mtime of files and directories when I use rsync or cp? For use in Backup/Incremental Backup

I have a new NAS box and after looking through numerous backup solutions I've found doing it manually through PuTTy to work the best. After logging in to the box through PuTTy as root, I first need ...
1
vote
1answer
33 views

copy_only_missing? - Copy from /A to /C only paths missing on /B and /C - concise way

I'd like to copy from /A to /C only paths missing on /B and /C. (Please assume those are paths, and can represent also remote locations e.g. mounted via sshfs) I wonder... Is there more concise way ...
7
votes
5answers
10k views

Does compression option -z with rsync speed up backup

In rsync, -z will compress file data during the transfer. If I understand correctly, -z compress files before transfer and then decompress them after transfer. Does the time reduced during ...
0
votes
1answer
40 views

Rsync with destination owner and permission possible?

Source server have one owner is root. ----/home/sub1/test1 ----/home/sub2/test1 My local machine is destination. ----/home/sub1/test1 owner by user1 ----/home/sub2/test1 owner by user2 How I ...
0
votes
1answer
62 views

rsync complication on sync

We have 2 Web Server node Primary and secondary, if the primary is down by any reason secondary will act as Prim. Now if we talk about the codes we which is on both the host. we should be ...
1
vote
3answers
3k views

Unexplained rsync disconnect

I'm rsyncing in to a shared web host from a Yosemite client. I've set up my authorized keys and can ssh in just fine, and scp files over no problem. When I rsync with the -n (dry-run) option, it ...
0
votes
1answer
41 views

Rsync to copy specific subfolders and files to new directory

Original path, RootFolderI: RootFolderI/FolderA/Subfolder1/Subsub1/JPG1.jpg -> want this jpg RootFolderI/FolderA/Subfolder2/Subsub1/JPG2.jpg -> want this jpg RootFolderI/FolderA/Subfolder2/...
2
votes
1answer
85 views

why rsync does not do delta transfer

I have binary file which has approx 77MB: nupic@nupic-virtualbox:~/VboxSharedFolder/experiments/sync/exp2$ ls -lah src/ total 77M drwxrwx--- 1 root vboxsf 0 Jun 21 13:31 . drwxrwx--- 1 root vboxsf ...
0
votes
0answers
35 views

Does changing your OS (fedora>OpenSuse) or FS (ext4>btrfs) “break” rsync?

I am using a rather simple script to do incremental backups of my laptop to my external HDD's, where the core line is probably the following: rsync -arbuv --delete --progress -exclude-from=/backup-...
0
votes
1answer
50 views

Using Rsync include and exclude options to include directory and subdirectory but exlude files in subdirectory

I'm wondering if my scenario can actually be handled with rsync. Rsync working fine between my local and my remote. htdocs/ folderswithfilesIneed/ somefilesandfolders.jpg afolder/ ...
14
votes
2answers
41k 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
0answers
19 views

flock command wont run through cron [duplicate]

I am trying to cron an rsync sync over ssh, but for some reason, as soon as I put the command in cron, it won't run. I don't know what is causing it to break, but it is certainly something related to ...
0
votes
2answers
65 views

rsync --link-dest not working as expected with symlinks

I'm using rsync to backup some of my files: rsync -aEN --delete --link-dest="$CURR/" "$SOURCE/" "$NEW/" The --link-dest option works fine with most files, but not with symlinks. When I was writing a ...
23
votes
4answers
29k views

Using rsync to move (not copy) files between directories?

I have been using rsync to copy files for some time. My understanding is that rsync is faster than cp when some of the files to transfer are already in the destination directory, transferring only the ...
0
votes
1answer
19 views

Download with rsync through bastion/jumper, without .ssh/config changes

I'd like to download a file from server C, through server B (bastion) to my local server A. Normally I'd handle the mess in ssh/config with ProxyCommand, but in this case I can't. Can we make a one-...
1
vote
1answer
19 views

Rsync files-from problem

rsync -av --files-from=list.txt A/* B/ Inside the list.txt I have A/text1.txt When executing the command, I get an error refering me to the man page, does anyone know why? Please see the rsync(1)...
1
vote
0answers
34 views

After restoring a backup my permissions seem to be borked

I made a complete backup of the system with "rsync -aAXv", and set up my encryption. After restoring everything, and booting up and trying to login, openbox didn't want to start, and "startx" didn't ...
0
votes
1answer
37 views

Use of Verbose in a cron job

I'm busy setting up a back-up script to run on my Pi using rsync. I see that a number of people use the -v option in their cron jobs. Why? It's going to be run as root, and not in a terminal where ...
7
votes
0answers
123 views

Synchronising millions of files between two Linux servers

I have a server which exports a directory containing ~7 million files (mostly images) from its local disk to network clients via NFS. I need to add a second one for the sake of HA, and to keep it in ...
1
vote
3answers
49 views

rsync not overwriting newer files [closed]

Replication details: mkdir test && cd test mkdir folder && cd folder echo "#line1" > file rsync -a -I . .. echo "#line2" >> ../file rsync -a -I . .. Output: Content of ../...
21
votes
2answers
29k views

rsync compare directories?

Is it possible to compare two directories with rsync and only print the differences? There's a dry-run option, but when I increase verbosity to a certain level, every file compared is shown. ls -alR ...
1
vote
5answers
4k views

Save a list of files over SFTP to a text file

I have provided my own answer below. We have a number of bash scripts that work fine using SFTP, what I would like to do is to simply re-direct an ls or dir of a folder to a file on our SFTP Server.. ...
4
votes
2answers
318 views

SSH broken pipe, message authentication code incorrect

I have set up a Ubuntu server that I plan on using to backup my macbook air using rsync. But every time I use rsync, or even scp, the connection drops, with one of the following errors: ...
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 ...