Hello Lars,
> > ---------- Message transféré ---------- > From: Lars Wirzenius <l...@liw.fi> > To: Damien Couroussé <damien.courou...@gmail.com>, > 675141-d...@bugs.debian.org > Cc: > Date: Wed, 30 May 2012 13:05:10 +0200 > Subject: Re: Bug#675141: obnam: please add an 'include' config parameter > On Wed, May 30, 2012 at 08:39:22AM +0200, Damien Couroussé wrote: > > It would be nice to have an 'include' parameter in the same way rsync > > works. > > > > Thus it would be possible to do things like : > > exclude = .* > > include = .git > > Note that exclude in Obnam is a Perl-compatible regular expression > (full power of the re module's pattern matching language). Your examples > don't do what you expect them to do. It's possible to use the look-ahead > operators in the regular expression syntax to do what you want, though. > Note that rsync's full mechanism for filtering what gets transferred is > quite powerful, and also quite complicated. > Just for the sake of documenting this issue: My previous example was maybe not clear before. In rsync I can an include file and an exlude file similar to this: ===== config.exlude ==== # repositories to exclude from backup .local no_backup damien/temp # do not backup local configuration files /home/damien/.* # etc etc. ... ==== config.include ==== # ... do not backup local config files except these ones /home/damien/.bash* /home/damien/.profile* /home/damien/.git* /home/damien/.tikz* /home/damien/.reportbug* # etc etc. ... > > All this demonstrates that adding a really powerful and versatile > mechanism for picking out what is to be backed up is inherently dangerous, > and as such will cause people grief when they are setting up their > backups. It's better to have people back up a bit too much than to > make it easy for them accidentally back up even a little bit too little. > > Thus I'm not going to implement this. If someone can come up with a > clean way of doing it, and provides a good patch, I am willing to include > that in Obnam, however. (In that case, please discuss it in the upstream > bug tracker or the upstream mailing list, thanks.) > > I understand your point. At the same time using one-liners of Perl regexes can be quite obfuscating. This is why I would vote for a multi-liner configuration of the include/exclude patterns. I do also assume that there is a limitation for doing this from Python cliapp. > Sorry. I don't mean to be negative about all your suggestions. > > It's OK. And thanks for this tool ! It looks nice and I am strongly considering it as a very good alternative for crypted backups on an external server. regards, Damien