Job {
  Name = "Migrate"
  Type = Migrate
  Pool = Full
  Next Pool = CopyMigrate
  Selection Type = SQL Query
  Selection Pattern = "SELECT JobId FROM Job WHERE Name='ai-backup-bareos-fd' AND Level='F' ORDER BY StartTime DESC LIMIT 1"
  Client = "bareos-fd"
  Messages = Standard
  # Sleep up to 60s if this is a migrate worker job
  Run Before Job = "sh -c 'test \"%O\" != \"*None*\" && sleep 5 || exit 0'"
  Run Before Job = "sh -c 'test \"%O\" != \"*None*\" && sleep 5 || exit 0'"
  Run Before Job = "sh -c 'test \"%O\" != \"*None*\" && sleep 5 || exit 0'"
  Run Before Job = "sh -c 'test \"%O\" != \"*None*\" && sleep 5 || exit 0'"
  Run Before Job = "sh -c 'test \"%O\" != \"*None*\" && sleep 5 || exit 0'"
  Run Before Job = "sh -c 'test \"%O\" != \"*None*\" && sleep 5 || exit 0'"
  Run Before Job = "sh -c 'test \"%O\" != \"*None*\" && sleep 5 || exit 0'"
  Run Before Job = "sh -c 'test \"%O\" != \"*None*\" && sleep 5 || exit 0'"
  Run Before Job = "sh -c 'test \"%O\" != \"*None*\" && sleep 5 || exit 0'"
  Run Before Job = "sh -c 'test \"%O\" != \"*None*\" && sleep 5 || exit 0'"
  Run Before Job = "sh -c 'test \"%O\" != \"*None*\" && sleep 5 || exit 0'"
  Run Before Job = "sh -c 'test \"%O\" != \"*None*\" && sleep 5 || exit 0'"
}
