LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 02-16-2024, 02:48 PM   #1
apolinsky
Member
 
Registered: Oct 2004
Location: Brooklyn
Distribution: Slackware 15;
Posts: 442

Rep: Reputation: 47
problem with rsync exclude


I use rsync to backup my thunderbird mail directory every night. I am tring to exclude the cache2 directory using the following command:
rsync -avzrcp --exclude '/home/xxx/.thunderbird/yc4iwpsm.default-default/cache2' /home/xxx/.thunderbird /media/nas2/xxx

In the the test, the cache2 directory (and its contents) were copied. I have obviously made a mistake but so far don't see it.

Thank you.
 
Old 02-16-2024, 02:55 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,759

Rep: Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931
The exclude option uses relative paths referenced to the source directory.
 
2 members found this post helpful.
Old 02-16-2024, 05:50 PM   #3
lazardo
Member
 
Registered: Feb 2010
Location: SD Bay Area
Posts: 275

Rep: Reputation: Disabled
Quote:
rsync -avzrcp --exclude '/home/xxx/.thunderbird/yc4iwpsm.default-default/cache2' /home/xxx/.thunderbird /media/nas2/xxx
Command given is missing the destination.
Code:
rsync -avzrcp --exclude '/home/xxx/.thunderbird/yc4iwpsm.default-default/cache2' /home/xxx/.thunderbird /media/nas2/xxx <destination>
 
1 members found this post helpful.
Old 02-16-2024, 06:32 PM   #4
apolinsky
Member
 
Registered: Oct 2004
Location: Brooklyn
Distribution: Slackware 15;
Posts: 442

Original Poster
Rep: Reputation: 47
The destination is the xxx. The problem was, as explained by Michaelk, the exclude needs the RELATIVE directory (that is relative to overall source.) I only need the --exclude 'cache2' not its complete path.
 
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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] tar with --exclude and/or --exclude-from vbekker Linux - Newbie 6 12-09-2010 02:51 AM
Can we use exclude option in"rm" command to exclude some files/folders? yadav_rk727 Linux - Newbie 1 02-03-2010 10:14 AM
CVS Exclude : Exclude sub directories from check out On Linux from command line shajay12 Linux - Newbie 1 08-03-2009 12:36 AM
tar --exclude --exclude-from cefn Linux - Software 4 10-11-2005 07:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 07:53 AM.

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