Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - General
User Name
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.


  Search this Thread
Old 11-19-2006, 11:12 AM   #1
Registered: Jun 2006
Location: Sydney
Distribution: Gentoo + Debian
Posts: 132

Rep: Reputation: 15
rsync question

Ok.. Im trying to write my own backup script using rsync, and im having a little difficulty understanding how to backup multiple directories without using a loop.

For instance, I would like to backup /etc and /home/thorpe, however I would like to skip /home/thorpe.mozilla and /home/thorpe.thumbnails.

Ive tried....
rsync -va --delete --delete-excluded --include="/etc /home/thorpe" --exclude="/home/thorpe.mozilla /home/thorpe.thumbnails"
but its just not working. Anyone give me a push? Im reading the manual entry but just not getting it.

Also, would there be a way to backup /home but skip say /home/user/tmp for each user? Something like /home/*/tmp ?


PS: Im not interested in using files as it seems --include-from and --exclude-from do.
Old 11-19-2006, 05:19 PM   #2
LQ Guru
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Most of rsync options don't need the = after the option.

rsync --delete --delete-excluded --exclude thorpe.mozilla --exclude  thorpe.thumbnails --exclude tmp -a /home/thorpe /etc user@host:/destination/directory
#disregard the user@host: if you want to backup locally somewhere.


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 On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Rsync Question stefaandk Linux - General 2 05-12-2006 11:12 PM
rsync question kpachopoulos Linux - General 3 07-15-2005 03:33 PM
Question about rsync bgriesi Linux - Networking 4 12-31-2004 08:19 AM
Another Rsync question phatboyz Linux - Networking 2 07-02-2004 08:46 AM
rsync question falco365 Programming 4 05-25-2003 09:24 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:22 PM.

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