1
vote
0answers
186 views

How to use rsync with GNU parallel?

I am using scp to copy the files in parallel using GNU parallel with my below shell script and it is working fine. I am not sure how can I use rsync in place of scp in my below shell script. I am ...
1
vote
1answer
46 views

rsync parallel vs serial transmissions

Using Bash 4 and rsync on RHEL 6, are there any differences between the following methods? If so, which is more efficient, and what are the differences between these 3 methods: 1) rsync -avz ...
2
votes
1answer
106 views

No password prompt when using rsync remotely?

I have a bash script that executes rsync transfers to a remote location, and every time I execute the script I get asked for a password. Is there a way to avoid this? This is the command I use: ...
1
vote
1answer
182 views

Not able to copy multiple files using rsync 3.0.9 version?

I am trying to copy two files using rsync from a machineB but somehow it always copies only one file but not the second file - Here is the syntax I am using - rsync -avz ...
2
votes
3answers
276 views

How to use rsync or scp to efficiently copy the files from machineB and machineC to machineA?

I am running my shell script on machineA which copies the files from machineB and machineC to machineA. If the file is not there in machineB, then it should be there in machineC for sure. So I will ...
3
votes
1answer
189 views

Best way to sync files - copy only EXISTING files and only if NEWER than target

I'm doing this sync locally on Ubuntu 12.04. The files are generally small text files (code). I want to copy (preserving mtime stamp) from source directory to target but I only want to copy if the ...
0
votes
0answers
105 views

Why I can't pass ip to rsync script?

I am writing script were rsync should be called and ask for password. However I cannot pass IP as argument. I think I am missing something simple. Any ideas? Even trivial script like this just outputs ...
2
votes
2answers
358 views

How can I add an array of arguments inside my rsync call inside a script?

I want to copy a folder to another location, while excluding some specific files Here is my current script: #!/bin/bash if [ -n "$2" ] then source=$(readlink -f $1) destination=$(readlink ...
3
votes
1answer
360 views

find and rysnc?

I want to be able to search for files over 14 days and over 10k and than rsync those found files to a destination. Is there a way to combine these two commands? find ./ -mtime +14 -size +10k rsync ...
4
votes
1answer
4k views

Move files and delete directories with rsync?

Recently I needed to delete a large number of files (over 1 million) and I read that doing: rsync -av --delete `mktemp -d`/ ~/source && rmdir ~/source Was one of the most optimized ways to ...
0
votes
1answer
155 views

Bash scripting rsync puzzler

Frustrating. The script below work for the first two targets, but not the second. #!bin/bash ... backitup () { Todaysdate=`date "+%Y-%m-%dT%H_%M_%S"` Sourcedir=$1 Destination=$2 Username=$(echo ...
3
votes
2answers
2k views

rsync certain files, excluding the rest, ignoring .svn/ directory, recursively

I'm using rsync to copy some files from a share to another. Recursively, I need to: Delete files at destination that were removed from the origin Only sync php and js files Exclude every other file ...
3
votes
1answer
235 views

Bash remote autocompletion : change the 'starting' directory

I'm regularly downloading files from a remote server, always from the same directory. So I wrote a custom function that I put in my bashrc: download_from_myserver () { for file in "$@" do ...
3
votes
2answers
138 views

Any ideas to simplify the awkward rsync expression below?

Here is expression: rsync -avz --progress -e "ssh -i /where/is/my/id_dsa" vivek@some.host:`ssh -i /where/is/my/id_dsa vivek@some.host "find /remote/source/dir -type f -name '*.sql' | sort -nr | head ...
3
votes
1answer
232 views

Pausing rsync via bash script?

Is there a way to pause rsync via command line, if it transfers data for over X minutes? I'm working on using it as a backup and would like it to pause every once in a while to prevent the hard disks ...
5
votes
1answer
329 views

How to merge multiple WebDAV accounts for backup?

I use davfs, aufs, rsync: sudo mount -t davfs -o uid=wd,gid=wd,dir_mode=777,rw https://wd1.wd.wd/ /mnt/webdav1 sudo mount -t davfs -o uid=wd,gid=wd,dir_mode=777,rw https://wd1.wd.wd/ /mnt/webdav2 ...
2
votes
3answers
781 views

Copy/backup all dirs containing files matching a regexp

I would like to do a backup where I recursively go through a dir structure and only get directories with files whose names matching a particular regexp. I would like to keep the directory structure, ...
11
votes
1answer
2k views

Making a progressbar with “dialog” from rsync output

I'm looking for a way to filter/redirect rsync output in a manner where it can be fed to the "dialog --gauge" command, so I can get a nice looking progressbar during file sync. Currently I have only ...
6
votes
4answers
3k views

cp or rsync, is cp really worth it?

I hope this does not count as a question without a real answer, as I can't seem to find a good reason to use cp(1) over rsync(1) in virtually all circumstances. Should one typically favour rsync over ...
1
vote
1answer
600 views

How should I check to see if the remote smb serv is mounted?

I'm pretty new to mount. Basically, I have a remote SMB serv on the local network that I want copy images from a directory on, then repeat every 5 min. I think what I need to do is make a script that ...
0
votes
1answer
291 views

How do I escape a dot character for an rsync command? [closed]

I'm trying to do... ssh -av -e deploy@domain.com:/var/www/domain.com /Users/user/workspace/domain But it's outputting this (I presume because of the period character): OpenSSH_5.6p1, OpenSSL ...
7
votes
2answers
900 views

sync files recursively between two folders where files are less than 24 hours old

I want to find all the files under a directory which are within 24 hours then rsync those files with another server. There are some old files that I do not want to transfer, however if those old ...