rsync : how to exclude specific files or folders ?
NoOp
glgxg at sbcglobal.net
Sat Feb 28 23:10:12 UTC 2009
On 02/28/2009 01:46 PM, Vincent Trouilliez wrote:
> Hello,
>
> I am using rsync currently, to backup my home directory every evening.
> I would like to exclude a few large folders so as to speed up the backup
> by an order (or two) of magnitude.
>
> The problem is that although it should be simple.. it isn't.
> I read the man page several times, and it's not very clear what the
> syntax is, nor if individual folders to be exluced can be specified
> directly at the command line, or if they need to be specified in a
> separate "black list" file, and what the syntax in this file should be
> like.
>
> So does anyone know (for sure, from past or present
> experience) how to word it so rsync understands ?
>
> To be specific, I am trying to exlude my virtual machines (15GB) and
> googlearth database (1.1GB) :
>
> /home/vincent/.VirtualBox
> /home/vincent/.googleearth
>
You may want to give grsync a try - it's a gui frontend for rsync. In
grsync you can also easily run simulations (as you can from the command
line of course) to see first. I don't know about rsync from the command
line (man rsync would be your friend there), but in grsync I'd create an
exclude file:
/home/<user>/.grsync/exclude.txt
and the file would include:
.VirtualBox
.googleearth
Then in the Additional Options tab I' just put:
--exclude-from=/home/<user>/.grsync/exclude.txt
http://ubuntuforums.org/showthread.php?t=795668
[HowTo: Use Grsync and OpenSSH to sync your /home directory over a network]
For the command line you might find this helpful:
http://articles.slicehost.com/2007/10/10/rsync-exclude-files-and-folders
http://sial.org/howto/rsync/
http://www.ss64.com/bash/rsync.html
More information about the ubuntu-users
mailing list