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
9 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 ...
1
vote
1answer
11 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
35 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
0answers
20 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
1answer
35 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 ...
0
votes
1answer
18 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 ...
1
vote
1answer
36 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
25 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
9 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 ...
0
votes
1answer
26 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 ...
1
vote
1answer
28 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 ...
0
votes
2answers
39 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
62 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
20 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 ...
0
votes
2answers
30 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 ...
3
votes
4answers
67 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 ...
1
vote
1answer
40 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
1answer
25 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 ...
1
vote
0answers
15 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 ...
0
votes
1answer
22 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 ...
0
votes
1answer
34 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
30 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
50 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
28 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
42 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" ...
2
votes
2answers
29 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, ...
3
votes
1answer
47 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
42 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
46 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
0answers
48 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
34 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 ...
0
votes
0answers
38 views

rsync and scp hang inside the bash script but run at the command line

I'm trying to execute scp and rsync commands inside of a bash script. The following happens when I run the bash script: scp -o StrictHostKeyChecking=no /tmp/foo 'user@xxx.xx.xx.xxx:/tmp/foo' ...
3
votes
0answers
46 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
2answers
51 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 ...
0
votes
1answer
26 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
35 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: ...
1
vote
3answers
78 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 ...
0
votes
1answer
43 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) ...
5
votes
1answer
26 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
32 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
28 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
47 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 ...
0
votes
1answer
21 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
24 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
93 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 ...
1
vote
4answers
229 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 ...
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
0answers
41 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 ...