LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-04-2018, 09:48 PM   #1
inv|s|ble
Member
 
Registered: Dec 2001
Distribution: freeBSD, slack 9/10/current
Posts: 60

Rep: Reputation: 15
rsync exclude local folder to remote


I have read the man page about a dozen times, and still can not seem to get rsync to exclude a folder. I am trying to move my home movies from my server, to my media center, so I can schedule it weekly, to make sure all new home movies are uploaded, but the scheduling is not a problem(atleast not yet). Here is the command I have tried
Code:
rsync -avu -P --exclude=/media/hd/movie/jmovie/ /media/hd/movie media@192.168.1.125:/home/media/HomeMovies/
I am trying to exclude the folder jmovie. I have moved the exclude option to the end of the command too, and it made no difference. I tried asking Reddit, but did not get any usable answers there either.
 
Old 04-04-2018, 11:42 PM   #2
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,345
Blog Entries: 3

Rep: Reputation: 3756Reputation: 3756Reputation: 3756Reputation: 3756Reputation: 3756Reputation: 3756Reputation: 3756Reputation: 3756Reputation: 3756Reputation: 3756Reputation: 3756
The --exclude option uses a pattern not an absolute path or file name. Speaking of absolute, the program checks that pattern against relative paths based on the source directory. So I would try something like this:

Code:
rsync -avu -P --exclude='jmovie/' /media/hd/movie/ media@192.168.1.125:/home/media/HomeMovies/
It is a pattern though, so watch out that it does not cover more files or directories than intended.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help with rsync + NAS local Folder khandu Linux - Newbie 2 07-31-2011 09:30 PM
rsync - Remote to local gabriel01 Linux - Software 3 03-09-2011 08:40 AM
Trying to rsync from remote to local dooley28 Linux - Software 1 09-23-2010 01:03 AM
rsync local web folder to remote web folder? Almost working... Ultrus Linux - General 2 03-25-2009 02:49 PM
Remote Mounting? (Mount remote folder on local filesystem) mac_phil Linux - Networking 1 11-15-2003 03:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:01 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration