Re: [Bacula-users] Error: cannot run a job from a RunScript

2024-04-09 Thread Martin Simmons
> On Tue, 9 Apr 2024 10:57:24 +0100, Chris Wilkinson said:
> 
> I tried to get a copy job to run after completion of the job using a
> Runscript. The Job is shown below. I can run this copy job OK from within
> bconsole/baculum but it fails when run from a Runscript.
> 
> I get an error "09-Apr 09:52 bsvr-dir JobId 0: Can't use run command in a
> runscript09-Apr 09:52 bsvr-dir JobId 0: run: is an invalid command."
> 
> Is it not permissible to use a run command within a Runscript block?

The run command is not allowed.  You can only use the commands documented
under RunScript in the manual.

__Martin


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


[Bacula-users] Error: cannot run a job from a RunScript

2024-04-09 Thread Chris Wilkinson
I tried to get a copy job to run after completion of the job using a
Runscript. The Job is shown below. I can run this copy job OK from within
bconsole/baculum but it fails when run from a Runscript.

I get an error "09-Apr 09:52 bsvr-dir JobId 0: Can't use run command in a
runscript09-Apr 09:52 bsvr-dir JobId 0: run: is an invalid command."

Is it not permissible to use a run command within a Runscript block?

Many thanks
Chris Wilkinson

Job {
  Name = "catalog"
  Description = "Catalog"
  Type = "Backup"
  Level = "Full"
  Messages = "Standard"
  Storage = "dns-325-sd"
  Pool = "catalog"
  FullBackupPool = "catalog"
  Client = "catalog-fd"
  Fileset = "Catalog"
  Schedule = "catalogDaily"
  WriteBootstrap = "/var/lib/bacula/%n.bsr"
  MaxFullInterval = 86400
  PruneJobs = yes
  PruneFiles = yes
  PruneVolumes = yes
  Enabled = yes
  SpoolAttributes = yes
  Runscript {
RunsOnClient = no
RunsWhen = "Before"
Command = "/etc/bacula/scripts/make_catalog_backup.pl MyCatalog"
  }
  Runscript {
RunsOnClient = no
RunsWhen = "After"
Command = "/etc/bacula/scripts/delete_catalog_backup"
  }
  Runscript {
RunsOnClient = no
RunsWhen = "After"
Console = "run job=catalog-copy yes"
  }
  Priority = 11
}
Job {
  Name = "catalog-copy"
  Description = "copy of catalog"
  Type = "Copy"
  Level = "Full"
  Messages = "Standard"
  Storage = "dns-325-sd"
  Pool = "catalog"
  NextPool = "catalog-copy"
  Client = "none"
  Fileset = "none"
  Schedule = "sched_none"
  SelectionPattern = "catalog"
  SelectionType = "PoolUncopiedJobs"
}
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users