On Tue, Jan 26, 2010 at 11:25:44AM +0000, Graham Keeling wrote:
> Hello,
>
> I tried to use the new 'Action On Purge = Truncate' option. I started with
> a fresh install and empty catalog and added the option to my Pools.
> I ran a small backup, and I followed the bconsole purge options. I ended up
> with this:
>
> Enter *MediaId or Volume name: *1
> 1 File on Volume "backup-0001" purged from catalog.
> There are no more Jobs associated with Volume "backup-0001". Marking it
> purged.
> Connecting to Storage daemon Disk 1 at 192.168.100.121:9103 ...
> 3916 Error scanning action_on_purge command
> New Pool is: Disk 1
> *q
>
> Oh dear.
>
> So, I had a quick look at the code passing the director command to the storage
> daemon. I think the problem is to do with it not 'bashing/unbashing' the
> spaces
> in my storage device name.
> My storage device name is "Disk 1.1".
>
> So, I have a patch that seemed to make it do the intended thing (attached),
> although there seem to more problems. Another report to come...
Apologies, I managed to attach the wrong file! Here is my second attempt.
Index: ua_purge.c
===================================================================
RCS file: /cvs/netpilot/GPL/bacula-5.0.0/WORK/src/dird/ua_purge.c,v
retrieving revision 1.1
diff -u -r1.1 ua_purge.c
--- ua_purge.c 25 Jan 2010 15:04:15 -0000 1.1
+++ ua_purge.c 26 Jan 2010 11:24:32 -0000
@@ -594,10 +594,12 @@
BSOCK *sd;
if ((sd=open_sd_bsock(ua)) != NULL) {
bash_spaces(mr->VolumeName);
+ bash_spaces(ua->jcr->wstore->dev_name());
sd->fsend("action_on_purge %s vol=%s action=%d",
ua->jcr->wstore->dev_name(),
mr->VolumeName,
mr->ActionOnPurge);
+ unbash_spaces(ua->jcr->wstore->dev_name());
unbash_spaces(mr->VolumeName);
while (sd->recv() >= 0) {
ua->send_msg("%s", sd->msg);
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Bacula-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-devel