[Box Backup] regex in native windows client boxwin0.09h.exe

Ben Summers boxbackup@fluffy.co.uk
Fri, 13 Jan 2006 16:33:42 +0000


Why not use multiple ExcludeFilesRegex lines? If you combine things  
sensibly, you won't need too many.

Ben


On 13 Jan 2006, at 16:26, E.W. Peter Jalajas wrote:

> I am testing out the native windows client 0.09h on WinXP Home (to a
> store server on ubuntu hoary across the room).
>
> I'm trying to implement some of the exclusions listed on the  
> University
> of Ottawa, Centralized Backup and Restore Facility, "Exclude lists for
> TSM" page (I'm not affiliated with them in any way):
> http://www.ccs.uottawa.ca/software/tsm/lists.html
>
> Here is my current work in progress (please note that I hardly know
> anything about regex, as you'll soon see):
>
> BackupLocations
> {
>   test
>   {
>     Path = C:\Documents and Settings\<username>\My Documents\box\test
>     ExcludeFilesRegex =
> .+\.([aA][vV][iI]|[iI][sS][oO]|[mM][pP][eE]?[3gG]|[mM][pP][eE][gG]| 
> [tT][mM][pP]|[bB][aAcC][kK]|[dD][bB][kK]|[bB][kK][~!1-9]|[mMtT][bB] 
> [kK]|[oO][lL][dD]|[sS][aA][vV]|[sS][wW][pP]|[xX][lL][kK]|[cC][sS] 
> [mM]|[dD][sS][kK]|[oO][bB][jJ]|[pP][aA][rR]|[dD][bB][xX])$
>   }
> }
>
> That seems to work fine.  Last night I created 4 test files:
> junk_20060113T0003.mpeg
> junk_20060113T0003.mpg
> junk_20060113T0003.mp3
> junk_20060113T0003.mpx
>
> and only the .mpx file was backed up, as hoped:
>
> 00000038 f----- 2006-01-13T10:04:18 junk_20060113T0003.mpx
>
> (Note the datestamp that I put in the test filename--why it took 9+
> hours to backup while I was sleeping, and how low you can set the
> bbackupd.conf timing settings for testing purposes, are topics for
> another posting.)
>
> I'm now testing:
> junk_2006-01-13T1111.bk~
> junk_2006-01-13T1111.bk!
> junk_2006-01-13T1111.bk1
> junk_2006-01-13T1111.bkx
>
> I'll add more exclusions-by-filename-extensions in due time, and
> publish them back here in hopes that they are helpful to some folks.
>
> I also plan to test the "Making regular expressions more readable"  
> tips
> of David Mertz:
> http://gnosis.cx/publish/programming/regular_expressions.html
>
> My question, finally, is I guess a general regex question.  I'd  
> like to
> add some filename exclusions based on the Ottawa list.  For example,
> how would I modify the regex above to exclude some full filenames  
> like,
> say, "thumbs.db" and "history.dat" and "cookies.txt"?  I tried a few
> random combinations of parens and pipes and bbackupd didn't seem to
> like them.
>
> (I have a delusion of me someday creating a website at which folks
> could pick and choose exclusions from the Ottawa list and a script
> would return a nice regex for them, as a thank you to Ben and the  
> other
> developers.)
>
> Thanks,
> Pete
>
> _______________________________________________
> boxbackup mailing list
> boxbackup@fluffy.co.uk
> http://lists.warhead.org.uk/mailman/listinfo/boxbackup