-   Linux - Software (
-   -   Rsync syntax question (

alexpacio 07-18-2007 06:02 AM

Rsync syntax question
I have to backup a Raid5 volume (mounted as a normal directory of the "/" filesystem) on an another disk used for backups.

I thought to backup it with rsync, excluding some type of file and preserving permissions.

But the command I made doesn't work...

(Must be excluded files with .tib and .bkp extension)

here is the command:

rsync --exclude="*.tib" "*.bkp" -avhp /mnt/raid5/ /mnt/backup/

Could you correct it??

please help me!!:cry: :cry:

macemoneta 07-18-2007 06:37 AM

rsync --exclude=.tib --exclude=.bkp -avH /mnt/raid5/ /mnt/backup/

Update: I just noticed that the 'h' was lowercase; it should be uppercase.

alexpacio 07-19-2007 04:36 PM

I will try....

Thank you..

alexpacio 07-22-2007 07:19 PM

the exclude syntax doesn't work again...Rsync doesn't exclude files with "tib" (and "bkp")extension as required by me...

macemoneta 07-22-2007 07:34 PM

The pattern needs a leading asterisk:


$ mkdir source
$ mkdir dest
$ touch source/file1.tib
$ touch source/file2.bkp
$ touch source/file2.txt
$ rsync --exclude=*.tib --exclude=*.bkp -avH source/ dest/
building file list ... done

sent 143 bytes  received 48 bytes  382.00 bytes/sec
total size is 0  speedup is 0.00

alexpacio 07-23-2007 07:27 PM

Now the command works correctly!
Thank you so much!

All times are GMT -5. The time now is 11:42 PM.