Re: [Bacula-users] Run ClientBeforeJob script in background instead of waiting for it.

2019-01-15 Thread David Brodbeck
New solution: Instead of abusing at, abuse screen.

screen -d -m caffeinate -s bacula-idle-watch.sh


On Tue, Jan 15, 2019 at 11:51 AM David Brodbeck 
wrote:

> Hmm. Unfortunately the solution below does not work on Mojave. Scripts no
> longer have permission to run 'at' because they can't create
> /usr/lib/cron/jobs/.lockfile.
>
> Adding bacula-fd to the list of apps with full disk access doesn't do
> anything, unfortunately, I guess because it's not a full-fledged app?
> Running 'at' manually from the command line works, but only if Terminal is
> added to the list, so it seems you need an "official" app somewhere in the
> process tree. (This is also a problem for backing up certain files in user
> home directories, but that's another issue.)
>
>
> On Mon, Jan 7, 2019 at 11:53 AM David Brodbeck 
> wrote:
>
>> Forgot to CC this to the list, but it's the best solution I've gotten so
>> far. It works, but on macOS you have to turn the 'at' service on first.
>> I ended up with this:
>>
>> #!/bin/bash
>>
>> PATH=/bin:/usr/bin:/usr/local/bin
>>
>> # Script to prevent system sleep while bacula is working.
>> # see bacula-idle-watch.sh for details.
>>
>> # We need to launch with 'at' to avoid bacula-fd hanging waiting for
>> script
>> # completion. First we make sure atrun is enabled.
>> launchctl load -w /System/Library/LaunchDaemons/com.apple.atrun.plist
>>
>> echo '/usr/bin/caffeinate -s /usr/local/bin/bacula-idle-watch.sh' | at now
>>
>> ---
>>
>> Note that by nature 'at' is not immediate. It may take a minute or so for
>> the script to launch, so plan accordingly.
>>
>> On Sat, Jan 5, 2019 at 8:18 AM Josh Fisher  wrote:
>>
>>> In the ClinetBeforeJob script, use the at command to schedule the launch
>>> of the caffeinate job with a runtime of 'now'. For example,
>>>
>>> at -f caffeinate-script.sh now
>>>
>>>
>>> On 1/4/2019 2:36 PM, David Brodbeck wrote:
>>>
>>> This is driving me nuts because I feel like it should be straightforward
>>> and I must be missing something basic.
>>>
>>> I want to launch the caffeinate command on OS X before starting a job.
>>> Caffeinate takes a command as an argument, then goes into the background
>>> and keeps the machine awake until the command exits. I use this after
>>> waking machines up using a WOL script.
>>>
>>> When tested from the command line, caffeinate immediately backgrounds
>>> itself. However, when I try to run it as a Bacula ClientBeforeJob script,
>>> bacula-fd waits around forever for caffeiniate to exit.
>>>
>>> Here's what I've tried so far:
>>> - Having bacula run a script that then runs caffeinate.
>>> - Having bacula run a script that then runs caffeinate using nohup.
>>> - Having the script redirect stdin, stdout, and stderr of caffeinate to
>>> /dev/null
>>> - Adding an ampersand after the script in the bacula ClientBeforeJob
>>> specification.
>>>
>>> What invariably happens is the bash process created by bacula becomes a
>>> zombie and waits for caffeinate to exit. Inspecting the caffeinate process
>>> with lsof shows all of the file handles are redirected to /dev/null as
>>> expected, so I don't think this is a case of stdin or stdout causing
>>> problems. In all cases the only way to get bacula to finish the backup is
>>> to kill the script that caffeinate is running.
>>>
>>> I can't figure out why I can't get bacula-fd to move on after the script
>>> goes into the background. When I run the script manually from the command
>>> line it backgrounds immediately.
>>>
>>> The oddest thing is this worked fine on clients using bacula-fd version
>>> 7.4.x, but fails on a client using 9.2.0.
>>>
>>> Here's the script bacula-fd runs, as it currently stands:
>>>
>>> --
>>> #!/bin/bash
>>>
>>> PATH=/bin:/usr/bin:/usr/local/bin
>>>
>>> # Script to prevent system sleep while bacula is working.
>>> # see bacula-idle-watch.sh for details.
>>>
>>> nohup caffeinate -s bacula-idle-watch.sh 2>&1 >/dev/null >> --
>>>
>>> Here's the contents of bacula-idle-watch.sh; it just waits to exit until
>>> there's no bacula network connection anymore. caffeinate will terminate
>>> once the script exits.
>>>
>>> --
>>> #!/bin/sh
>>>
>>> # This script delays a few minutes, then loops, checking for bacula-fd
>>> # connections. When there are none, it exits.
>>> # This is meant to be run with caffeinate in a bacula before-job script,
>>> # e.g. "caffeinate -s bacula-idle-watch.sh"
>>> # This will prevent the machine from idle-sleeping until bacula finishes.
>>>
>>> PATH=/bin:/usr/bin:/usr/sbin
>>>
>>> # We put a long delay here in case it takes bacula a while to get going.
>>> sleep 300
>>>
>>> # Now loop while looking at the network connection.
>>> # We limit checks to once every five minutes because worst-case the
>>> machine
>>> # just waits an extra five minutes to sleep.
>>> while ( netstat -an | grep '\.9102.*ESTABLISHED' >/dev/null ) ; do
>>> sleep 300
>>> done
>>>
>>> # Once the script exits, the wake-lock is released.
>>> exit 0
>>> --
>>>
>>>
>>> --
>>> David 

Re: [Bacula-users] Run ClientBeforeJob script in background instead of waiting for it.

2019-01-15 Thread David Brodbeck
Hmm. Unfortunately the solution below does not work on Mojave. Scripts no
longer have permission to run 'at' because they can't create
/usr/lib/cron/jobs/.lockfile.

Adding bacula-fd to the list of apps with full disk access doesn't do
anything, unfortunately, I guess because it's not a full-fledged app?
Running 'at' manually from the command line works, but only if Terminal is
added to the list, so it seems you need an "official" app somewhere in the
process tree. (This is also a problem for backing up certain files in user
home directories, but that's another issue.)


On Mon, Jan 7, 2019 at 11:53 AM David Brodbeck 
wrote:

> Forgot to CC this to the list, but it's the best solution I've gotten so
> far. It works, but on macOS you have to turn the 'at' service on first. I
> ended up with this:
>
> #!/bin/bash
>
> PATH=/bin:/usr/bin:/usr/local/bin
>
> # Script to prevent system sleep while bacula is working.
> # see bacula-idle-watch.sh for details.
>
> # We need to launch with 'at' to avoid bacula-fd hanging waiting for script
> # completion. First we make sure atrun is enabled.
> launchctl load -w /System/Library/LaunchDaemons/com.apple.atrun.plist
>
> echo '/usr/bin/caffeinate -s /usr/local/bin/bacula-idle-watch.sh' | at now
>
> ---
>
> Note that by nature 'at' is not immediate. It may take a minute or so for
> the script to launch, so plan accordingly.
>
> On Sat, Jan 5, 2019 at 8:18 AM Josh Fisher  wrote:
>
>> In the ClinetBeforeJob script, use the at command to schedule the launch
>> of the caffeinate job with a runtime of 'now'. For example,
>>
>> at -f caffeinate-script.sh now
>>
>>
>> On 1/4/2019 2:36 PM, David Brodbeck wrote:
>>
>> This is driving me nuts because I feel like it should be straightforward
>> and I must be missing something basic.
>>
>> I want to launch the caffeinate command on OS X before starting a job.
>> Caffeinate takes a command as an argument, then goes into the background
>> and keeps the machine awake until the command exits. I use this after
>> waking machines up using a WOL script.
>>
>> When tested from the command line, caffeinate immediately backgrounds
>> itself. However, when I try to run it as a Bacula ClientBeforeJob script,
>> bacula-fd waits around forever for caffeiniate to exit.
>>
>> Here's what I've tried so far:
>> - Having bacula run a script that then runs caffeinate.
>> - Having bacula run a script that then runs caffeinate using nohup.
>> - Having the script redirect stdin, stdout, and stderr of caffeinate to
>> /dev/null
>> - Adding an ampersand after the script in the bacula ClientBeforeJob
>> specification.
>>
>> What invariably happens is the bash process created by bacula becomes a
>> zombie and waits for caffeinate to exit. Inspecting the caffeinate process
>> with lsof shows all of the file handles are redirected to /dev/null as
>> expected, so I don't think this is a case of stdin or stdout causing
>> problems. In all cases the only way to get bacula to finish the backup is
>> to kill the script that caffeinate is running.
>>
>> I can't figure out why I can't get bacula-fd to move on after the script
>> goes into the background. When I run the script manually from the command
>> line it backgrounds immediately.
>>
>> The oddest thing is this worked fine on clients using bacula-fd version
>> 7.4.x, but fails on a client using 9.2.0.
>>
>> Here's the script bacula-fd runs, as it currently stands:
>>
>> --
>> #!/bin/bash
>>
>> PATH=/bin:/usr/bin:/usr/local/bin
>>
>> # Script to prevent system sleep while bacula is working.
>> # see bacula-idle-watch.sh for details.
>>
>> nohup caffeinate -s bacula-idle-watch.sh 2>&1 >/dev/null > --
>>
>> Here's the contents of bacula-idle-watch.sh; it just waits to exit until
>> there's no bacula network connection anymore. caffeinate will terminate
>> once the script exits.
>>
>> --
>> #!/bin/sh
>>
>> # This script delays a few minutes, then loops, checking for bacula-fd
>> # connections. When there are none, it exits.
>> # This is meant to be run with caffeinate in a bacula before-job script,
>> # e.g. "caffeinate -s bacula-idle-watch.sh"
>> # This will prevent the machine from idle-sleeping until bacula finishes.
>>
>> PATH=/bin:/usr/bin:/usr/sbin
>>
>> # We put a long delay here in case it takes bacula a while to get going.
>> sleep 300
>>
>> # Now loop while looking at the network connection.
>> # We limit checks to once every five minutes because worst-case the
>> machine
>> # just waits an extra five minutes to sleep.
>> while ( netstat -an | grep '\.9102.*ESTABLISHED' >/dev/null ) ; do
>> sleep 300
>> done
>>
>> # Once the script exits, the wake-lock is released.
>> exit 0
>> --
>>
>>
>> --
>> David Brodbeck
>> System Administrator, Department of Mathematics
>> University of California, Santa Barbara
>>
>>
>>
>> ___
>> Bacula-users mailing 
>> listBacula-users@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/bacula-users
>>
>>
>
> --
> David 

Re: [Bacula-users] Exclude not working

2019-01-15 Thread Stefanie Leisestreichler

Hi.
Thanks, it works now when I put  in the first option 
block like this definition:

Options {
  wilddir = "/*/nobackup"
  wilddir = "/*/TO_BE_ARCHIEVED"
  wilddir = "/*/yetanothertest"
  wildfile = "*.tmp"
  Exclude = yes
  ignore case = yes
}

How can I know what Options block is manipulating which config statements?

Thanks,
Stefanie

Am 15.01.19 um 20:00 schrieb Wanderlei Huttel:

Hello Stefanie

You must include the option " ignore case = yes" in the firts option too.

Best regards

*Wanderlei Hüttel*
http://www.bacula.com.br 


Em ter, 15 de jan de 2019 às 15:23, Stefanie Leisestreichler 
> escreveu:


Thanks, guys. This is working, except "ignore case". Did I miss
something?

Here is my test scenario, which I would expect to exclude
YETANOTHERTEST/ and noBackup/ (because of using )
also:

FileSet {
    Name = "backnix-2017"
    Include {
      Options {
        wilddir = "/*/nobackup"
        wilddir = "/*/TO_BE_ARCHIEVED"
        wilddir = "/*/yetanothertest"
        wildfile = "*.tmp"
        Exclude = yes
      }
      Options {
        signature = MD5
        compression = GZIP
        noatime = yes
        onefs = yes
        ignore case = yes
      }
      #File = /etc
      #File = /home
      File = /root
      #File = /opt                # Bacula
      #File = /var/log
      #File = /srv
    }
    Exclude {
      #/root/nobackup
    }
}

I have this structure in my file system:
[root@backnix-2017 ~]# ll
insgesamt 7276
-rw---. 1 root root    1766  8. Jan 2017  anaconda-ks.cfg
-rw-r--r--. 1 root root 3312236  8. Jan 2017  bacula-7.4.4.tar.gz
-rw-r--r--. 1 root root 4115337 10. Okt 15:56 bacula-9.2.1.tar.gz
drwxr-xr-x. 2 root root    4096 14. Jan 13:52 noBackup
-rw-r--r--. 1 root root       0 14. Jan 13:51 testtmp2.tmp
-rw-r--r--. 1 root root       5 14. Jan 13:48 testtmp.tmp
drwxr-xr-x. 2 root root    4096 15. Jan 17:46 yetanothertest
drwxr-xr-x. 2 root root    4096 15. Jan 17:46 YETANOTHERTEST

[root@backnix-2017 bin]# ./bconsole
Connecting to Director backnix-2017:9101
1000 OK: 103 backnix05-dir Version: 9.2.1 (12 August 2018)
Enter a period to cancel a command.
*
*reload
*
*estimate listing level=Full job=backnix-2017
Using Catalog "IcCatalog"
Connecting to Client backnix-2017-fd at 127.0.0.1:9102

-rw---   1 root     root            1766 2017-01-08 14:46:30
/root/anaconda-ks.cfg
-rw---   1 root     root           26289 2019-01-14 20:12:27
/root/.bash_history
-rw-r--r--   1 root     root             349 2018-12-19 18:24:00
/root/.ssh/known_hosts
drwx--   2 root     root            4096 2018-10-10 18:53:38 
/root/.ssh

-rw---   1 root     root           11717 2019-01-15 17:46:23
/root/.viminfo
-rw-r--r--   1 root     root         3312236 2017-01-08 16:39:26
/root/bacula-7.4.4.tar.gz
-rw---   1 root     root              82 2018-12-19 18:22:54
/root/.lesshst
-rw---   1 root     root            1024 2018-10-10 21:40:58 
/root/.rnd

-rw-r--r--   1 root     root               0 2019-01-14 13:52:42
/root/noBackup/noBackup.test
drwxr-xr-x   2 root     root            4096 2019-01-14 13:52:42
/root/noBackup
-rw-r--r--   1 root     root             129 2017-01-08 14:44:12
/root/.tcshrc
-rw-r--r--   1 root     root         4115337 2018-10-10 15:56:06
/root/bacula-9.2.1.tar.gz
-rw-r--r--   1 root     root              18 2017-01-08 14:44:12
/root/.bash_logout
-rw-r--r--   1 root     root               8 2019-01-15 17:46:23
/root/YETANOTHERTEST/test2.txt
drwxr-xr-x   2 root     root            4096 2019-01-15 17:46:23
/root/YETANOTHERTEST
-rw-r--r--   1 root     root             100 2017-01-08 14:44:12
/root/.cshrc
-rw---   1 root     root             431 2018-12-19 18:56:30
/root/.mysql_history
-rw-r--r--   1 root     root             176 2017-01-08 14:44:12
/root/.bashrc
-rw-r--r--   1 root     root             176 2017-01-08 14:44:12
/root/.bash_profile
dr-xr-x---   6 root     root            4096 2019-01-15 17:46:23  /root
2000 OK estimate files=20 bytes=7,469,838
*

Thanks,
Stefanie

Am 15.01.19 um 10:51 schrieb Wanderlei Huttel:
 > Hello Stefanie
 >
 > I like to include another option only to deal the exclude files
 >
 > FileSet {
 >     Name = "testnix-2017"
 >     Include {
 >       Options {
 >         wilddir = "/*/nobackup"
 >         wildfile = "*.tmp"
 >         Exclude = yes
 >       }
 >       Options {
 >         signature = MD5
 >         compression = GZIP
 >         

Re: [Bacula-users] Exclude not working

2019-01-15 Thread Wanderlei Huttel
Hello Stefanie

You must include the option " ignore case = yes" in the firts option too.

Best regards

*Wanderlei Hüttel*
http://www.bacula.com.br


Em ter, 15 de jan de 2019 às 15:23, Stefanie Leisestreichler <
stefanie.leisestreich...@peter-speer.de> escreveu:

> Thanks, guys. This is working, except "ignore case". Did I miss something?
>
> Here is my test scenario, which I would expect to exclude
> YETANOTHERTEST/ and noBackup/ (because of using ) also:
>
> FileSet {
>Name = "backnix-2017"
>Include {
>  Options {
>wilddir = "/*/nobackup"
>wilddir = "/*/TO_BE_ARCHIEVED"
>wilddir = "/*/yetanothertest"
>wildfile = "*.tmp"
>Exclude = yes
>  }
>  Options {
>signature = MD5
>compression = GZIP
>noatime = yes
>onefs = yes
>ignore case = yes
>  }
>  #File = /etc
>  #File = /home
>  File = /root
>  #File = /opt# Bacula
>  #File = /var/log
>  #File = /srv
>}
>Exclude {
>  #/root/nobackup
>}
> }
>
> I have this structure in my file system:
> [root@backnix-2017 ~]# ll
> insgesamt 7276
> -rw---. 1 root root1766  8. Jan 2017  anaconda-ks.cfg
> -rw-r--r--. 1 root root 3312236  8. Jan 2017  bacula-7.4.4.tar.gz
> -rw-r--r--. 1 root root 4115337 10. Okt 15:56 bacula-9.2.1.tar.gz
> drwxr-xr-x. 2 root root4096 14. Jan 13:52 noBackup
> -rw-r--r--. 1 root root   0 14. Jan 13:51 testtmp2.tmp
> -rw-r--r--. 1 root root   5 14. Jan 13:48 testtmp.tmp
> drwxr-xr-x. 2 root root4096 15. Jan 17:46 yetanothertest
> drwxr-xr-x. 2 root root4096 15. Jan 17:46 YETANOTHERTEST
>
> [root@backnix-2017 bin]# ./bconsole
> Connecting to Director backnix-2017:9101
> 1000 OK: 103 backnix05-dir Version: 9.2.1 (12 August 2018)
> Enter a period to cancel a command.
> *
> *reload
> *
> *estimate listing level=Full job=backnix-2017
> Using Catalog "IcCatalog"
> Connecting to Client backnix-2017-fd at 127.0.0.1:9102
> -rw---   1 root root1766 2017-01-08 14:46:30
> /root/anaconda-ks.cfg
> -rw---   1 root root   26289 2019-01-14 20:12:27
> /root/.bash_history
> -rw-r--r--   1 root root 349 2018-12-19 18:24:00
> /root/.ssh/known_hosts
> drwx--   2 root root4096 2018-10-10 18:53:38
> /root/.ssh
> -rw---   1 root root   11717 2019-01-15 17:46:23
> /root/.viminfo
> -rw-r--r--   1 root root 3312236 2017-01-08 16:39:26
> /root/bacula-7.4.4.tar.gz
> -rw---   1 root root  82 2018-12-19 18:22:54
> /root/.lesshst
> -rw---   1 root root1024 2018-10-10 21:40:58
> /root/.rnd
> -rw-r--r--   1 root root   0 2019-01-14 13:52:42
> /root/noBackup/noBackup.test
> drwxr-xr-x   2 root root4096 2019-01-14 13:52:42
> /root/noBackup
> -rw-r--r--   1 root root 129 2017-01-08 14:44:12
> /root/.tcshrc
> -rw-r--r--   1 root root 4115337 2018-10-10 15:56:06
> /root/bacula-9.2.1.tar.gz
> -rw-r--r--   1 root root  18 2017-01-08 14:44:12
> /root/.bash_logout
> -rw-r--r--   1 root root   8 2019-01-15 17:46:23
> /root/YETANOTHERTEST/test2.txt
> drwxr-xr-x   2 root root4096 2019-01-15 17:46:23
> /root/YETANOTHERTEST
> -rw-r--r--   1 root root 100 2017-01-08 14:44:12
> /root/.cshrc
> -rw---   1 root root 431 2018-12-19 18:56:30
> /root/.mysql_history
> -rw-r--r--   1 root root 176 2017-01-08 14:44:12
> /root/.bashrc
> -rw-r--r--   1 root root 176 2017-01-08 14:44:12
> /root/.bash_profile
> dr-xr-x---   6 root root4096 2019-01-15 17:46:23  /root
> 2000 OK estimate files=20 bytes=7,469,838
> *
>
> Thanks,
> Stefanie
>
> Am 15.01.19 um 10:51 schrieb Wanderlei Huttel:
> > Hello Stefanie
> >
> > I like to include another option only to deal the exclude files
> >
> > FileSet {
> > Name = "testnix-2017"
> > Include {
> >   Options {
> > wilddir = "/*/nobackup"
> > wildfile = "*.tmp"
> > Exclude = yes
> >   }
> >   Options {
> > signature = MD5
> > compression = GZIP
> > noatime = yes
> > onefs = yes
> > ignore case = yes
> >   }
> >   #File = /etc
> >   #File = /home
> >   File = /root
> >   #File = /opt# Bacula
> >   #File = /var/log
> >   #File = /srv
> > }
> > Exclude {
> >#File = "/root/nobackup"
> > }
> > }
> >
> > Before excluding:
> > *estimate listing level=Full job=Backup_Servidor_Bacula
> > Using Catalog "MyCatalog"
> > Connecting to Client srv_bacula-fd at localhost:9102
> > -rw-r--r--   1 root root  0 2018-12-05 10:58:28
> > /root/root
> > -rwxrwxrwx   1 root root260 2019-01-15 07:42:22
> > /root/nobackup/opa.sh
> > drwxr-xr-x   2 root root   4096 2019-01-15 

Re: [Bacula-users] Exclude not working

2019-01-15 Thread Stefanie Leisestreichler

Thanks, guys. This is working, except "ignore case". Did I miss something?

Here is my test scenario, which I would expect to exclude 
YETANOTHERTEST/ and noBackup/ (because of using ) also:


FileSet {
  Name = "backnix-2017"
  Include {
Options {
  wilddir = "/*/nobackup"
  wilddir = "/*/TO_BE_ARCHIEVED"
  wilddir = "/*/yetanothertest"
  wildfile = "*.tmp"
  Exclude = yes
}
Options {
  signature = MD5
  compression = GZIP
  noatime = yes
  onefs = yes
  ignore case = yes
}
#File = /etc
#File = /home
File = /root
#File = /opt# Bacula
#File = /var/log
#File = /srv
  }
  Exclude {
#/root/nobackup
  }
}

I have this structure in my file system:
[root@backnix-2017 ~]# ll
insgesamt 7276
-rw---. 1 root root1766  8. Jan 2017  anaconda-ks.cfg
-rw-r--r--. 1 root root 3312236  8. Jan 2017  bacula-7.4.4.tar.gz
-rw-r--r--. 1 root root 4115337 10. Okt 15:56 bacula-9.2.1.tar.gz
drwxr-xr-x. 2 root root4096 14. Jan 13:52 noBackup
-rw-r--r--. 1 root root   0 14. Jan 13:51 testtmp2.tmp
-rw-r--r--. 1 root root   5 14. Jan 13:48 testtmp.tmp
drwxr-xr-x. 2 root root4096 15. Jan 17:46 yetanothertest
drwxr-xr-x. 2 root root4096 15. Jan 17:46 YETANOTHERTEST

[root@backnix-2017 bin]# ./bconsole
Connecting to Director backnix-2017:9101
1000 OK: 103 backnix05-dir Version: 9.2.1 (12 August 2018)
Enter a period to cancel a command.
*
*reload
*
*estimate listing level=Full job=backnix-2017
Using Catalog "IcCatalog"
Connecting to Client backnix-2017-fd at 127.0.0.1:9102
-rw---   1 root root1766 2017-01-08 14:46:30 
/root/anaconda-ks.cfg
-rw---   1 root root   26289 2019-01-14 20:12:27 
/root/.bash_history
-rw-r--r--   1 root root 349 2018-12-19 18:24:00 
/root/.ssh/known_hosts

drwx--   2 root root4096 2018-10-10 18:53:38  /root/.ssh
-rw---   1 root root   11717 2019-01-15 17:46:23 
/root/.viminfo
-rw-r--r--   1 root root 3312236 2017-01-08 16:39:26 
/root/bacula-7.4.4.tar.gz
-rw---   1 root root  82 2018-12-19 18:22:54 
/root/.lesshst

-rw---   1 root root1024 2018-10-10 21:40:58  /root/.rnd
-rw-r--r--   1 root root   0 2019-01-14 13:52:42 
/root/noBackup/noBackup.test
drwxr-xr-x   2 root root4096 2019-01-14 13:52:42 
/root/noBackup
-rw-r--r--   1 root root 129 2017-01-08 14:44:12 
/root/.tcshrc
-rw-r--r--   1 root root 4115337 2018-10-10 15:56:06 
/root/bacula-9.2.1.tar.gz
-rw-r--r--   1 root root  18 2017-01-08 14:44:12 
/root/.bash_logout
-rw-r--r--   1 root root   8 2019-01-15 17:46:23 
/root/YETANOTHERTEST/test2.txt
drwxr-xr-x   2 root root4096 2019-01-15 17:46:23 
/root/YETANOTHERTEST
-rw-r--r--   1 root root 100 2017-01-08 14:44:12 
/root/.cshrc
-rw---   1 root root 431 2018-12-19 18:56:30 
/root/.mysql_history
-rw-r--r--   1 root root 176 2017-01-08 14:44:12 
/root/.bashrc
-rw-r--r--   1 root root 176 2017-01-08 14:44:12 
/root/.bash_profile

dr-xr-x---   6 root root4096 2019-01-15 17:46:23  /root
2000 OK estimate files=20 bytes=7,469,838
*

Thanks,
Stefanie

Am 15.01.19 um 10:51 schrieb Wanderlei Huttel:

Hello Stefanie

I like to include another option only to deal the exclude files

FileSet {
    Name = "testnix-2017"
    Include {
      Options {
        wilddir = "/*/nobackup"
        wildfile = "*.tmp"
        Exclude = yes
      }
      Options {
        signature = MD5
        compression = GZIP
        noatime = yes
        onefs = yes
        ignore case = yes
      }
      #File = /etc
      #File = /home
      File = /root
      #File = /opt                # Bacula
      #File = /var/log
      #File = /srv
    }
    Exclude {
       #File = "/root/nobackup"
    }
}

Before excluding:
*estimate listing level=Full job=Backup_Servidor_Bacula
Using Catalog "MyCatalog"
Connecting to Client srv_bacula-fd at localhost:9102
-rw-r--r--   1 root     root                      0 2018-12-05 10:58:28  
/root/root
-rwxrwxrwx   1 root     root                    260 2019-01-15 07:42:22  
/root/nobackup/opa.sh
drwxr-xr-x   2 root     root                   4096 2019-01-15 07:42:22  
/root/nobackup
-rw-r--r--   1 root     root                    955 2019-01-11 15:47:24  
/root/egroupware-epl-install.log
-rw-r--r--   1 root     root                      0 2019-01-15 07:44:36  
/root/test.tmp
-rwxr-xr-x   1 root     root                   5828 2017-09-26 10:15:54  
/root/_send_telegram.sh
-rwxrwxrwx   1 root     root                   1049 2017-05-23 16:53:02  
/root/catalog.sh
-rwxrwxrwx   1 root     root                    280 2017-05-23 15:01:06  
/root/while_com_end.sh
-rw-r--r--   1 root     root                  25449 2018-12-05 11:00:16  
/root/teste.txt
-rwxrwxrwx   1 root   

Re: [Bacula-users] Baculum restorations issues

2019-01-15 Thread Frédéric F .
I think I have found the solution to my problem with bvfs_cache.

I added the .bvfs_update console command to my catalog backup and when
I clear this cache, it’s slow again.

Le mar. 15 janv. 2019 à 10:09, Frédéric F.  a écrit :
>
> Thank you for your answer.
>
> So I will wait for the next release to update :)
>
> About the lag in the Baculum restore wizard, is everyone suffering
> this issue ? Because it is very random.
>
> Best regards.
>
> Frédéric.
>
> Le sam. 12 janv. 2019 à 20:38, Marcin Haba  a écrit :
> >
> > Hello Frédéric,
> >
> > Thanks for your feedback about using the Baculum.
> >
> > The apostrophe problem is a bug that will be fixed in next release.
> > Thanks for reporting it.
> >
> > To the lag when you are going through the restore wizard it is caused
> > by Bvfs cache that has to be built before showing restore browser
> > content. The Baculum uses the Bvfs Bacula feature in restore wizard. I
> > understand that for many files and paths this proces can take a while
> > but I don't know if there is possible to optimize something here.
> >
> > Best regards.
> > Marcin Haba (gani)
> >
> > On Fri, 11 Jan 2019 at 16:08, Frédéric F.  wrote:
> > >
> > > Hello,
> > >
> > > Thank you for your answer, I will try your fork next week.
> > > I use CentOS for intructions.
> > >
> > > If anyone have an idea about my issues, I am interested.
> > >
> > > Le ven. 11 janv. 2019 à 12:27, Wanderlei Huttel
> > >  a écrit :
> > > >
> > > > Are you using CentOS or Debian?
> > > >
> > > > Best regards
> > > >
> > > > Wanderlei Hüttel
> > > > http://www.bacula.com.br
> > > >
> > > >
> > > > Em sex, 11 de jan de 2019 às 09:24, Chris Wilkinson 
> > > >  escreveu:
> > > >>
> > > >> My Portuguese is not so good
> > > >>
> > > >> Regards
> > > >> Chris Wilkinson
> > > >>
> > > >> On Fri, 11 Jan 2019, 11:22 am Wanderlei Huttel 
> > > >>  > > >>>
> > > >>> Hello Chris
> > > >>>
> > > >>> Yes there is, but the instructions are in Portuguese.
> > > >>> https://github.com/wanderleihuttel/bacula-utils/tree/master/tutorial
> > > >>>
> > > >>>
> > > >>> Best regards
> > > >>>
> > > >>> Wanderlei Hüttel
> > > >>> http://www.bacula.com.br
> > > >>>
> > > >>>
> > > >>> Em sex, 11 de jan de 2019 às 09:16, Chris Wilkinson 
> > > >>>  escreveu:
> > > 
> > >  Very interesting. Is there a link for the installation instructions? 
> > >  The docs folder appears to be old.
> > > 
> > >  Regards
> > >  Chris Wilkinson
> > > 
> > >  On Fri, 11 Jan 2019, 9:34 a.m. Wanderlei Huttel 
> > >   > > >
> > > > Hello Frederic
> > > >
> > > > I have a fork o Webacula with a new visual and some improvements.
> > > > https://github.com/wanderleihuttel/webacula
> > > >
> > > > You cant take a look in the screens here:
> > > > https://github.com/wanderleihuttel/webacula/wiki
> > > >
> > > > Best regards
> > > >
> > > > Wanderlei Hüttel
> > > > http://www.bacula.com.br
> > > >
> > > >
> > > > Em qui, 10 de jan de 2019 às 20:48, Frédéric F. 
> > > >  escreveu:
> > > >>
> > > >> Hello everyone,
> > > >> I use Bacula for 3 months and I am happy to use it.
> > > >> However I have several problems with the GUI Baculum.
> > > >>
> > > >> In Baculum, I have problem to restore files with path contains '
> > > >> character like "D:\Data\l'information"
> > > >> I can see in baculum the folder but when I select it, I can't 
> > > >> browse
> > > >> into, the sub folder is empty.
> > > >> I can restore upper folder but it's not a great job.
> > > >> Any advice to browse in baculum with folders with special 
> > > >> character ?
> > > >> I have a lot...
> > > >>
> > > >> Another problem with Baculum :
> > > >> Randomly, I have some lag (about 20 minutes) when I select a "group
> > > >> most recent backup" or one full backup in the list.
> > > >> My postgresql DB is working at 100% on 1CPU/8 for about 20 minutes.
> > > >>
> > > >> I optimize my postgresql DB and with pg_stat_statements, I found 
> > > >> the
> > > >> slow bacula query (sorry for presentation) :
> > > >>
> > > >> postgres=# SELECT *
> > > >> FROM
> > > >>   pg_stat_statements
> > > >> ORDER BY
> > > >>   total_time DESC;
> > > >>  userid | dbid  |  queryid   |  query | calls  |total_time|
> > > >> min_time|   max_time|  mean_time  | stddev_time
> > > >> |   rows| shared_blks_hit | shared_blks_read | 
> > > >> shared_blks_dirtied
> > > >> | shared_blks_written | local_blks_hit | local_blks_read |
> > > >> local_blks_dirtied | local_blks_written | temp_blks_read |
> > > >> temp_blks_written | blk_read_time | blk_write_time
> > > >>
> > > >>  10 | 16384 | 1980744281 | INSERT INTO PathVisibility (PathId,
> > > >> JobId)  SELECT a.PathId,$1 FROM ( SELECT DISTINCT h.PPathId AS 
> > > >> PathId
> > > >> FROM 

Re: [Bacula-users] Running a script each time a client is addressed

2019-01-15 Thread PenguinWhispererThe
I prefer not editing supplied scripts as they'd have to be adapted with
updates.
The second suggesstion sounds like a great idea :) I'll look into it.

Op ma 14 jan. 2019 om 13:40 schreef Martin Simmons :

> Here are two possible solutions:
>
> * Make the tunnel at startup (e.g. in the script that starts bacula-dir).
>
> * Use something like inetd to make an ssh connection on-demand (e.g. like
>   https://capocasa.net/on-demand-ssh-port-forwarding-with-inetd).
>
> __Martin
>
>
> > On Fri, 11 Jan 2019 20:55:04 +0100, PenguinWhispererThe  said:
> >
> > Hi,
> >
> > What I'm trying to do feels obvious but I can't find what I'm looking
> for.
> >
> > I have a client that's remote. The connectivity to the remote client is
> > established through an SSH script.
> > In general the SSH connection is up or re-established when a job runs
> > through Run Before Job in a JobDefs piece.
> > This works properly.
> >
> > Once in a while I want to retrieve the status of the client. This
> > frequently times out and the cause seems to be that the Run Before Job is
> > not being executed (which is obviously as designed).
> > Now I'd like to know if there's a way to start a script every time you
> > connect to the client.
> > I've checked the documentation on the Client definition but couldn't see
> > anything that fits my needs.
> >
> > How could I make this work? Or what is the configuration to accomplish
> this?
> >
> > Thanks in advance.
>
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Exclude not working

2019-01-15 Thread Wanderlei Huttel
Hello Stefanie

I like to include another option only to deal the exclude files

FileSet {
   Name = "testnix-2017"
   Include {
 Options {
   wilddir = "/*/nobackup"
   wildfile = "*.tmp"
   Exclude = yes
 }
 Options {
   signature = MD5
   compression = GZIP
   noatime = yes
   onefs = yes
   ignore case = yes
 }
 #File = /etc
 #File = /home
 File = /root
 #File = /opt# Bacula
 #File = /var/log
 #File = /srv
   }
   Exclude {
  #File = "/root/nobackup"
   }
}

Before excluding:
*estimate listing level=Full job=Backup_Servidor_Bacula
Using Catalog "MyCatalog"
Connecting to Client srv_bacula-fd at localhost:9102
-rw-r--r--   1 root root  0 2018-12-05 10:58:28
/root/root
-rwxrwxrwx   1 root root260 2019-01-15 07:42:22
/root/nobackup/opa.sh
drwxr-xr-x   2 root root   4096 2019-01-15 07:42:22
/root/nobackup
-rw-r--r--   1 root root955 2019-01-11 15:47:24
/root/egroupware-epl-install.log
-rw-r--r--   1 root root  0 2019-01-15 07:44:36
/root/test.tmp
-rwxr-xr-x   1 root root   5828 2017-09-26 10:15:54
/root/_send_telegram.sh
-rwxrwxrwx   1 root root   1049 2017-05-23 16:53:02
/root/catalog.sh
-rwxrwxrwx   1 root root280 2017-05-23 15:01:06
/root/while_com_end.sh
-rw-r--r--   1 root root  25449 2018-12-05 11:00:16
/root/teste.txt
-rwxrwxrwx   1 root root428 2017-05-23 21:37:23
/root/run.sh
drwx--  14 root root   4096 2019-01-15 07:47:06
/root
2000 OK estimate files=11 bytes=34,249



After excluding:
*estimate listing level=Full job=Backup_Servidor_Bacula
Using Catalog "MyCatalog"
Connecting to Client srv_bacula-fd at localhost:9102
-rw-r--r--   1 root root  0 2018-12-05 10:58:28
/root/root
-rw-r--r--   1 root root955 2019-01-11 15:47:24
/root/egroupware-epl-install.log
-rwxr-xr-x   1 root root   5828 2017-09-26 10:15:54
/root/_send_telegram.sh
-rwxrwxrwx   1 root root   1049 2017-05-23 16:53:02
/root/catalog.sh
-rwxrwxrwx   1 root root280 2017-05-23 15:01:06
/root/while_com_end.sh
-rw-r--r--   1 root root  25449 2018-12-05 11:00:16
/root/teste.txt
-rwxrwxrwx   1 root root428 2017-05-23 21:37:23
/root/run.sh
drwx--  14 root root   4096 2019-01-15 07:47:46
/root
2000 OK estimate files=8 bytes=33,989


Best regards

*Wanderlei Hüttel*
http://www.bacula.com.br


Em ter, 15 de jan de 2019 às 07:28, Stefanie Leisestreichler <
stefanie.leisestreich...@peter-speer.de> escreveu:

> Hi.
>
> I have this FileSet Definition. Why is exclude not working and folder
> nobackup is backuped?
> For test purposes I have created a folder /root/nobackup
>
> Bacula version is 9.2.0.
>
> Thanks.
> Stefanie
>
>
> FileSet {
>Name = "testnix-2017"
>Include {
>  Options {
>signature = MD5
>compression = GZIP
>noatime = yes
>onefs = yes
>ignore case = yes
>Exclude = yes
>wilddir = "nobackup"
>wildfile = "*.tmp"
>
>  }
>  #File = /etc
>  #File = /home
>  File = /root
>  #File = /opt# Bacula
>  #File = /var/log
>  #File = /srv
>}
>Exclude {
>
>}
> }
>
>
>
> ___
> Bacula-users mailing list
> Bacula-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bacula-users
>
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Exclude not working

2019-01-15 Thread Olivier Delestre

Hi,

test with :

wilddir = "/*/nobackup"

bye

Le 15/01/2019 à 10:25, Stefanie Leisestreichler a écrit :

Hi.

I have this FileSet Definition. Why is exclude not working and folder 
nobackup is backuped?

For test purposes I have created a folder /root/nobackup

Bacula version is 9.2.0.

Thanks.
Stefanie


FileSet {
  Name = "testnix-2017"
  Include {
    Options {
  signature = MD5
  compression = GZIP
  noatime = yes
  onefs = yes
  ignore case = yes
  Exclude = yes
  wilddir = "nobackup"
  wildfile = "*.tmp"

    }
    #File = /etc
    #File = /home
    File = /root
    #File = /opt    # Bacula
    #File = /var/log
    #File = /srv
  }
  Exclude {

  }
}



___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users




___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


[Bacula-users] Exclude not working

2019-01-15 Thread Stefanie Leisestreichler

Hi.

I have this FileSet Definition. Why is exclude not working and folder 
nobackup is backuped?

For test purposes I have created a folder /root/nobackup

Bacula version is 9.2.0.

Thanks.
Stefanie


FileSet {
  Name = "testnix-2017"
  Include {
    Options {
  signature = MD5
  compression = GZIP
  noatime = yes
  onefs = yes
  ignore case = yes
  Exclude = yes
  wilddir = "nobackup"
  wildfile = "*.tmp"

    }
    #File = /etc
    #File = /home
    File = /root
    #File = /opt    # Bacula
    #File = /var/log
    #File = /srv
  }
  Exclude {

  }
}



___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Baculum restorations issues

2019-01-15 Thread Frédéric F .
Thank you for your answer.

So I will wait for the next release to update :)

About the lag in the Baculum restore wizard, is everyone suffering
this issue ? Because it is very random.

Best regards.

Frédéric.

Le sam. 12 janv. 2019 à 20:38, Marcin Haba  a écrit :
>
> Hello Frédéric,
>
> Thanks for your feedback about using the Baculum.
>
> The apostrophe problem is a bug that will be fixed in next release.
> Thanks for reporting it.
>
> To the lag when you are going through the restore wizard it is caused
> by Bvfs cache that has to be built before showing restore browser
> content. The Baculum uses the Bvfs Bacula feature in restore wizard. I
> understand that for many files and paths this proces can take a while
> but I don't know if there is possible to optimize something here.
>
> Best regards.
> Marcin Haba (gani)
>
> On Fri, 11 Jan 2019 at 16:08, Frédéric F.  wrote:
> >
> > Hello,
> >
> > Thank you for your answer, I will try your fork next week.
> > I use CentOS for intructions.
> >
> > If anyone have an idea about my issues, I am interested.
> >
> > Le ven. 11 janv. 2019 à 12:27, Wanderlei Huttel
> >  a écrit :
> > >
> > > Are you using CentOS or Debian?
> > >
> > > Best regards
> > >
> > > Wanderlei Hüttel
> > > http://www.bacula.com.br
> > >
> > >
> > > Em sex, 11 de jan de 2019 às 09:24, Chris Wilkinson 
> > >  escreveu:
> > >>
> > >> My Portuguese is not so good
> > >>
> > >> Regards
> > >> Chris Wilkinson
> > >>
> > >> On Fri, 11 Jan 2019, 11:22 am Wanderlei Huttel 
> > >>  > >>>
> > >>> Hello Chris
> > >>>
> > >>> Yes there is, but the instructions are in Portuguese.
> > >>> https://github.com/wanderleihuttel/bacula-utils/tree/master/tutorial
> > >>>
> > >>>
> > >>> Best regards
> > >>>
> > >>> Wanderlei Hüttel
> > >>> http://www.bacula.com.br
> > >>>
> > >>>
> > >>> Em sex, 11 de jan de 2019 às 09:16, Chris Wilkinson 
> > >>>  escreveu:
> > 
> >  Very interesting. Is there a link for the installation instructions? 
> >  The docs folder appears to be old.
> > 
> >  Regards
> >  Chris Wilkinson
> > 
> >  On Fri, 11 Jan 2019, 9:34 a.m. Wanderlei Huttel 
> >   > >
> > > Hello Frederic
> > >
> > > I have a fork o Webacula with a new visual and some improvements.
> > > https://github.com/wanderleihuttel/webacula
> > >
> > > You cant take a look in the screens here:
> > > https://github.com/wanderleihuttel/webacula/wiki
> > >
> > > Best regards
> > >
> > > Wanderlei Hüttel
> > > http://www.bacula.com.br
> > >
> > >
> > > Em qui, 10 de jan de 2019 às 20:48, Frédéric F. 
> > >  escreveu:
> > >>
> > >> Hello everyone,
> > >> I use Bacula for 3 months and I am happy to use it.
> > >> However I have several problems with the GUI Baculum.
> > >>
> > >> In Baculum, I have problem to restore files with path contains '
> > >> character like "D:\Data\l'information"
> > >> I can see in baculum the folder but when I select it, I can't browse
> > >> into, the sub folder is empty.
> > >> I can restore upper folder but it's not a great job.
> > >> Any advice to browse in baculum with folders with special character ?
> > >> I have a lot...
> > >>
> > >> Another problem with Baculum :
> > >> Randomly, I have some lag (about 20 minutes) when I select a "group
> > >> most recent backup" or one full backup in the list.
> > >> My postgresql DB is working at 100% on 1CPU/8 for about 20 minutes.
> > >>
> > >> I optimize my postgresql DB and with pg_stat_statements, I found the
> > >> slow bacula query (sorry for presentation) :
> > >>
> > >> postgres=# SELECT *
> > >> FROM
> > >>   pg_stat_statements
> > >> ORDER BY
> > >>   total_time DESC;
> > >>  userid | dbid  |  queryid   |  query | calls  |total_time|
> > >> min_time|   max_time|  mean_time  | stddev_time
> > >> |   rows| shared_blks_hit | shared_blks_read | 
> > >> shared_blks_dirtied
> > >> | shared_blks_written | local_blks_hit | local_blks_read |
> > >> local_blks_dirtied | local_blks_written | temp_blks_read |
> > >> temp_blks_written | blk_read_time | blk_write_time
> > >>
> > >>  10 | 16384 | 1980744281 | INSERT INTO PathVisibility (PathId,
> > >> JobId)  SELECT a.PathId,$1 FROM ( SELECT DISTINCT h.PPathId AS PathId
> > >> FROM PathHierarchy AS h JOIN  P
> > >> athVisibility AS p ON (h.PathId=p.PathId) WHERE p.JobId=$2) AS a LEFT
> > >> JOIN (SELECT PathId FROM PathVisibility WHERE JobId=$3) AS b ON
> > >> (a.PathId = b.PathId) WHERE b.Path
> > >> Id IS NULL  | 60 |   1478982.747849 |  0.225819 |
> > >> 484839.953712 |  24649.71246415 | 105518.8118646
> > >> 13 |  4074 |   205691266 |  165 |
> > >> 62 |   0 |  0 |   0 |
> > >> 0 |
> > >>0 |