This sounds like a bug to me.  Recently restore started updating the media 
record so that the tape read statistics will be properly updated, and it 
looks like it probably updates the last write time.

Please submit a bug report to:  bugs.bacula.org

Thanks,

Kern

On Saturday 13 October 2007 00:16, Allan Black wrote:
> I've noticed something which I think, if not a bug, is at least
> "undesirable" behaviour. Have a look at the following query (I used
> sqlquery because "list media" generates long lines which is difficult to
> read in an email):
>
> Enter SQL query: select MediaId,VolumeName,VolStatus,LastWritten from Media
> where PoolId=2 order by VolumeName;
> +---------+----------------+-----------+---------------------+
>
> | MediaId | VolumeName     | VolStatus | LastWritten         |
>
> +---------+----------------+-----------+---------------------+
>
> |       4 | Gershwin-01-01 | Append    | 2007-10-12 22:38:36 |
> |       5 | Gershwin-01-02 | Recycle   | 2007-09-15 02:37:05 |
> |       6 | Gershwin-01-03 | Recycle   | 2007-09-15 03:23:00 |
> |       8 | Gershwin-02-01 | Full      | 2007-09-23 00:44:04 |
> |       9 | Gershwin-02-02 | Full      | 2007-09-23 02:52:20 |
> |      10 | Gershwin-02-03 | Append    | 2007-09-23 03:43:13 |
> |      14 | Gershwin-03-01 | Full      | 2007-10-03 16:24:13 |
> |      15 | Gershwin-03-02 | Full      | 2007-09-29 02:25:47 |
> |      16 | Gershwin-03-03 | Append    | 2007-09-29 03:18:41 |
> |      18 | Gershwin-04-01 | Full      | 2007-10-06 01:35:59 |
> |      19 | Gershwin-04-02 | Full      | 2007-10-06 03:43:43 |
> |      20 | Gershwin-04-03 | Append    | 2007-10-06 04:37:14 |
>
> +---------+----------------+-----------+---------------------+
>
> (FYI, the first number is the "tape set", the second is the tape number).
>
> "Gershwin-03-01" (MediaId 14) has a LastWritten date of Oct 3rd, but the
> tape was actually written on 2007-09-29, same as Gershwin-03-02 and
> Gershwin-03-03.
>
> The reason the LastWritten field for this tape has been changed is because
> I restored a file from that tape on Oct 3rd. I don't think that LastWritten
> should be updated when a tape is used for a restore.
>
> I have had a look through the director and SD code, but I can't figure
> out where the LastWritten field is being updated. It looks to me as if
> the SD might be sending the director a message telling it to update the
> tape status in the catalog, but I'm not sure.
>
> Can anyone help me figure out the flow of control for a restore?
>
> This is on Bacula 2.2.0. Apologies if this is something which has already
> been addressed, but I haven't seen any email mention of it, and I can't
> find anything in the archives .
>
> Allan
>
> PS Ignore the fact that Gershwin-01-01 seems to have the same problem; it
> doesn't - there was a backup in progress while I wrote this :-)
> ARB
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> Bacula-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/bacula-devel

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Bacula-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-devel

Reply via email to