regex + sbackup

Carthik Sharma carthik at gmail.com
Wed Feb 15 04:50:58 UTC 2006


On 2/14/06, Darryl Clarke <smartssa at gmail.com> wrote:
> On 14/02/06, dave s <ubuntu at pusspaws.net> wrote:
> > On Wednesday 15 Feb 2006 02:02, Darryl Clarke wrote:
> > >
> > > Wait, is the data path:
> > > /home/dave/test/something/data
> > > or
> > > /home/dave/test/data?
> >
> > Yep Its this one
> >
> > >
> > > If it's the second, it's no wonder it didn't work ;)
> > >
> > > try:
> > > /home/dave/[^/]+?/data
> >
> > :) that works !
> >
> > >
> > > this will exclude
> > > /home/dave/[anything]/data
> > > but not
> > > /home/dave/data
> > > or
> > > /home/dave/[anything]/[something]/data
> > >
> >
> > because [^/]+?/ replaces one element in the path :)
> >
> > > I think this:
> > > /home/dave/[.]+?/data
> > >
> > > should exclude
> > > /home/dave/[anything/including/subfolders]/data
> > >
> > > but still not
> > > /home/dave/data
> > >
> >
> > I see what you are saying
> >
> > > I don't think you're experiencing a bug, just some regex trickery.
> > >
> >
> > This regex stuff is a dark art. I got the path thing now and it works ( a big
> > thank you :)) but I still have one last regex problem.
> >
> >  /home/dave/[^/]+?/data
> >
> > excludes the data directorys but also my 'data_process' directories :( I
> > changed my regex to
> >
> >  /home/dave/[^/]+?/data$
> >
> > to try and only exclude 'data' directories but all it did was allow both data
> > and data_process directories.
> >
> > ...mmm...
> >
> > any ideas on this last one ?
>
> Hmm... that should work. the hardest part of this is knowing how
> sbackup is actually comparing.  The fact that the last one doesn't
> leads me to believe sbackup compares whole path name with a trailing /
>
> /home/dave/[^/]+?/data/$
>
http://koyanet.lv/soc/sbackup.conf.example
says:
"
# Comma-separated list of regular expressions to exclude from backup
# use this to exclude certain types of files or directories
#
# Note: If any of these expressions matches within the whole pathname
#	of the file, it will NOT be backuped. Keep this list as specific
#	and as short as possible.
"

So I beleive it is the author's intentions being what they are, the OP
may not be able to exclude "data" without also excluding, for example,
all "database" directories/files.

I love the rdiff-backup/rsync style +/- lists for exclusion/inclusion.
Wish that were possible with sbackup.

Carthik.
>
> --
> ~ Darryl  ~ smartssa at gmail.com
> ~ http://darrylclarke.com
>
> --
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>


--
Ph.D. Candidate
University of Central Florida
Homepage: http://carthik.net


More information about the ubuntu-users mailing list