Re: [Bacula-users] Way to check ANY bacula volume on disk

2015-08-12 Thread Kern Sibbald
On 12.08.2015 15:17, Andrey Tataranovich wrote:
> On Tue, 11 Aug 2015 15:47:40 +0100
> Martin Simmons  wrote:
>
>> You could use bls -j with the volume file to scan the whole volume.
> I'm upset with bls behavior - it does not return non zero exit code
> on error and output error messages to stdout instead of stderr.
>
> # bls -j /bacula/backup/Libvirt-0177; echo $?
> bls: butil.c:287 Using device: "/bacula/backup" for reading.
> 12-Aug 16:11 bls JobId 0: Ready to read from volume "Libvirt-0177" on
> device "FileStorage" (/bacula/backup). Volume Record: File:blk=0:196
> SessId=6 SessTime=1438429819 JobId=0 DataLen=161 Begin Job Session
> Record: File:blk=0:64708 SessId=6 SessTime=1438429819 JobId=7462
> Job=Backup_Win2k3.2015-08-02_22.00.00_20 Date=02-Aug-2015 22:18:05
> Level=F Type=B 12-Aug 16:12 bls JobId 0: Error: block.c:318 Volume data
> error at 1:1073721369! Block checksum mismatch in block=83221
> len=64512: calc=91787392 blk=161ef20e
> 0
>
> Is it fixed in newer versions? Currently I'm using 5.2.6.

I don't think any of the SD tools return error status.  They were
originally designed just to be manually run tools.  None of the tools
write to stderr.  Basically they all use most of the daemon code, since 
daemons do not normally have stdin, stdout, and stderr working with
those devices in the tools is a bit awkward.

If you are upset with its behavior, maybe you could fix it and send a
patch -- as long as you are willing to sign an FLA, we would most likely
integrate your patch.

Best regards,
Kern


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


Re: [Bacula-users] Way to check ANY bacula volume on disk

2015-08-12 Thread Ana Emília M . Arruda
Sorry, my earlier message was incomplete :)

Hello all,

Looking at the 7.0.5 version code, It seems that the part that checks the
checksum error (block_util.c, unser_block_header function) detects the
checksum error but does not return the non zero exit code, as occurs in
other parts of the code, for other errors found on unserializing the header
block.

 block->read_errors++;
 if (!forge_on) {
return false;
 }

Maybe this "if (!forge_on)" should not be there. In the case it was just to
let the code:

block->read_errors++;
return false;

I´m not sure if this is the wanted behavior or not. I will try to run some
tests to verify this.

Best regards,
Ana

On Wed, Aug 12, 2015 at 1:43 PM, Josip Deanovic 
wrote:

> On Wednesday 2015-08-12 16:17:42 Andrey Tataranovich wrote:
> > On Tue, 11 Aug 2015 15:47:40 +0100
> >
> > Martin Simmons  wrote:
> > > You could use bls -j with the volume file to scan the whole volume.
> >
> > I'm upset with bls behavior - it does not return non zero exit code
> > on error and output error messages to stdout instead of stderr.
> >
> > # bls -j /bacula/backup/Libvirt-0177; echo $?
> > bls: butil.c:287 Using device: "/bacula/backup" for reading.
> > 12-Aug 16:11 bls JobId 0: Ready to read from volume "Libvirt-0177" on
> > device "FileStorage" (/bacula/backup). Volume Record: File:blk=0:196
> > SessId=6 SessTime=1438429819 JobId=0 DataLen=161 Begin Job Session
> > Record: File:blk=0:64708 SessId=6 SessTime=1438429819 JobId=7462
> > Job=Backup_Win2k3.2015-08-02_22.00.00_20 Date=02-Aug-2015 22:18:05
> > Level=F Type=B 12-Aug 16:12 bls JobId 0: Error: block.c:318 Volume data
> > error at 1:1073721369! Block checksum mismatch in block=83221
> > len=64512: calc=91787392 blk=161ef20e
> > 0
> >
> > Is it fixed in newer versions? Currently I'm using 5.2.6.
>
>
> Hi Andrey,
>
>
> I am using bacula 7.0.5 and I have tried to emulate the damaged backup
> volume but I have failed to get the Block checksum mismatch error.
>
> Since in my case bls continues to work up until the end of the volume
> it returns 0 which might be fine depending on the developer's decision
> whether the operation should be considered successful or not.
>
> Im my tests all the messages, including Error messages are sent to the
> stdout instead of the stderr. Again, there might be some logic behind
> it but it might be a good idea to send Error messages to the stderr.
>
> In your case I believe that the return value should be 1 as bls
> obviously encountered a fatal error and exited but since I failed to
> reproduce the problem you are experiencing I cannot confirm that is has
> been fixed without looking into the code.
>
>
> --
> Josip Deanovic
>
>
> --
> ___
> 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] Way to check ANY bacula volume on disk

2015-08-12 Thread Ana Emília M . Arruda
Hello all,

Looking at the 7.0.5 version code, It seems that the part that checks the
checksum error (block_util.c) detects the checksum error but does not
return the non zero exit code, as occurs in other parts of the code.

 block->read_errors++;
 if (!forge_on) {
return false;
 }

Maybe this "if (!forge_on)" should not be there. In the case it was just



return non zero exit code
on error

On Wed, Aug 12, 2015 at 1:43 PM, Josip Deanovic 
wrote:

> On Wednesday 2015-08-12 16:17:42 Andrey Tataranovich wrote:
> > On Tue, 11 Aug 2015 15:47:40 +0100
> >
> > Martin Simmons  wrote:
> > > You could use bls -j with the volume file to scan the whole volume.
> >
> > I'm upset with bls behavior - it does not return non zero exit code
> > on error and output error messages to stdout instead of stderr.
> >
> > # bls -j /bacula/backup/Libvirt-0177; echo $?
> > bls: butil.c:287 Using device: "/bacula/backup" for reading.
> > 12-Aug 16:11 bls JobId 0: Ready to read from volume "Libvirt-0177" on
> > device "FileStorage" (/bacula/backup). Volume Record: File:blk=0:196
> > SessId=6 SessTime=1438429819 JobId=0 DataLen=161 Begin Job Session
> > Record: File:blk=0:64708 SessId=6 SessTime=1438429819 JobId=7462
> > Job=Backup_Win2k3.2015-08-02_22.00.00_20 Date=02-Aug-2015 22:18:05
> > Level=F Type=B 12-Aug 16:12 bls JobId 0: Error: block.c:318 Volume data
> > error at 1:1073721369! Block checksum mismatch in block=83221
> > len=64512: calc=91787392 blk=161ef20e
> > 0
> >
> > Is it fixed in newer versions? Currently I'm using 5.2.6.
>
>
> Hi Andrey,
>
>
> I am using bacula 7.0.5 and I have tried to emulate the damaged backup
> volume but I have failed to get the Block checksum mismatch error.
>
> Since in my case bls continues to work up until the end of the volume
> it returns 0 which might be fine depending on the developer's decision
> whether the operation should be considered successful or not.
>
> Im my tests all the messages, including Error messages are sent to the
> stdout instead of the stderr. Again, there might be some logic behind
> it but it might be a good idea to send Error messages to the stderr.
>
> In your case I believe that the return value should be 1 as bls
> obviously encountered a fatal error and exited but since I failed to
> reproduce the problem you are experiencing I cannot confirm that is has
> been fixed without looking into the code.
>
>
> --
> Josip Deanovic
>
>
> --
> ___
> 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] Bacula + MS SQLServer + Shadow Copy

2015-08-12 Thread Gilberto Nunes
Hello Kern...

I did not received that warning...
I use the latest version of bacula windows client, downloaded from sf.net...
BTW, I solved the trouble... Thanks a lot!

2015-08-12 3:08 GMT-03:00 Kern Sibbald :

> On 12.08.2015 00:49, Gilberto Nunes wrote:
>
> Hello guys
> I am very sorry!
> It was my mistake... I had installed 32 bits version with Windows 64 bits!
>
>
> Yes, that is easy to do.  The newer Windows installers detect the problem
> and refuse to install the wrong version.
>
> Best regards,
> Kern
>
>
>
> Sorry for the mess!
>
> Thanks
>
> 2015-08-11 18:06 GMT-03:00 E.L.L. Assoua :
>
>> Dear Gilberto,
>>
>> Place the following option in your FileSet configuration:
>>
>> Enable VSS = yes
>>
>> This option will allow Bacula to backup open files.
>> Use this option only when you are trying to backup Windows machine with a
>> OS not prior to Windows XP.
>>
>> Quoting the Bacula Main Reference - 09112014:
>>
>> "Technically Bacula creates a shadow copy as soon as the backup process
>> starts. It does then backup all files from the shadow copy and destroys the
>> shadow copy after the backup process."
>>
>> In short:
>>
>> - Bacula will start the VSS service on you Windows Server to create a
>> backup.
>> - After the backup is done, Bacula will stop the VSS service.
>>
>>
>> 
>>
>> Here is an example of a FileSet with VSS enabled:
>>
>> FileSet {
>>  Name = "Windows FileSet"
>>  Enable VSS = yes
>>  Include {
>> Options {
>>   signature = MD5
>>   compression = GZIP
>>   }
>> File = "C:/"
>>   }
>>  Exclude {
>> File = "C:/pagefile.sys"
>> File = "C:/hiberfil.sys"
>>   }
>>
>> }
>>
>>
>> Best regards,
>>
>> Luc Assoua.
>>
>> Gilberto Nunes 
>> Friday, August 7, 2015 2:03 PM via Postbox
>> 
>> Hello friends...
>>
>> Is there anybody here know something about make backup with bacula in a
>> MS Windows with SQL Server??
>> I try it, but I get error that Shadow Copy is not active!
>> So I ask because I am afraid that active Shadow Copy will interfere with
>> SQL Server in same way...
>>
>> I hope that I am clear about this issue!
>>
>> Thanks for any kind of help.
>>
>> Best regards
>>
>> --
>>
>> Gilberto Ferreira
>> +55 (47) 9676-7530 <%2B55%20%2847%29%209676-7530>
>> Skype: gilberto.nunes36
>>
>>
>> --
>> ___
>> Bacula-users mailing list
>> Bacula-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/bacula-users
>>
>>
>> --
>> Sent from Postbox
>> 
>>
>
>
>
> --
>
> Gilberto Ferreira
> +55 (47) 9676-7530
> Skype: gilberto.nunes36
>
>
>
> --
>
>
>
> ___
> Bacula-users mailing 
> listBacula-users@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/bacula-users
>
>
>


-- 

Gilberto Ferreira
+55 (47) 9676-7530
Skype: gilberto.nunes36
--
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Way to check ANY bacula volume on disk

2015-08-12 Thread Josip Deanovic
On Wednesday 2015-08-12 16:17:42 Andrey Tataranovich wrote:
> On Tue, 11 Aug 2015 15:47:40 +0100
> 
> Martin Simmons  wrote:
> > You could use bls -j with the volume file to scan the whole volume.
> 
> I'm upset with bls behavior - it does not return non zero exit code
> on error and output error messages to stdout instead of stderr.
> 
> # bls -j /bacula/backup/Libvirt-0177; echo $?
> bls: butil.c:287 Using device: "/bacula/backup" for reading.
> 12-Aug 16:11 bls JobId 0: Ready to read from volume "Libvirt-0177" on
> device "FileStorage" (/bacula/backup). Volume Record: File:blk=0:196
> SessId=6 SessTime=1438429819 JobId=0 DataLen=161 Begin Job Session
> Record: File:blk=0:64708 SessId=6 SessTime=1438429819 JobId=7462
> Job=Backup_Win2k3.2015-08-02_22.00.00_20 Date=02-Aug-2015 22:18:05
> Level=F Type=B 12-Aug 16:12 bls JobId 0: Error: block.c:318 Volume data
> error at 1:1073721369! Block checksum mismatch in block=83221
> len=64512: calc=91787392 blk=161ef20e
> 0
> 
> Is it fixed in newer versions? Currently I'm using 5.2.6.


Hi Andrey,


I am using bacula 7.0.5 and I have tried to emulate the damaged backup
volume but I have failed to get the Block checksum mismatch error.

Since in my case bls continues to work up until the end of the volume
it returns 0 which might be fine depending on the developer's decision
whether the operation should be considered successful or not.

Im my tests all the messages, including Error messages are sent to the
stdout instead of the stderr. Again, there might be some logic behind
it but it might be a good idea to send Error messages to the stderr.

In your case I believe that the return value should be 1 as bls
obviously encountered a fatal error and exited but since I failed to
reproduce the problem you are experiencing I cannot confirm that is has
been fixed without looking into the code.


-- 
Josip Deanovic

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


Re: [Bacula-users] Bacula problem with Volumes/Label

2015-08-12 Thread John Drescher
> The Error:
> 12-Aug 13:27 mccallister-dir JobId 243: Start Backup JobId 243, 
> Job=BaculaConfBackup.2015-08-12_13.27.54_54
> 12-Aug 13:27 mccallister-dir JobId 243: Using Device "BacDev" to write.
> 12-Aug 13:28 mccallister-sd JobId 243: End of Volume "Vol-0224" at 0:0 on 
> device "BacDev" (/Booberella/Bacula/). Write of 200 bytes got -1.
> 12-Aug 13:28 mccallister-sd JobId 243: End of Volume "Vol-0224" at 0:0 on 
> device "BacDev" (/Booberella/Bacula/). Write of 200 bytes got -1.
> 12-Aug 13:28 mccallister-sd JobId 243: Marking Volume "Vol-0224" in Error in 
> Catalog.
> 12-Aug 13:28 mccallister-dir JobId 243: Created new Volume="Vol-0225", 
> Pool="File", MediaType="File" in catalog.
> 12-Aug 13:28 mccallister-sd JobId 243: End of Volume "Vol-0225" at 0:0 on 
> device "BacDev" (/Booberella/Bacula/). Write of 200 bytes got -1.
> 12-Aug 13:28 mccallister-sd JobId 243: End of Volume "Vol-0225" at 0:0 on 
> device "BacDev" (/Booberella/Bacula/). Write of 200 bytes got -1.
> 12-Aug 13:28 mccallister-sd JobId 243: Marking Volume "Vol-0225" in Error in 
> Catalog.
> 12-Aug 13:28 mccallister-dir JobId 243: Created new Volume="Vol-0226", 
> Pool="File", MediaType="File" in catalog.
> 12-Aug 13:28 mccallister-sd JobId 243: End of Volume "Vol-0226" at 0:0 on 
> device "BacDev" (/Booberella/Bacula/). Write of 200 bytes got -1.
> 12-Aug 13:28 mccallister-sd JobId 243: End of Volume "Vol-0226" at 0:0 on 
> device "BacDev" (/Booberella/Bacula/). Write of 200 bytes got -1.
> 12-Aug 13:28 mccallister-sd JobId 243: Marking Volume "Vol-0226" in Error in 
> Catalog.
> 12-Aug 13:28 mccallister-dir JobId 243: Created new Volume="Vol-0227", 
> Pool="File", MediaType="File" in catalog.
> 12-Aug 13:28 mccallister-sd JobId 243: End of Volume "Vol-0227" at 0:0 on 
> device "BacDev" (/Booberella/Bacula/). Write of 200 bytes got -1.
> 12-Aug 13:28 mccallister-sd JobId 243: End of Volume "Vol-0227" at 0:0 on 
> device "BacDev" (/Booberella/Bacula/). Write of 200 bytes got -1.
> 12-Aug 13:28 mccallister-sd JobId 243: Marking Volume "Vol-0227" in Error in 
> Catalog.
> 12-Aug 13:28 mccallister-dir JobId 243: Created new Volume="Vol-0228", 
> Pool="File", MediaType="File" in catalog.
> 12-Aug 13:28 mccallister-sd JobId 243: End of Volume "Vol-0228" at 0:0 on 
> device "BacDev" (/Booberella/Bacula/). Write of 200 bytes got -1.
> 12-Aug 13:28 mccallister-sd JobId 243: End of Volume "Vol-0228" at 0:0 on 
> device "BacDev" (/Booberella/Bacula/). Write of 200 bytes got -1.
> 12-Aug 13:28 mccallister-sd JobId 243: Marking Volume "Vol-0228" in Error in 
> Catalog.
> 12-Aug 13:28 mccallister-sd JobId 243: Please mount append Volume "Vol-0228" 
> or label a new one for:
> Job:  BaculaConfBackup.2015-08-12_13.27.54_54
> Storage:  "BacDev" (/Booberella/Bacula/)
> Pool: File
> Media type:   File
>
> The plan was to make one backup a day and after 14 days the first will be 
> overwritten, so that there are normally 14 Volumes. I don't understand what 
> Bacula tries to tell me and i hope you can help!
>

Did you run out of space?

John

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


[Bacula-users] Bacula problem with Volumes/Label

2015-08-12 Thread Gerwayn
Hello all,
its my first time in this forum, but i hope you may can help me.

I've set up a Bacula server on Debian, configured the clients and started the 
service. All works fine, no Problems.
But after 1 1/2 weeks all Jobs, one after the other are stop working. Now im 
wondering why, because i get no clue from the message.

For this post i'll show you the result of backing up my server itself.

Client {
  Name = mccallister-fd
  Address = mccallister
  FDPort = 9102
  Catalog = MyCatalog
  Password = "X"
  File Retention = 14 days
  Job Retention = 6 months
  AutoPrune = yes
}

Job {
  Name = "BackupCatalog"
  JobDefs = "DefaultJob"
  Level = Full
  Pool = File
  FileSet="Full"
  Schedule = "Cycle1"
  Write Bootstrap = "/var/lib/bacula/%n.bsr"
  Priority = 10 
}

FileSet {
  Name = "Full Set"
  Include {
Options {
  signature = MD5
}
File = /
  }
}

Pool {
  Name = File
  Pool Type = Backup
  Recycle = yes
  AutoPrune = yes
  Volume Retention = 14 days
  Maximum Volume Bytes = 50G
  Maximum Volumes = 100
  Label Format = "Vol-"
}

Storage {
  Name = BacStor
  Address = 192.168.191.52
  SDPort = 9103
  Password = "X"
  Device = BacDev
  Media Type = File
}

Device {
  Name = BacDev
  Media Type = File
  Archive Device = /Booberella/Bacula/
  LabelMedia = yes;
  Random Access = Yes;
  AutomaticMount = yes;
  RemovableMedia = no ;
  AlwaysOpen = no;
}


The Error:
12-Aug 13:27 mccallister-dir JobId 243: Start Backup JobId 243, 
Job=BaculaConfBackup.2015-08-12_13.27.54_54
12-Aug 13:27 mccallister-dir JobId 243: Using Device "BacDev" to write.
12-Aug 13:28 mccallister-sd JobId 243: End of Volume "Vol-0224" at 0:0 on 
device "BacDev" (/Booberella/Bacula/). Write of 200 bytes got -1.
12-Aug 13:28 mccallister-sd JobId 243: End of Volume "Vol-0224" at 0:0 on 
device "BacDev" (/Booberella/Bacula/). Write of 200 bytes got -1.
12-Aug 13:28 mccallister-sd JobId 243: Marking Volume "Vol-0224" in Error in 
Catalog.
12-Aug 13:28 mccallister-dir JobId 243: Created new Volume="Vol-0225", 
Pool="File", MediaType="File" in catalog.
12-Aug 13:28 mccallister-sd JobId 243: End of Volume "Vol-0225" at 0:0 on 
device "BacDev" (/Booberella/Bacula/). Write of 200 bytes got -1.
12-Aug 13:28 mccallister-sd JobId 243: End of Volume "Vol-0225" at 0:0 on 
device "BacDev" (/Booberella/Bacula/). Write of 200 bytes got -1.
12-Aug 13:28 mccallister-sd JobId 243: Marking Volume "Vol-0225" in Error in 
Catalog.
12-Aug 13:28 mccallister-dir JobId 243: Created new Volume="Vol-0226", 
Pool="File", MediaType="File" in catalog.
12-Aug 13:28 mccallister-sd JobId 243: End of Volume "Vol-0226" at 0:0 on 
device "BacDev" (/Booberella/Bacula/). Write of 200 bytes got -1.
12-Aug 13:28 mccallister-sd JobId 243: End of Volume "Vol-0226" at 0:0 on 
device "BacDev" (/Booberella/Bacula/). Write of 200 bytes got -1.
12-Aug 13:28 mccallister-sd JobId 243: Marking Volume "Vol-0226" in Error in 
Catalog.
12-Aug 13:28 mccallister-dir JobId 243: Created new Volume="Vol-0227", 
Pool="File", MediaType="File" in catalog.
12-Aug 13:28 mccallister-sd JobId 243: End of Volume "Vol-0227" at 0:0 on 
device "BacDev" (/Booberella/Bacula/). Write of 200 bytes got -1.
12-Aug 13:28 mccallister-sd JobId 243: End of Volume "Vol-0227" at 0:0 on 
device "BacDev" (/Booberella/Bacula/). Write of 200 bytes got -1.
12-Aug 13:28 mccallister-sd JobId 243: Marking Volume "Vol-0227" in Error in 
Catalog.
12-Aug 13:28 mccallister-dir JobId 243: Created new Volume="Vol-0228", 
Pool="File", MediaType="File" in catalog.
12-Aug 13:28 mccallister-sd JobId 243: End of Volume "Vol-0228" at 0:0 on 
device "BacDev" (/Booberella/Bacula/). Write of 200 bytes got -1.
12-Aug 13:28 mccallister-sd JobId 243: End of Volume "Vol-0228" at 0:0 on 
device "BacDev" (/Booberella/Bacula/). Write of 200 bytes got -1.
12-Aug 13:28 mccallister-sd JobId 243: Marking Volume "Vol-0228" in Error in 
Catalog.
12-Aug 13:28 mccallister-sd JobId 243: Please mount append Volume "Vol-0228" or 
label a new one for:
Job:  BaculaConfBackup.2015-08-12_13.27.54_54
Storage:  "BacDev" (/Booberella/Bacula/)
Pool: File
Media type:   File

The plan was to make one backup a day and after 14 days the first will be 
overwritten, so that there are normally 14 Volumes. I don't understand what 
Bacula tries to tell me and i hope you can help!

+--
|This was sent by l.schulth...@buchbinder.de via Backup Central.
|Forward SPAM to ab...@backupcentral.com.
+--



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


Re: [Bacula-users] bsmtp failing to connect to mail server

2015-08-12 Thread Alex Domoradov
If you don't want change/configure postfix - I may suggest to use swaks.
It's a perl script which has a lot of functionality. I'm using the
following command with nagios without any problem

/usr/bin/printf "%b" "$MESSAGE\n" | /usr/bin/swaks -4 --server
smtp.googlemail.com:587 --from $USER3$ --to $CONTACTEMAIL$ -tls --auth
PLAIN --auth-user $USER3$ --auth-password $USER4$ --h-Subject "$SUBJ"
--body - --hide-all

On Wed, Aug 12, 2015 at 7:38 AM, Jerry Lowry  wrote:

> Thank you all for the pointers and information regarding postfix and
> google mail.  I have not determined which way I am going to proceed yet.
> To many other fires, which makes me check on the backups rather than check
> the email.
>
> Kind regards,
>
> jerry
>
> On Sun, Aug 9, 2015 at 11:37 AM, Dimitri Maziuk 
> wrote:
>
>> On 2015-08-08 14:23, Jerry Lowry wrote:
>> > Heitor,  Sorry for not saying this in the original text.  It does the
>> > same thing when I specify 'localhost'.
>> >
>> > I don't really need 'tls' that is just what gmail is looking for when I
>> > try to use them as the sending mail server.
>>
>> Send-only postfix setup that also accepts mail on 127.0.0.1:
>>
>>   /etc/postfix/main.cf:
>>
>> myorigin = $mydomain
>> inet_interfaces = localhost
>> inet_protocols = ipv4
>> mydestination =
>> relayhost = $mydomain
>> local_transport = error:local mail delivery is disabled
>>
>> -- change myorigin and relayhost as appropriate. Plus,
>>
>>   /etc/postfix/master.cf:
>>
>> #local unix  -   n   n   -   -   local
>>
>> (i.e. the "local" line commented out).
>>
>> Make sure iptables isn't blocking port 25 on localhost.
>>
>> To test:
>>
>> telnet localhost 25
>>
>> -- if you get "connected" and 220 code from postfix you should be good
>> to go. Note that sending mail from command line is not a useful test
>> since it doesn't necessarily work the same way. It's calling the
>> sendmail binary directly instead of talking to the server on port 25.
>>
>> And then there's gmail. It delivers some messages to "all mail" instead
>> of inbox, messages whose From and To addresses are the same just vanish,
>> and so on. So check the postfix log after running a test job: it may
>> well be there's nothing wrong with your bsmtp or postfix config.
>>
>> Dima
>>
>>
>> --
>> ___
>> 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 mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Way to check ANY bacula volume on disk

2015-08-12 Thread Andrey Tataranovich
On Wed, 12 Aug 2015 10:37:13 -0300 (BRT)
Heitor Faria  wrote:

> Hello Andrey: I think it was the developer option not to terminate de
> bls on error if this kind of message / alert happens, after all it's
> not pretty much it's purpose. I think you can change both things with
> a little shell script tricks (if, grep "Block checksum mismach",
> change $?). About redirection:
> http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO-3.html

Checking output for "Block checksum mismatch" string isn't enough. Error
can be different and due to lack of correct exit code I can't be
confident about volume consistency.

My suggestion based on kiss traditions:

 - 0 exit code if no error or warning
 - all error/warning output to stderr

I this case volume checking is pretty easy:

for i in $(find /bacula/backup/ -type f -mtime +1 -a -mtime -3)
do
  OUTPUT=$(bls -j $i >/dev/null)
  if [ $? != 0 ]; then
echo "-> Volume $i is damaged"
echo $OUTPUT
  fi
done

-- 
WBR, Andrey Tataranovich

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


Re: [Bacula-users] Way to check ANY bacula volume on disk

2015-08-12 Thread Heitor Faria
> On Tue, 11 Aug 2015 15:47:40 +0100
> Martin Simmons  wrote:
> 
>> You could use bls -j with the volume file to scan the whole volume.
> 
> I'm upset with bls behavior - it does not return non zero exit code
> on error and output error messages to stdout instead of stderr.
> 
> # bls -j /bacula/backup/Libvirt-0177; echo $?
> bls: butil.c:287 Using device: "/bacula/backup" for reading.
> 12-Aug 16:11 bls JobId 0: Ready to read from volume "Libvirt-0177" on
> device "FileStorage" (/bacula/backup). Volume Record: File:blk=0:196
> SessId=6 SessTime=1438429819 JobId=0 DataLen=161 Begin Job Session
> Record: File:blk=0:64708 SessId=6 SessTime=1438429819 JobId=7462
> Job=Backup_Win2k3.2015-08-02_22.00.00_20 Date=02-Aug-2015 22:18:05
> Level=F Type=B 12-Aug 16:12 bls JobId 0: Error: block.c:318 Volume data
> error at 1:1073721369! Block checksum mismatch in block=83221
> len=64512: calc=91787392 blk=161ef20e
> 0

Hello Andrey: I think it was the developer option not to terminate de bls on 
error if this kind of message / alert happens, after all it's not pretty much 
it's purpose.
I think you can change both things with a little shell script tricks (if, grep 
"Block checksum mismach", change $?). About redirection: 
http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO-3.html

Regards,
=== 
Heitor Medrado de Faria - LPIC-III | ITIL-F | Bacula Systems Certified 
Administrator II 
Do you need Bacula training? 
https://www.udemy.com/bacula-backup-software/?couponCode=bacula-list 
I do Bacula training and deploy in any city of the world. More information: 
http://bacula.us/ 
+55 61 8268-4220 
Site: http://bacula.us FB: heitor.faria 
===
> 
> Is it fixed in newer versions? Currently I'm using 5.2.6.
> 
> --
> WBR, Andrey Tataranovich
> 
> --
> ___
> 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] Way to check ANY bacula volume on disk

2015-08-12 Thread Andrey Tataranovich
On Tue, 11 Aug 2015 15:47:40 +0100
Martin Simmons  wrote:

> You could use bls -j with the volume file to scan the whole volume.

I'm upset with bls behavior - it does not return non zero exit code
on error and output error messages to stdout instead of stderr.

# bls -j /bacula/backup/Libvirt-0177; echo $?
bls: butil.c:287 Using device: "/bacula/backup" for reading.
12-Aug 16:11 bls JobId 0: Ready to read from volume "Libvirt-0177" on
device "FileStorage" (/bacula/backup). Volume Record: File:blk=0:196
SessId=6 SessTime=1438429819 JobId=0 DataLen=161 Begin Job Session
Record: File:blk=0:64708 SessId=6 SessTime=1438429819 JobId=7462
Job=Backup_Win2k3.2015-08-02_22.00.00_20 Date=02-Aug-2015 22:18:05
Level=F Type=B 12-Aug 16:12 bls JobId 0: Error: block.c:318 Volume data
error at 1:1073721369! Block checksum mismatch in block=83221
len=64512: calc=91787392 blk=161ef20e
0

Is it fixed in newer versions? Currently I'm using 5.2.6.

-- 
WBR, Andrey Tataranovich

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


Re: [Bacula-users] Bacula daemon message- where did it come from?

2015-08-12 Thread Heitor Faria
> Hello Luc,

> Thank you for the explanation. BTW I had being thinking if this was not due
> because of a timezone mismatch configuration in the mail server/relay
> (supposing the datetime was filled by the SMTP server and not client).

> I'm still believing in a system mail problem instead of a bacula issue, since 
> as
> far as I know bacula do not store theses messages for later delivering (acting
> as a mail relay in this case).

I agree with Ana with the fact it is probably not a bug. Even in the hypothesis 
Bacula is sending delayed messages this is the reason there is a time stamp on 
each log message. Yes: the connection error happened. Yes: daemon messages can 
be annoying and sometime lead incautious users to confusion if they only 
receive the message after the error is solved. But you can always opt out this 
messages or don't send them to the boss. =) 

Regards, 
=== 
Heitor Medrado de Faria - LPIC-III | ITIL-F | Bacula Systems Certified 
Administrator II 
Do you need Bacula training? 
https://www.udemy.com/bacula-backup-software/?couponCode=bacula-list 
I do Bacula training and deploy in any city of the world. More information: 
http://bacula.us/ 
+55 61 8268-4220 
Site: http://bacula.us FB: heitor.faria 
=== 

> Best regards,
> Ana

> Em qua, 12 de ago de 2015 às 03:41, Luc Van der Veken < luc...@wimionline.com 
> >
> escreveu:

>> Hi all,

>> If I didn’t misunderstand anything, Michael said he checked the Received 
>> headers
>> as well.

>> Those indicate at what time the message arrived at different mail servers 
>> along
>> its path, I assume they show that bsmtp passed it to the local outgoing mail
>> server at 11:00 ?

>> BTW, I would never trust the ‘Date’ header. Some mail programs fill it in 
>> when
>> you compose the mail, some when you actually send it (it could sit in your
>> outbox for a while), and some don’t include it at all and rely on the mail
>> server to add it. And to make things worse, if you use MS Outlook on 
>> Exchange,
>> it doesn’t even show its value in the message list, it shows the time it
>> arrived in your mailbox instead (for example Ana’s mail I’m replying to has a
>> timestamp of 4:06 inside, but in Outlook’s message list it says 4:09).

>> From: Ana Emília M. Arruda [mailto: emiliaarr...@gmail.com ]
>> Sent: 12 August 2015 4:06
>> To: Michael Schwager < mschwa...@mochotrading.com >
>> Cc: Bacula-users@lists.sourceforge.net
>> Subject: Re: [Bacula-users] Bacula daemon message- where did it come from?

>> Hello Michael,

>> ​From your first post, the header of the email shows a 6:00 AM time, not the
>> 11:00 AM. Are your sure they are the same e-mails? Is there any other e-mail 
>> in
>> bac...@example.com mailbox that arrived at 11:00 AM?

>> -- Forwarded message --
>> From: Bacula > ​example​

>> .com>
>> Date: Sun, Aug 9, 2015 at 6:00 AM
>> Subject: Bacula daemon message
>> To: it@

>> ​ example.com

>> ​Best regards,

>> Ana​

>> Looking carefully your first post, the e-mail sent with the authentication 
>> error
>> took place at 6 am and not 11 am. This log register do not seems to be the 
>> log
>> for your error message. Instead it seems to be an e-mail sent by bacula after
>> restarting.

>> Em ter, 11 de ago de 2015 às 15:21, Michael Schwager <
>> mschwa...@mochotrading.com > escreveu:

>>> On Tue, Aug 11, 2015 at 8:49 AM, Martin Simmons < mar...@lispworks.com > 
>>> wrote:
 Looks like a bug to me (I've just created
 http://bugs.bacula.org/view.php?id=2159 ).
>>> ​Thanks. I have contributed to your bug report.

>>> - Mike Schwager

>>> ​ (aka, "The Most Greyish of Gnomes") ​

>>> Linux Network Engineer, Mocho Trading LLC

>>> 312-646-4783 Phone 312-637-0011 Cell 312-957-9804 Fax

>>> This message is for the named person(s) use only. It may contain 
>>> confidential
>>> proprietary or legally privileged information. No confidentiality or 
>>> privilege
>>> is waived or lost by any mistransmission. If you receive this message in 
>>> error,
>>> please immediately delete it and all copies of it from your system, destroy 
>>> any
>>> hard copies of it and notify the sender. You must not, directly or 
>>> indirectly
>>> use, disclose, distribute, print, or copy any part of this message if you 
>>> are
>>> not the intended recipient. Mocho Trading LLC reserves the right to monitor 
>>> all
>>> e-mail communications through its networks. Any views expressed in this 
>>> message
>>> are those of the individual sender, except where the message states 
>>> otherwise
>>> and the sender is authorized to state them to be the views of any such
>>> entity.--
>>> ___
>>> Bacula-users mailing list
>>> Bacula-users@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listi

Re: [Bacula-users] Way to check ANY bacula volume on disk

2015-08-12 Thread Josh Fisher


On 8/11/2015 2:04 PM, Phil Stracchino wrote:
> On 08/11/15 13:52, Andrey Tataranovich wrote:
>> On Tue, 11 Aug 2015 15:47:40 +0100
>> Martin Simmons  wrote:
>>
>>> You could use bls -j with the volume file to scan the whole volume.
>>>
>>> I recomend use a more secure fileserver to store your backups (RAID,
>>> or ZFS).
>> This error has happened on mirror raid, so maybe only filesystems
>> like zfs/btrfs could solve such problem on system level. I do not
>> remember if raid5/6 protect from situation when disk read operation
>> return incorrect data without error.
> All conventional RAID5/6 implementations that are not copy-on-write and
> do not feature periodic scrubbing are potentially vulnerable to silent
> disk corruption, aka the "RAID5 write hole".  ZFS is the only RAID
> implementation which I know to be not vulnerable to this potential
> failure mode.  https://btrfs.wiki.kernel.org/index.php/RAID56 confirms
> that btrfs RAID5/6 is still vulnerable to the RAID5 write hole.  btrfs
> also cannot yet recover data from parity, and suffers badly from
> fragmentation.  The honest truth is that btrfs is still an experimental
> filesystem that is not nearly stable enough or mature enough for
> production use yet, much less for backup storage which absolutely MUST
> be reliable.

At the end of the day, RAID, including all raidz levels, is never the 
answer for data security. Backups are. This is a good example of why 
multiple backups (on different media) is required. For disk backup, I 
prefer to use Copy jobs and/or multiple backups writing multiple jobs 
each to a different disk, rather than using RAID and writing a single 
job to multiple disks. In other words, treating the disks like tapes.



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


Re: [Bacula-users] Bacula daemon message- where did it come from?

2015-08-12 Thread Ana Emília M . Arruda
Hello Luc,

Thank you for the explanation. BTW I had being thinking if this was not due
because of a timezone mismatch configuration in the mail server/relay
(supposing the datetime was filled by the SMTP server and not client).

I'm still believing in a system mail problem instead of a bacula issue,
since as far as I know bacula do not store theses messages for later
delivering (acting as a mail relay in this case).

Best regards,
Ana

Em qua, 12 de ago de 2015 às 03:41, Luc Van der Veken 
escreveu:

> Hi all,
>
>
>
> If I didn’t misunderstand anything, Michael said he checked the Received
> headers as well.
>
>
>
> Those indicate at what time the message arrived at different mail servers
> along its path, I assume they show that bsmtp passed it to the local
> outgoing mail server at 11:00 ?
>
>
>
> BTW, I would never trust the ‘Date’ header.  Some mail programs fill it
> in when you compose the mail, some when you actually send it (it could sit
> in your outbox for a while), and some don’t include it at all and rely on
> the mail server to add it.  And to make things worse, if you use MS
> Outlook on Exchange, it doesn’t even show its value in the message list, it
> shows the time it arrived in your mailbox instead (for example Ana’s mail
> I’m replying to has a timestamp of 4:06 inside, but in Outlook’s message
> list it says 4:09).
>
>
>
>
>
> *From:* Ana Emília M. Arruda [mailto:emiliaarr...@gmail.com]
> *Sent:* 12 August 2015 4:06
> *To:* Michael Schwager 
> *Cc:* Bacula-users@lists.sourceforge.net
> *Subject:* Re: [Bacula-users] Bacula daemon message- where did it come
> from?
>
>
>
> Hello Michael,
>
> ​From your first post, the header of the email shows a 6:00 AM time, not
> the 11:00 AM. Are your sure they are the same e-mails? Is there any other
> e-mail in bac...@example.com mailbox that arrived at 11:00 AM?
>
>
>
> -- Forwarded message --
> From: *Bacula* 
> ​example​
>
> .com>
> Date: Sun, Aug 9, 2015 at 6:00 AM
> Subject: Bacula daemon message
> To: it@
>
> ​example.com
>
>
>
> ​Best regards,
>
> Ana​
>
>
>
> Looking carefully your first post, the e-mail sent with the authentication
> error took place at 6 am and not 11 am. This log register do not seems to
> be the log for your error message. Instead it seems to be an e-mail sent by
> bacula after restarting.
>
> Em ter, 11 de ago de 2015 às 15:21, Michael Schwager <
> mschwa...@mochotrading.com> escreveu:
>
> On Tue, Aug 11, 2015 at 8:49 AM, Martin Simmons 
> wrote:
>
>
> Looks like a bug to me (I've just created
> http://bugs.bacula.org/view.php?id=2159).
>
>
>
> ​Thanks. I have contributed to your bug report.
>
>
> *- Mike Schwager*
>
> *​ (aka, "The **Most Greyish of Gnomes")**​*
>
>
>
> *  Linux Network Engineer, Mocho Trading LLC*
>
> *  312-646-4783 <312-646-4783> Phone312-637-0011 <312-637-0011>
> Cell312-957-9804 <312-957-9804> Fax*
>
>
>
>
> This message is for the named person(s) use only. It may contain
> confidential proprietary or legally privileged information. No
> confidentiality or privilege is waived or lost by any mistransmission. If
> you receive this message in error, please immediately delete it and all
> copies of it from your system, destroy any hard copies of it and notify the
> sender. You must not, directly or indirectly use, disclose, distribute,
> print, or copy any part of this message if you are not the intended
> recipient. Mocho Trading LLC reserves the right to monitor all e-mail
> communications through its networks. Any views expressed in this message
> are those of the individual sender, except where the message states
> otherwise and the sender is authorized to state them to be the views of any
> such
> entity.--
> ___
> 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 mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Still don't get auto-pruning

2015-08-12 Thread Kern Sibbald

  
  
Hello,
  
  I suspect (but this is just a guess) that you may not understand
  what prune and purge do.  The first important point is that both
  apply only to records kept in the catalog -- that is nothing
  actually physically happens with the volumes.
  
  Prune removes records from the catalog based on retention periods.
  
  Purge removes Job records without regards to the retention
  periods.  This command is somewhat dangerous so should almost
  never be needed unless you have a fixed number of volumes (i.e.
  tapes) and they are all in use, so you (as I sometimes do) select
  the oldest one and prune it (or better yet, I simply buy more
  tapes).
  
  Bacula attempts to keep the physical Volume data a long as
  possible.  That is, it overwrites old data only when it has no
  other option.
  
  The pruning algorithm has been modified (more correct is
  "enhanced") several times in the last 10 years so what is in the
  manual could be slightly out of date at least in some area.  One
  of the main changes that is probably not clearly spelled out in
  the manual is that compared to the first implementation many years
  ago, during autoprune Bacula tries to prune only the Volume that
  is actually needed.  Previously it pruned pretty much everything
  that it could find.
  
  Best regards,
  Kern
  
  
  
  On 12.08.2015 10:05, Luc Van der Veken wrote:


  
  
  
  
  
  
  
  
I still don’t really get auto-pruning, I think.
Am I seeing ‘prune’ and ‘purge’ as more closely
related than they are?
 
Snippet from the manual, about what happens
when Bacula needs a volume:
 
AutoPrune =
yes|no
If
AutoPrune is set to yes
(default), Bacula will automatically apply the Volume
retention period when running a Job and it needs a new
Volume but no
appendable volumes are
available. 
  At that point, Bacula will prune all Volumes that can be
  pruned (i.e. 
AutoPrune set) in an attempt to find a usable
  volume.
 
Either my configuration is still wrong after
reviewing it several times, or that “prune all volumes”
doesn’t mean that more than one will be purged at that time.
The way I see it happen, it just recycles the
oldest volume and leaves all others alone, no matter how far
‘over date’ they are.

I’ve got file volumes with volume, file and job
retention all set to 3 months, that are 4 months old and
still sitting on disk marked “full”.
When I try to list jobs or files on those
volumes, it doesn’t find them in the database anymore.
 
In another pool (used for incremental backups)
it’s the same with retentions of 15 days, full files of 3
months old still sitting there.
 
Is the only way to purge the excess volumes to
do it manually (or create a
bconsole script)?
 
  
  
  
  
  --

  
  
  
  ___
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] Still don't get auto-pruning

2015-08-12 Thread Luc Van der Veken
I still don't really get auto-pruning, I think.
Am I seeing 'prune' and 'purge' as more closely related than they are?

Snippet from the manual, about what happens when Bacula needs a volume:

AutoPrune = yes|no
If AutoPrune is set to yes (default), Bacula will automatically apply the 
Volume retention period when running a Job and it needs a new Volume but no 
appendable volumes are available. At that point, Bacula will prune all Volumes 
that can be pruned (i.e. AutoPrune set) in an attempt to find a usable volume.

Either my configuration is still wrong after reviewing it several times, or 
that "prune all volumes" doesn't mean that more than one will be purged at that 
time.
The way I see it happen, it just recycles the oldest volume and leaves all 
others alone, no matter how far 'over date' they are.
I've got file volumes with volume, file and job retention all set to 3 months, 
that are 4 months old and still sitting on disk marked "full".
When I try to list jobs or files on those volumes, it doesn't find them in the 
database anymore.

In another pool (used for incremental backups) it's the same with retentions of 
15 days, full files of 3 months old still sitting there.

Is the only way to purge the excess volumes to do it manually (or create a 
bconsole script)?

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