0
votes
0answers
32 views

Script to compare directories and move files (like rsync)

I use rsync to sync data between two servers. If I completely rebuild the directory structure, rsync cannot understand this and will attempt to recopy everything. I am aware that Unison is capable ...
3
votes
2answers
90 views

transfer a file to remote dir only if doesn't exist without replacing

I'm using CentOS linux. In one line cmd, that returns 0 if success, non-0 if failure, I need: Transfer a file to a remote server. Don't transfer the file if filename exists in remote server ...
4
votes
3answers
530 views

Help Shell script to pass variables to rsync

I'm trying to create a simple wrapper shell script for rsync. When I send file names to my script, rsync can never seem to identify the correct location. The file names have spaces in them. I've tried ...
3
votes
4answers
436 views

How to prepare files for rsync on a case insensitive filesystem?

I am transferring a large number of files on a HFS+ filesystem. The files are currently on ext2 partitions. I have conflicts due to case insensitivity of the target partition (HFS+). I want to ...
2
votes
2answers
446 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
239 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 ...
2
votes
2answers
2k views

how to move (not copy) files from one server to another?

I want to move files from server1 to server2. A producer on server1 will keep generating the files, and a consumer on server2 will keep processing them. I can copy files using the following shell ...
2
votes
3answers
897 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, ...
1
vote
1answer
1k views

Trying to create a cron to Rsync then tar the folder

I'm stuck at the first hurdle! I want to run a couple of commands from a bash script. First something like this to rsync some directories: rsync -e ssh -az user-whatever@website.com:/home ...
1
vote
2answers
2k views

Using rsync in a cronjob when a password is needed

Basically I have a bash script that fetches data from my server to perform a backup. As it is now I have to start that script manually, enter the password, and then wait for it to finish. I would ...