Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 03-29-2006, 06:30 PM   #1
Registered: Dec 2003
Location: Canada
Distribution: openSUSE Tumbleweed
Posts: 209

Rep: Reputation: 30
backup folder (rsync)


i try to backup my home folder with rsync...

in a script i have

# directory to backup

# excludes file - this contains a wildcard pattern per line of files to exclude

OPTS="-a -r -v --exclude-from=$EXCLUDES"

# the name of the backup machine

# now the actual transfer
i try to exclude some folde and all sub-directory...

in my exclude.txt i have
+ /home/collinm/mp3
+ /home/collinm/Download

when i run the script, rsync copy all file .... it copy mp3 and Download folder..... but i don't want that....

any idea?

Old 03-29-2006, 08:17 PM   #2
LQ Guru
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043
I don't have the computer on which I have installed rsync at hand, so just two wild guesses:

1. "+" in front of a rule usually means that the path is INcluded. Now I don't know if "+" in an EXclude file means exclude, or include. Intuitively I would say that in an exclude file reverse logic is true. However, just try the path without "+" and preceeded with "-"

2. When rsync descends into directories, the rule must still be true. That means that the path /home/collinm/mp3/hardrock does NOT match the rule /home/collinm/mp3. You would have to specify the rule as /home/collinm/mp3/* Only then every subdir matches your rule.

Good luck, and sorry if I am wrong.

Old 03-29-2006, 08:20 PM   #3
Registered: Dec 2003
Location: Canada
Distribution: openSUSE Tumbleweed
Posts: 209

Original Poster
Rep: Reputation: 30
i tried with "+", "-" and nothing and get the same result
Old 03-29-2006, 08:21 PM   #4
Senior Member
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian, Arch
Posts: 2,331

Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
An "exclude file" defaults to the "-" operation if it is not specified whereas an "include file" defaults to "+". However, you can make an exclude file behave like an include file by prefacing the lines with a "+". This is exactly what you did. The converse is also true for an include file with "-" lines in it (this would behave like an exclude file).

Do not put those "+" signs in your exclude file.

+ /home/collinm/mp3
+ /home/collinm/Download
with this:
Old 03-29-2006, 09:07 PM   #5
Registered: Dec 2003
Location: Canada
Distribution: openSUSE Tumbleweed
Posts: 209

Original Poster
Rep: Reputation: 30

work fine with that....


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
RAID 1 or RSYNC BACKUP otagojo Linux - General 7 08-01-2005 12:34 AM
rsync incremental backup sachin_keluskar Linux - Software 1 06-29-2005 02:09 AM
rsync as backup? ziggie216 Linux - Software 3 03-13-2005 02:22 PM
backing up remote folder with rsync and ssh ohcarol Linux - Software 6 01-03-2005 12:43 AM
rsync backup... tarballed Linux - Networking 10 06-27-2003 10:43 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:08 AM.

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