Menu

#5056 backslashes (backward slashes) being changed to forward slashes in bacula module

1.870
closed-fixed
nobody
None
5
2017-12-18
2017-12-12
HarryM
No

Webmin bacula module is changing backslashes to (forward) slashes which causes some backups not to work. If I specify, as part of a backup file set definition, something like:

Files and directories to backup --> "\|bash -c 'do something or another'"

that line will be saved with the slashes switched as

File = "//|bash -c 'do something or another'"

in the director config file. But Bareos (or Bacula) requires the leading characters to be backslashes, not forward slashes. As a result, the file set definition fails causing backups to be incomplete.

This is webmin 1.870 running on Ubuntu 14.04, accessing the webmin UI from CentOS. AFAIK, all Ubuntu packages are up to date. This problem has persisted for some time now, but recently I modified the compression type in the file set definition of one file set and when it got saved, this issue arose again.

My workaround, for now, is to try to remember to change the file set definition in the bareos director config file after making other changes in webmin, using an editor to manually correct it.

Discussion

  • HarryM

    HarryM - 2017-12-12

    The field in question "Files and directories to backup", is actually two backslashes, not one. The trouble is that your bugtracker elided one of them, of course. So what I really entered in the initial bug post was meant to be

    "\\|bash -c 'do something or another'"

    Sorry for this confusion, but it actually didn't occur to me to enter four slashes to illustrate an example with two slashes!

    It may be helpful to note that this change occurs upon saving ANY changes to the fileset, not just the field indicated. I re-discovered this bug when I changed another field in the file set (compression); the field in question was inappropriately updated as illustrated, even though I had not touched it.

    BTW, the syntax called for is correct, per the bareos docs, and these backups have worked for ages as configured. The slashes are doubled because the bareos parser will elide one of them in the double quoted string.

     

    Last edit: HarryM 2017-12-12
  • Jamie Cameron

    Jamie Cameron - 2017-12-13

    Interesting, I didn't know Bacula supported use of shell commands as source of files to backup.

    Athough webmin could handle this backslash escaping better, using a shell command to get files is going to break the UI in other ways.

     
  • HarryM

    HarryM - 2017-12-13

    The backslash notation only has to do with information stored in the bareos/bacula configuration file. It has no bearing on anything the UI itself. It does not use the shell escape, e.g., to denote files to be displayed in the UI.

     
  • Jamie Cameron

    Jamie Cameron - 2017-12-16
    • status: open --> closed-fixed
     
  • Jamie Cameron

    Jamie Cameron - 2017-12-16

    Ok, I see now - this will be fixed in the next Webmin release.

     
  • HarryM

    HarryM - 2017-12-17

    So this is already closed? I take it the fix is already in the source code repository. Anyway, thanks for looking into this.

     
  • Jamie Cameron

    Jamie Cameron - 2017-12-18

    Yes, the fix is in

     

Log in to post a comment.

MongoDB Logo MongoDB