Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [rsync]

rsync is a tool to efficiently copy directory hierarchies, locally or remotely, with powerful filters to decide what gets copied.

1
vote
0answers
11 views

rsync directories in to remote server

I would like to know how to sync directories with same owner, timestamp, group etc I tried below but it ask for my password and respective files/directories will be copied with my name. Please ...
3
votes
1answer
44 views

Why is rsync taking a long time on large files that already exist?

I made a backup of one of my computer's internal drives to an external. The next time I used rsync to sync the two drives, I noticed that large (40 + GB) files that weren't modified were still taking ...
1
vote
1answer
49 views

Does rsync completely overwrite files with different timestamps?

I've used a command similar to this to rsync files from macOS to Linux: rsync -avz <ip-address>:/Backup/ Backup/ The folder Backup/ was previously copied from the same machine using scp, with ...
0
votes
1answer
30 views

scp/rsync autocomplete works one way but not the other

I have two machines, laptop and server. Both of them source /etc/bash_completion in .bashrc. What works: server$ scp file laptop:~/stage/[tab][tab] server$ scp laptop:~/stage/[tab][tab] . server$ ...
1
vote
1answer
41 views

Run rsync only if target directory exists?

I have a secondary backup drive that is usually stored offsite, but sometimes mounted. I'd like to put something in a crontab that automatically clones my backup drive to the secondary backup if it's ...
1
vote
0answers
18 views

Unintentional bandwidth throttling — where else to look?

This is embarrassing, but I seem to have inadvertently set a persistent bandwidth throttle on SSH connections from my Ubuntu machine. When transferring files from a remote server via scp, sftp, or ...
0
votes
0answers
21 views

Efficient way to move data before rsync

I'm trying to migrate data to a replacement VM. In trying to speed up the transfer and reduce stress on the network pipe, I tried to tar and gzip the datadirs and transport across town, extract on the ...
1
vote
2answers
60 views

Create hardlinks instead of copying files with rsync

The following command finds recursively all files containing foo (but not bar) and preserves the directory structure in the target directory, for example if I have /path/to/2017/foo.ps and /path/to/...
1
vote
0answers
30 views

Linux file sync options

Looking for advice on best way of setting up file replication between two Linux servers running Ubuntu. I've previously used rsync, and csync2 in a clustering situation I ran previously. I know of ...
0
votes
3answers
51 views

Local Repo Update

I got a local repository in /var/www/html/centos/7 directory. In here, all rpm packages from centos are downloaded. I will create a crontab for updating my local repository every 1 week or sth. I ...
0
votes
1answer
20 views

How to rsync chronologically starting with the most recent files

I have the following directory structure item_1 item_12 item_33 ..etc.. Now I would like to start rsyncing from the most recent files and chronologically sync down the list. Or option 2: How to ...
0
votes
1answer
28 views

what is the right approach to copy folder content that include links

we have the following folders / links /files under /usr/hdp/2.6.0.3-8/zookeeper folder -rw-r--r--. 1 root root 794542 Apr 1 2017 zookeeper-3.4.6.2.6.0.3-8.jar drwxr-xr-x. 6 root root 4096 Mar 28 ...
1
vote
1answer
14 views

rsnapshot is not doing incremental backup

I recently installed rsnapshot and trying to get it to do incremental backups. Now, I run first "rsnapshot alpha" and it creates alpha.0. Folder is 8GB Then I add a 1 GB video file to the source ...
0
votes
1answer
40 views

ssh: Warning despite disabling strict host key checking

I am running an ansible task but this is more of an ssh issue; I execute an rsync command (from my localhost to a vagrant machine) as follows: command: "rsync -zaP -e 'ssh -p {{ ansible_port }} -o ...
1
vote
1answer
26 views

Can I use rsync to move a list of files in different directories to a remote sever without logging in more than once?

So, I'm trying to write a script to back up some various configuration files with my ssh fileserver, but I'm not sure the best way to go about this. It would be nice if I could just fill a file with ...
0
votes
1answer
36 views

Getting Rsnapshot permissions right

I've used rsync for years to keep a backup copy of my /home/User1 (Client1) on my Server1 (in a folder /mnt/Server1/Backup). These are not production machines. This folder is mounted on Client1 with ...
1
vote
2answers
88 views

Using rsync to preserve permissions only

I'm doing a NAS data migration from a Celerra NS960 to a Unity 500. I have an SMB/CIFS file system I synced using EMCOpy in Windows environment. It's also an NFS (multiprotocol) file system. I have ...
0
votes
0answers
15 views

Backuppc rsync occasionally hangs on remote

I am using Backuppc for backing up 7 Ubuntu 18.04 machines. These hosts are running the exact same setup and hardware. I am just backing up the htdocs folders and and the db dumps that are generated ...
0
votes
1answer
23 views

How to preserve file mode with rsync, except for setuid bits?

I run into a "Disk quota exceeded (122)" error if I use rsync -p <args> to copy files around. rsync -rlptD --chown username:org1 -- local/ /project/org1/ I would like to preserve source read ...
0
votes
1answer
62 views

How do I perform a full system backup on Debian Stretch using rsync?

I have compiled and installed Back In Time to perform automated, full, system backups of my desktop computer running Debian Stretch (kernel 4.90.0-8-amd64). Back In Time uses rsync under the hood. ...
1
vote
2answers
40 views

RSYNC exclude directory from destination path

I want to exclude folders which are already on a remote server (i.e. test/xyz) and I want to run rsync from my source server where I have test1/xyz folder so I don't want to overwrite xyz folder on ...
1
vote
2answers
38 views

rsync thinks the source host is a command

So I was trying to download a file from a remote host connected with SSH to a local folder on my Mac using rsync. The command I used is: $ rsync --progress -avz -e "ssh root@1.2.3.4 -i ~/.ssh/keyFile"...
2
votes
2answers
103 views
+100

Clarification Needed: Using Rsync to Move /usr

Context I recently migrated Windows 10 and Gentoo to 2 separate 250 GB SSD's and left my old traditional SATA HDD Drives in to use for Storage. I put Users on a HDD for Windows during a new ...
0
votes
1answer
21 views

How to preserve user and group permissions using rsync?

I'm doing a NAS migration with mutltiprotocol shares. What rsync switches do I use to copy over UNIX user and group permissions? Also what are the standard switches usually used in an rsync copy?
1
vote
2answers
32 views

Using rsync to delete selected patterns, matches all files

I mean to use rsync to remove certain files (for Efficiently delete large directory containing thousands of files), in this case given to a shell script as patterns in the command line. So far, this ...
0
votes
0answers
33 views

Scripted “find & rsync” without parent folder

I have written a small "find & rsync"-script to copy photos and videos from the last month & different folders, to a new folder, with three sub-folders. The script looks like this: #!/bin/...
0
votes
1answer
52 views

How to read only the last line of a live input stream in a while read loop

I have a very simple bash script that synchronizes data to a USB key as soon as new files appear. It is poorly written but it works, however I want to minimize CPU time so I used sleep but since I use ...
0
votes
1answer
37 views

How do I specify a per directory rule in rsync?

In the INCLUDE/EXCLUDE PATTERN RULES section of the man page, it says the following: if the pattern starts with a / then it is anchored to a particular spot in the hierarchy of files, otherwise it ...
0
votes
1answer
28 views

rsync with remove extra lines in destination

First of all I give my directory structure in detail below. src 1 1_1.txt test_line1 1_2.txt test_line1 2 2_1.txt test_line1 2_2.txt ...
1
vote
1answer
187 views

Scheduled folder backup

I'm looking for how to automatically backup a user's home directory in CentOs 7 to a remote host or NAS or just to ~/.snapshot. In some Linux setups, I have seen a .snapshot folder in the user's home ...
2
votes
1answer
36 views

rsync - specify negative exclusion (not inclusion)

I'm trying to tell rsync to ONLY include .org (or better yet, .org AND .py files). However, I have to do this through the --exclude= option, not the --include= option. Reason: I'm using BackInTime ...
0
votes
0answers
50 views

rsync's progress2 does not reach 100%

When you give --info=name0,progress2 option to rsync, you can see the total progress. In my environment, such a command "finally" gives me the result like below. (I executed the command three times ...
0
votes
0answers
52 views

rsync or scp | /usr/bin and /usr/sbin

I have the same version of Linux Redhat installed on two machines. One is physical and the other one is virtual. I would like to know how to rsync or scp the paths /usr/sbin and /usr/bin from the ...
0
votes
0answers
31 views

rsync --compare-dest not working

I have two local copies of a website (mysite and mysite2) and I need to upload the files missing from mysite2 with FTP to a remote server. So I want to use rsync --compare-dest to generate a third ...
0
votes
1answer
38 views

Unison: always use 'copyprog' for updates

I am using Unison to synchronize files between several clients. Each client is identical, meaning that whenever one client updates a certain file, all other clients must be updated consequently. The ...
1
vote
0answers
34 views

rsync does not preserve timestamp after failure

I use the following option to synchronize to a btrs remote server. rsync -aRrzu --inplace --delete -vv --files-from XXX When the rsync fail (Ctr+C, very long network outage, ...) file that being ...
2
votes
1answer
96 views

rsync --list-only output not as expected

The rsync option --list-only appears to give output that isn't quite right. Here are my test files: ~/src$ ls lrwxrwxrwx 1 michael michael 23 Sep 5 09:19 far_symlink -> /home/michael/Documents -...
2
votes
1answer
39 views

Rsync creating diff directories

What I want: I'm trying to back up many files to S3 each day. I want to compress these into archives daily so that each individual backup doesn't cost as much. Therefore, I want a backup system ...
1
vote
1answer
28 views

Use rsync to mirror source for website deployment, but not delete selected files in destination

I have been working on this for several days and no matter what I do I can't get it to work. I've read practically every Q&A on StackExchange network about rsync but still not found the answer. ...
2
votes
1answer
41 views

Using Rsync for blind copy

I've read the manpage for rsync and I don't believe this capability exists, but I wanted to confirm with someone who has extensive experience with rsync to make sure I'm not missing something (I'm on ...
3
votes
1answer
38 views

Can rsync pick up where an interrupted cp left off?

If I use cp to copy a very large file over the course of several hours and decide to stop the operation, can rsync be used to complete the operation at a later point without needeing to re-write data?
-2
votes
1answer
23 views

Copy specific sub-directory and keep directory tree structure

In my working directory, I have 3 directories that each has 3 sub directories named exactly the same. Files are located in the sub directories. I would like to copy a specific sub directory (and ...
0
votes
1answer
39 views

rsync files-from unable to handle filename with subfolder?

I need to sync remotes files to local with the following command: rsync -schavzP --stats --files-from=./filelist.txt -e "ssh -p 22" remoteuser@1.2.3.4:/home/somewhere/ . While filelist.txt contains ...
0
votes
3answers
73 views

Using rsync to backup to external USB drive of type msdos?

I am trying to use rsync (on Linux Mint) to backup to an external USB drive of type msdos (as shown in the drive properties), using a command: rsync -av ~/Documents/rsynctest/ /media/myname/PC/...
2
votes
1answer
78 views

Overwrite symlink with original file

I have a directory with some symlink file, for example: /home/user/symlink/$(*symlink_file_name1*).mkv /home/user/symlink/$(*symlink_file_name2*).mkv And I have another directory with the original ...
0
votes
1answer
16 views

SIGSTOPping a rsync

As far as I understood it, when I send SIGSTOP to a process it will not get scheduled from this point on, but the network stack keeps operating. Will the rsync server try to reach the client and ...
1
vote
2answers
47 views

Stop rsync scheduled task race condition (large directory, small time interval)

Platform information: OpenBSD 6.2 amd64 $ rsync --version rsync version 3.1.2 protocol version 31 I'm trying to sync a large directory (4TB) using the following daily.local file (for Linux admins, ...
0
votes
0answers
101 views

Manually synchronizing two BTRFS snapshots with RSYNC

Question Is there a way to synchronize two BTRFS snapshots manually on different disks and mark them as identical (set the parent/child relationship) reliably? Problem I was synchronizing my ...
1
vote
1answer
48 views

Use rsync to only copy files that have changed

Right now I have these commands: my_dir="$HOME/foo/bar"; rm -rf "$my_dir/WebstormProjects/"; rsync -r --exclude=".git" --exclude="node_modules" "$HOME/WebstormProjects/" "$my_dir/WebstormProjects/" ...
0
votes
1answer
115 views

rsync: if a module is not found, what can I check?

I am trying to simply copy a file from 192.168.1.225 to 192.168.1.228 I'm executing the following command from a ubuntu VM at ip 192.168.1.228. (I'm trying to do a pull, if i'm not wrong in the term) ...