[Bacula-users] Strange runscript behaviour

2016-04-08 Thread Andrey Tataranovich
Hello folks,

I'm using bacula 7.4.0 and trying to add RunScript to BackupCatalog
job:

RunScript {
  Console = "prune expired volume yes"
  RunsWhen = Before
}

Full job configuration below:

JobDefs {
  Name = "Standard backup"
  Type = Backup
  Level = Incremental
  FileSet = "Standard Set"
  Schedule = "WeeklyCycle"
  Storage = File
  Messages = Standard
  Max Full Interval = 40 days
  Pool = OfficeInc
  Full Backup Pool = OfficeFull
  Differential Backup Pool = OfficeDiff
  Incremental Backup Pool = OfficeInc
  Spool Attributes = yes
  Allow Duplicate Jobs = no
  Cancel Lower Level Duplicates = yes
  Priority = 10
  Accurate = yes
  Write Bootstrap = "/var/lib/bacula/%c.bsr"
}

Job {
  Name = "BackupCatalog"
  JobDefs = "Standard backup"
  Level = Full
  FileSet = "Catalog"
  Client = besel-fd
  Schedule = "WeeklyCycleAfterBackup"
  RunBeforeJob = "/etc/bacula/scripts/make_catalog_backup.pl MyCatalog"
  RunAfterJob  = "/etc/bacula/scripts/delete_catalog_backup"
  Write Bootstrap = "/var/lib/bacula/%n.bsr"
  Priority = 50
  RunScript {
Console = "prune expired volume yes"
RunsWhen = Before
  }
}

But job failed with following output:

08-Apr 02:43 besel-dir JobId 14931: shell command: run BeforeJob
"/etc/bacula/scripts/make_catalog_backup.pl MyCatalog" 08-Apr 02:56
besel-dir JobId 14931: Start Backup JobId 14931,
Job=BackupCatalog.2016-04-07_23.10.00_17 08-Apr 02:56 besel-dir JobId
14931: Created new Volume="OfficeFull-0341", Pool="OfficeFull",
MediaType="File" in catalog. 08-Apr 02:56 besel-dir JobId 14931: Using
Device "FileStorage-Dev1" to write. 08-Apr 02:56 besel-fd JobId 14931:
shell command: run ClientBeforeJob "prune expired volume yes" 08-Apr
02:56 besel-fd JobId 14931: Error: Runscript: ClientBeforeJob returned
non-zero status=208. ERR=No such file or directory 08-Apr 02:56
besel-dir JobId 14931: Fatal error: Bad response to RunBeforeNow
command: wanted 2000 OK RunBeforeNow , got 2905 Bad RunBeforeNow
command.


Seems bacula is trying to run "prune expired volume yes" as shell
command, but as I understand from the docs this command should run
as bacula console command on the director.

For the test I added additional job with Type=Admin and place RunScript
in it - seems running without error. But I do not see console output in
the job.

So how runscript should be used in my case?

-- 
WBR, Andrey Tataranovich

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


Re: [Bacula-users] Faster reading of Volumes from disk

2016-02-16 Thread Andrey Tataranovich
On Tue, 16 Feb 2016 15:21:27 -0500
Dan Langille  wrote:

> I can scp a 5GB Volume from one system to another in about 90 seconds.
> 
> Why does that take the SD 8-10 minutes to do the same?
> 
> The two systems are on the same 1Gb/s network.  We are copying from
> HDD local to SSD remote.
> 
> I'm running a copy job, from disk on one SD to tape on another SD.
> Data spooling is enabled.
> 
> The full job can be seen here
> https://gist.github.com/dlangille/210fd8a8c3418f9004f6
> <https://gist.github.com/dlangille/210fd8a8c3418f9004f6> :
> 

I think the main speed limiter is this case is database. Copy job do not
operate with raw volumes but creates a new job and mark it as a copy.

Check job output:

 SD Files Written:   1,365,074
 SD Bytes Written:   333,216,925,325 (333.2 GB)

So copy job need to store information in database about 1,365,074 files.

-- 
WBR, Andrey Tataranovich

--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


[Bacula-users] Parallel jobs in bacula disk backup

2015-10-23 Thread Andrey Tataranovich
Hello,

I'm trying to setup bacula to run multiple jobs in parallel. For
example to run restore while backup running. For backup storage I'm
using RAID. My backup storage mounted at /bacula/backup

Please review my bacula configuration:

-> bacula-sd.conf

Autochanger {
  Name = FileChanger
  Changer Device = /dev/null
  Changer Command = ""
  Device = FileStorage00
  Device = FileStorage01
  Device = FileStorage02
  Device = FileStorage03
}

Device {
  Name = FileStorage00
  Media Type = File
  Archive Device = /bacula/backup
  LabelMedia = yes;
  Random Access = Yes;
  AutomaticMount = yes;
  RemovableMedia = no;
  AlwaysOpen = no;
  Autochanger = yes
  Drive Index = 0
}



Device {
  Name = FileStorage03
  Media Type = File
  Archive Device = /bacula/backup
  LabelMedia = yes;
  Random Access = Yes;
  AutomaticMount = yes;
  RemovableMedia = no;
  AlwaysOpen = no;
  Autochanger = yes
  Drive Index = 3
}


-> bacula-dir.conf

Storage {
  Name = File
  Device = FileChanger
  Autochanger = yes
  Media Type = File
...
}

Pool {
  Name = PoolFull
  Pool Type = Backup
  Recycle = yes
  AutoPrune = yes
  Volume Retention = 365 days
  Maximum Volume Bytes = 50G
  Maximum Volumes = 100
  Maximum Volume Jobs = 1
  Label Format = "Full-"
  File Retention = 1 week
  Job Retention = 1 year
  Storage = File
}

Jobs seems running in parallel. Can you told me if such setup is OK?

-- 
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 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 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] Way to check ANY bacula volume on disk

2015-08-11 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 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.

-- 
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-11 Thread Andrey Tataranovich
On Tue, 11 Aug 2015 08:40:30 -0400
Bill Arlofski  wrote:

> As of v5.2.x, you have the ability to specify any jobid to be
> verified on the command line. From the v5.2.1 main.pdf manual:
> 
> 8<
> New Features in 5.2.x
> 3.6 Ability to Verify any specified Job
> 
> You now have the ability to tell Bacula which Job should verify
> instead of automatically verify just the last one.
> 
> This feature can be used with VolumeToCatalog, DiskToCatalog and
> Catalog level.
> 
> To verify a given job, just specify the Job jobid in argument when
> starting the job.
> 
> * run job=VerifyVolume jobid=1 level=VolumeToCatalog
> 8<
> 
> So, if you really wanted to periodically check (a|any|random) Bacula
> file volume(s) you could easily script it by piping such a run
> command to bconsole with the required jobid.

Thanks a lot! I will try this solution. Seems I need to reread "New
Features" in bacula documentation.

-- 
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-11 Thread Andrey Tataranovich
On Tue, 11 Aug 2015 07:05:14 -0400
Josh Fisher  wrote:

> Bacula volumes are just normal files. You could periodically check
> the filesystem with e2fsck or whatever tool is used for the
> filesystem you are using.

I already tried to run fsck on bacula volume when error occured, but
found no error. e2fsck checks only filesystem metadata consistency but
not data. So errors inside volume files (uncorrectable bit errors as
example) will be not found by this tool.

-- 
WBR, Andrey Tataranovich

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


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

2015-08-11 Thread Andrey Tataranovich
Hello all,

I'm using bacula 5.2.6 to backup several servers to HDD storage.
Recently I tried to restore a backup job which is about a week old and
encounter problem:

Error: block.c:318 Volume data error at 2:1331430350!
Block checksum mismatch in block=153792 len=64512: calc=782b2290
blk=5201271d

What can I use on regular basis to ensure that bacula still can read
volume? Unfortunately verify job checks only the last job but data
corruption could happen later.

Thanks in advance.

-- 
WBR, Andrey Tataranovich

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