#35 problem with excludes

v2.5
closed-fixed
nobody
None
5
2011-08-14
2011-02-01
tombart
No

When you use database name which could be part of other database names you'll get unexpected results.

e.g.: DBEXCLUDE="test"
DBNAMES="my_database-test"

The sed expression DBNAMES=`${ECHO} ${DBNAMES} | ${SED} "s/\b${exclude}\b//g"`

will eliminate part of the name, you'll get "my_database-" which of course can't be backuped.

Problem could be solved by using expression like this (I'm not a sed expert):

DBNAMES=`${ECHO} ${DBNAMES} | ${SED} "s/^${exclude}//g;s/[ ]${exclude}[ ]/ /g;s/${exclude}$//g"`

I assumed, that names are separated by space, beside first and last name. It's probably possible to write it more simple, but this one seems to be working.

Discussion

  • Jerome Warnier

    Jerome Warnier - 2011-06-08

    I guess an alternative solution would be for you to escape the _ with a \.

     
  • Mark Grennan

    Mark Grennan - 2011-07-12

    I'll give this a try.

     
  • PittaGurneyi

    PittaGurneyi - 2011-08-14

    Fixed in version 3.0_beta.

     
  • PittaGurneyi

    PittaGurneyi - 2011-08-14
    • status: open --> closed-fixed
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks