Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 178126
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Default Assignee for Orphaned Packages <maintainer-needed@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: John R. Graham <john_r_graham@mindspring.com>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
flexbackup-1.2.1-prune.patch Patch to address reported issues. patch John R. Graham 2007-05-12 02:30 0000 5.41 KB Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 178126 depends on: Show dependency tree
Bug 178126 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2007-05-11 23:54 0000
When you specify a list of directories to prune, flexbackup gets it almost
right.  It backs up all of the directories on the pruning list but none of the
contents of those directories.  As such, little space is wasted in the backup
and it's more if a nit than a real show stopper.

Here's even more of a nit.  The manpage incorrectly documents the "-extract
-onefile" option, although it's correctly documented in the built-in help.

I'll be posting a patch shortly that corrects both issues and adds a little
more documentation on the subtleties of the pruning mechanism.

------- Comment #1 From John R. Graham 2007-05-12 00:50:18 0000 -------
The issue was that flexbackup was taking the list of directories, for instance,
like this one:

    $prune{'/home'} = "bert ernie bigbird";

from its conf file and constructing a regular expression (that's passed on the
command line of "find") like this (necessary shell escaping omitted for
clarity):

    -regex "\./(bert|ernie|bigbird)/.*" -prune

The "/.*" on the end of the regular expression ensured that any file under the
listed directories would match and be pruned but, because of the trailing
slash, the directory itself *would not* be matched.  The solution was to omit
the last two atoms of the regular expression, resulting in:

    -regex "\./(bert|ernie|bigbird)" -prune

This results in each directory itself being pruned (which is what was wanted
all along).  Since each directory is pruned, there's no need to match their
contents.

------- Comment #2 From John R. Graham 2007-05-12 02:30:08 0000 -------
Created an attachment (id=118958) [details]
Patch to address reported issues.

* Fix the regex construction issue to correct subtree pruning.
* Minor code cosmetics (couldn't resist).
* Corrected a few typos in the flexbackup man page.
* Minor updates to the flexbackup.conf man page.
* Additional tutorial explanation and examples in the sample
  flexbackup.conf file.

------- Comment #3 From John R. Graham 2007-05-12 09:13:39 0000 -------
This is now in Portage as flexbackup-1.2.1-r5 with the help of the Gentoo
Sunrise team.  Thanks, genstef!

------- Comment #4 From Ivan Yarych 2007-07-24 12:45:07 0000 -------
I liked the old (current) behaviour of the prunning functionality. When you
perform the estract you get dirs like /mnt/win_c, /usr/portage, /var/log
created and have less problems after restoring the system, don't you think?

------- Comment #5 From John R. Graham 2007-07-24 17:21:05 0000 -------
Not really.  If you prune a directory, I think the most intuitive behavior is
for it to *not* be included in the backup.  If you want to to back up the
directory but not the contents, your prune term can still do this.  Just do

    some_path/.*

instead of

    some_path

Hope this helps.

- John

------- Comment #6 From John R. Graham 2007-07-27 20:33:25 0000 -------
I should mention that the above works only with flexbackup-1.2.1-r5 or later.

- John

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug