bugstoreBackup - Bugs: bug #46605, exceptDirs being checked after...

 
 

bug #46605: exceptDirs being checked after mount with precommand doesn't work

Submitter:  None
Submitted:  Fri 04 Dec 2015 08:53:55 PM UTC
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       No canned response available

 

Wed 24 May 2017 08:18:58 AM UTC, comment #4: 

Hi,

I found another flaw in that context.
I use precommand to mount a directory tree via sshfs.
As suggested by comment #2: I moved section '# precommand ausführen' directly in front of section '# initialise include, exclude and checkBlocks rules'.
However, sourceDir is checked prior mounting with precommand which raises errors about an unexisting sourceDir.

I moved the section '# precommand ausführen' directly after the section which IMHO creates prLog.
The code is now:

$main::__prLog = $prLog;   # used in rules
$prLog->fork($req);

(@main::cleanup) = ($prLog, 1);

my (%suppressWarning);
{
    my $s;
    foreach $s (@$suppressWarning)
    {
        $suppressWarning{$s} = 1;
    }
}

#
# precommand ausführen
#
...

Are there any sideeffects to expect?

Anonymous
Sat 05 Dec 2015 03:51:03 PM UTC, comment #3: 

I see no reason why your workaround should not work. I just included the change in my (not yet ready) candidate for the version.

Maybe this description shows how to mount via fstab:
https://wiki.archlinux.org/index.php/Sshfs
(But I didn't check in detail, so maybe I'm wrong.)

Regards, Heinz-Josef

Heinz-Josef Claes <hjclaes>
Project Administrator
Sat 05 Dec 2015 09:10:58 AM UTC, comment #2: 

Hi,

It's a pitty if this would only works with an auxiliary script, since this means I have to do a major rework of my cronjobs that call storeBackup. Also storeBackupMount needs root access to modify /etc/fstab.

My workaround now is to edit storeBackup.pl and place section

#
# precommand ausführen
#
...

before section

#
# initialise include, exclude and checkBlocks rules
#
...

With this small modification precommands are executed earlier and all mount are present when storeBackup checks for include/exclude files. And: not need for auxiliary scripts.

Does this change have any side-effects?

Anonymous
Fri 04 Dec 2015 11:26:45 PM UTC, comment #1: 

Hi,

at least for the second part (having a mountcommand) there is already a solution. You might want to take a look at storeBackupMount.pl.
http://www.nongnu.org/storebackup/en/node36.html

Anonymous
Fri 04 Dec 2015 08:53:55 PM UTC, original submission:  

I use precommand to mount a sshfs. Works fine until I tried to exclude a folder with exceptDirs. The error is:
<pre>
ERROR     2015.12.04 21:46:26 21500 no directory resulting from exceptDir pattern <vdr>
</pre>
Where "vdr" is the folder I want to exclude.

expectDirs throws an error that a folder can not be found prior the filesystem is mounted. Thus the folder is never there. IMHO this should be interchanged to execute precommand prior expectdir. If this would have some sideeffect, maybe we could introduce a "mountcommand" that is executed prior all folder/files checks.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by hjclaes (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

     

     

     

    No changes have been made to this item

    Back to the top


    Powered by Savane 3.9