LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 04-08-2023, 09:23 AM   #1
louisb
Member
 
Registered: Aug 2003
Posts: 199

Rep: Reputation: 15
Rsync exclude file not working


I' attempting to use rsync to keep files in sync between two directories locally. The command I'm using in a script file is as follows:

rsync -rptgoiuqc --exclude '/home/louis/Documents/drupal.conf' /home/louis/Documents/ /home/louis/SynologyDrive/
rsync -rptgoiuqc /home/louis/SynologyDrive/ /home/louis/Documents/

When I run the above command I get the following message:

rsync: chgrp "/home/louis/Documents/drupal.conf" failed: Operation not permitted (1)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1189) [sender=3.1.3]

Since I'm trying to exclude the file 'drupal.conf' in the first command in the script shouldn't just ignore the file and message not appear.

Thanks

~
 
Old 04-08-2023, 09:29 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 24,365

Rep: Reputation: 8005Reputation: 8005Reputation: 8005Reputation: 8005Reputation: 8005Reputation: 8005Reputation: 8005Reputation: 8005Reputation: 8005Reputation: 8005Reputation: 8005
I guess you need to specify relative path (to src_dir) to exclude
https://linuxize.com/post/how-to-exc...es-with-rsync/
 
Old 04-08-2023, 10:40 AM   #3
louisb
Member
 
Registered: Aug 2003
Posts: 199

Original Poster
Rep: Reputation: 15
The file that I'm trying to exclude is in the source path, the link that you provided is what I've been reading/using. I've tried it not using the absolute path and still is does not work. The rsync does work and it does also copy the excluded file which is what I don't want.

Any suggestion?
 
Old 05-04-2023, 03:16 AM   #4
singecrocodile
LQ Newbie
 
Registered: May 2023
Posts: 3

Rep: Reputation: 0
Quote:
Originally Posted by pan64 View Post
I guess you need to specify relative path (to src_dir) to exclude
https://linuxize.com/post/how-to-exc...es-with-rsync/geometry dash lite
One suggestion is very relevant to this problem. Thank you for sharing it with us
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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] rsync --exclude-from command line option not working on macOS using bash shell rhimbo Programming 12 06-13-2020 12:48 AM
[SOLVED] rsync --exclude-from not working correctly? talkinggoat Linux - Newbie 3 04-19-2016 09:44 PM
Using Find with an exclude/exclude file metallica1973 Linux - General 8 11-06-2011 09:39 PM
Simple Rsync exclude not working as expected Poetics Linux - Software 5 02-15-2008 11:58 AM
tar --exclude --exclude-from cefn Linux - Software 4 10-11-2005 07:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 04:58 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