I'm trying to use a fifo for backup/restore.

I have the storage set up for min and max block size = 1024.

My runbeforejob script uses dd with ibs=1024 obs=1024 conv=sync, to pull
the data from the fifo and save it to a file (saving to the file is just
an interim test setup; I'll do something else with the data later). I
tried it with and without the conv=sync.

The first few blocks seem fine. However, it always seems to write fewer
bytes out for the fifth block, resulting in a sixth block that starts at
the wrong place. This shows up in the log as something like:

Enter dispatch_msg type=4 msg=monica-sd:
RestoreFiles.2006-10-22_10.40.43 Error: block.c:263 Volume data error at
0:6143! Wanted ID: "BB02", got "". Buffer discarded.

This almost feels like a block sync error inside of bacula. If bacula
was actually outputing a smaller block size, then the conv=sync would
have taken care of it, so that on restore the beginning of each block
would at least look right.

Can anyone shed any light on this? Here is my storage definition:

Device {
  Name = SafeDVD
  Archive Device = "/tmp/backup_fifo"
  Device Type = Fifo
  Media Type = "Safe DVD"
  Minimum block size = 1024
  Maximum block size = 1024
  AlwaysOpen = no
  LabelMedia = no
  Automatic Mount = no
  Random Access = no
  RequiresMount = no
  RemovableMedia = no
  VolumePollInterval = 10
}

And my scripts for backup and restore runbeforejob:

Here's the one for backup:

#!/bin/bash
#

# create a fifo
#
/bin/rm -f /tmp/backup_fifo
/bin/mkfifo --mode=777 /tmp/backup_fifo

# start the backup process reading from it

( nohup dd if=/tmp/backup_fifo of=/var/tmp/mybackup_ \
 ibs=1024 obs=1024 conv=sync ) &>/dev/null </dev/zero &


And here's the one for restore:

#!/bin/bash
#

# create a fifo
#
/bin/rm -f /tmp/backup_fifo
/bin/mkfifo --mode=777 /tmp/backup_fifo

# start the backup process reading from it

( nohup dd if=/var/tmp/mybackup_ of=/tmp/backup_fifo \
   bs=1024 ) &>/tmp/restore.err </dev/zero &


-- 


.

Attachment: signature.asc
Description: This is a digitally signed message part

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to