Giter Site home page Giter Site logo

Fix for 3 bugs in amsamba about amanda HOT 7 CLOSED

zmanda avatar zmanda commented on September 27, 2024
Fix for 3 bugs in amsamba

from amanda.

Comments (7)

martineau avatar martineau commented on September 27, 2024

Using:
$comm .= "rX";
Change the behavior of amsamba, i would prefer if you add a new property, eg 'use-regex' and add the 'r' only when use-regex is set.

For:
return if $line =~ $line =~ /Server not using user level security and no password supplied./;
The bug is the double ' $line =', can you try with:
return if $line =
/Server not using user level security and no password supplied./;

from amanda.

platbr avatar platbr commented on September 27, 2024

martineau, i'm not a developer and the double "$line =" drove me nuts trying to understand WHY?
But i guess that it still need the "m/\Q$line\E/ =
", i will try and update.

About the "$comm .= "rX";" where a simple resolution for a problem that i saw a lot of people reported (exclude does not works).

from amanda.

platbr avatar platbr commented on September 27, 2024

martineau, u were right about the the double "$line =~".

from amanda.

martineau avatar martineau commented on September 27, 2024

About the line:
$_ =~ s/([0-7]+)/chr oct $1/eg;

I do not like to match any number of digit, is it always 3 digits? or anything between 1 and 3?
We could use:
$_ =~ s/([0-7]{3})/chr oct $1/eg;
or:
$_ =~ s/([0-7]{1,3})/chr oct $1/eg;

from amanda.

platbr avatar platbr commented on September 27, 2024

martineau,
I agree about it must to be 3 digits:
$_ =~ s/([0-7]{3})/chr oct $1/eg;

from amanda.

martineau avatar martineau commented on September 27, 2024

I committed a fix

The smbclient man page say that 'r' can be very slow. it is enabled only with a property.
I added a 'regex-match' property, the 'r' mode is enabled only if the property is set to "YES".

I have no setup to try amsamba, can you try the committed patch?

from amanda.

platbr avatar platbr commented on September 27, 2024

Using this SAMBA mod https://bitbucket.org/knarf/samba/get/gsoc_clitar_libarchive.tar.bz2 exclude will work.
You will need http://www.4shared.com/folder/6mEYgOcb/libarchive_3_for_rhel6.html to compile it in RHEL6 or Centos 6.

More info: http://diobla.info/doc/gsoc13/journal

I tested with amanda 3.3.5 and RHEL6 and had to change only this in amanda:

--- /usr/libexec/amanda/application/amsamba.original    2014-02-14 13:17:26.422232351 -0200
+++ /usr/libexec/amanda/application/amsamba     2014-02-14 13:55:57.470228421 -0200
@@ -744,6 +744,7 @@
        debug("stderr: " . $line);
        return if $line =~ /^Domain=/;
        return if $line =~ /^tarmode is now /;
+       return if $line =~ /^tar:[0-9 ]*tarmode is now /;
        return if $line =~ /^tar_re_search set/;
        if ($line =~ /dumped (\d+) files and directories/) {
            $nb_files = $1;
@@ -751,7 +752,7 @@
        }
        # message if samba server is configured with 'security = share'
        return if $line =~  /Server not using user level security and no password supplied./;
-       if ($line =~ /^Total bytes written: (\d*)/) {
+       if ($line =~ /^Total bytes written: (\d*)|^tar:[0-9 ]*Total bytes received: (\d*)/) {
            $size = $1;
            return;
        }
@@ -829,6 +830,7 @@
    my($size) = -1;
    while(<$fhin>) {
       next if /^Total bytes written:/;
+      next if /^tar:[0-9 ]*Total bytes received:/;
       next if !/^\.\//;
       s/^\.//;
       print $fhout $_;

from amanda.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.