Little help with rsync --exclude


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Little help with rsync --exclude
# 1  
Old 12-09-2013
Little help with rsync --exclude

Loving the rsync command and beginning to write some scripts with it.
However I'm hung up on the --exclude function.

Script is tested and works great BEFORE I put the --omit in.
What am I doing wrong in my syntax?


rsync $OPTS /cis/cloverleaf/cis6.0/integrator/ $REMHOST:/home/hci/rsync/integrator --exclude 'processes*' --exclude 'uninstall*' > ${ERRFILE}

So I'm trying to get everything in the /cis/cloverleaf/cis6.0/integrator/ directory, except the files inside /cis/cloverleaf/cis6.0/integrator/abchub/exec/processes directory.
I'm trying to move all that over minus the files inside /processes
and
anything with the word Uninstall in the /integrator directory
over to /home/hci/rsync/integrator on a remote server.

What am I missing with the syntax of --exclude
Help!!!
# 2  
Old 12-10-2013
Maybe the order is wrong? All options first:
Code:
rsync $OPTS --exclude 'processes*' --exclude 'uninstall*' /cis/cloverleaf/cis6.0/integrator/ $REMHOST:/home/hci/rsync/integrator > $ERRFILE 2>&1

Also be as precise as possible to not have unwanted matches.
E.g. --exclude '/processes*' --exclude '/uninstall*'
This User Gave Thanks to MadeInGermany For This Post:
# 3  
Old 12-13-2013
what would the syntax look like of I wanted to keep the processes directory, but not include any of the files inside?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Rsync Error: rsync: link_stat failed: No such file or directory (2)

I wish to copy all the files & folder under /web/Transfer_Files/data/ on mymac1 (Linux) to remote server mybank.intra.com (Solaris 10) /tmp/ location I am using Ansible tool synchronize module which triggers the unix rsync command as below:rsync --delay-updates -F --compress --archive --rsh=ssh... (2 Replies)
Discussion started by: mohtashims
2 Replies

2. Shell Programming and Scripting

Rsync exclude & include?

hi I have a few folders and a few files , for example Directory A B C D E Files 1 2 3 4 5 I want B directory and "2" File that does not sync But other directories and file sync What is the solution ? Is there a way to sync time is under one minute? os centos 6.8 thanks... (5 Replies)
Discussion started by: mnnn
5 Replies

3. Shell Programming and Scripting

Du exclude in Solaris

How do you exclude a filesystem using du command in solaris? for example /proc Tried this but its not working du -sk -d /* --exclude=/proc | sort -nr | cut -f2 | xargs du -sh | head - (1 Reply)
Discussion started by: jinslick25
1 Replies

4. UNIX for Dummies Questions & Answers

Exclude txt file in rsync

Hi Folks, I'm using rsync on Solaris 10 to backup a web server and need to exclude the cache and tmp directories. The man pages and google on rsync --exclude are ambiguous but I have tried--exclude=".*" and --exclude/remote_server/absolute_path with success only on the tmp files. Rather than make... (2 Replies)
Discussion started by: SmokeyJoe
2 Replies

5. Shell Programming and Scripting

Exclude a file or not in

Hi Gurus. I have a directory and i receive many files with extension .log. I processed the file as i get it. i want to process all the files except one which i know i don't want to process. cd /backup/temp/rajesh/PACS #--- directory , under this i have below files... (1 Reply)
Discussion started by: guddu_12
1 Replies

6. Ubuntu

[Solved] Using Find with an exclude/exclude file

I am familiar with using tar and exclude/include files: tar zcf backup.dirs.tgz --files-from=include.mydirs --exclude-from=exclude.mydirs --no-recursion but was wondering if I could use find in the same way. I know that you can just specify the directories to exclude but my list is... (2 Replies)
Discussion started by: metallica1973
2 Replies

7. Shell Programming and Scripting

rsync exclude option

Hi Frdz, i am using rsync to transfer files from source to destination. but i have one criteria like i have to tranfer only links from source to destination. in home/test/po folder i have kiran/test1 -> /home/test/lo/fg kiran/test2 -> /home/test/lo/fg2 like links are available.... (1 Reply)
Discussion started by: KiranKumarKarre
1 Replies

8. Shell Programming and Scripting

ls exclude pattern

Hello, With ls *.html I am getting all the files ending with html; what would be the best why to get all the files not ending with html? Thanks (2 Replies)
Discussion started by: JCR
2 Replies

9. Shell Programming and Scripting

rsync - exclude statement not working

hey all, i'm trying to rsync some dir's and files between servers and i've added an exclude statement, but it still goes out and tries to rsync the directory. I've tried the following: --exclude="/export/home/zones/lab" as well as: --exclude=/export/home/zones/lab and also:... (1 Reply)
Discussion started by: em23
1 Replies

10. Shell Programming and Scripting

Creating and using a /.rsync/exclude

Hello all, Everyone has been awesome assisting with my rsync script... Now I want to clean it up. I think the best way for me to exclude many files might be to use a rsync exclude file. So in my script I add So now then, here is my .rsync/exclude... So what is happening is the... (0 Replies)
Discussion started by: komputersman
0 Replies
Login or Register to Ask a Question