From bb73ffd891c827bce0a4317bba02b1a219f3de3e Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Fri, 31 Jul 2009 10:02:42 +0200 Subject: [PATCH] stop copy/migration using basejobs --- bacula/src/cats/sql_create.c | 9 +++++++-- bacula/src/jcr.h | 3 ++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/bacula/src/cats/sql_create.c b/bacula/src/cats/sql_create.c index f16689131b..bc960664a9 100644 --- a/bacula/src/cats/sql_create.c +++ b/bacula/src/cats/sql_create.c @@ -1141,10 +1141,15 @@ const char *create_temp_basefile[4] = { bool db_create_attributes_record(JCR *jcr, B_DB *mdb, ATTR_DBR *ar) { bool ret; - if (ar->FileType == FT_BASE) { + if (ar->FileType != FT_BASE) { + ret = db_create_file_attributes_record(jcr, mdb, ar); + + } else if (jcr->HasBase) { ret = db_create_base_file_attributes_record(jcr, jcr->db_batch, ar); + } else { - ret = db_create_file_attributes_record(jcr, mdb, ar); + Jmsg0(jcr, M_FATAL, 0, _("Can't Copy/Migrate job using BaseJob")); + ret = true; /* in copy/migration what do we do ? */ } return ret; diff --git a/bacula/src/jcr.h b/bacula/src/jcr.h index 36c72b4a62..ee4ff2e5bb 100644 --- a/bacula/src/jcr.h +++ b/bacula/src/jcr.h @@ -254,6 +254,8 @@ public: B_DB *db; /* database pointer */ B_DB *db_batch; /* database pointer for batch and accurate */ bool batch_started; /* is batch mode already started ? */ + bool HasBase; /* True if job use base jobs */ + ATTR_DBR *ar; /* DB attribute record */ guid_list *id_list; /* User/group id to name list */ bool accurate; /* true if job is accurate */ @@ -337,7 +339,6 @@ public: bool stats_enabled; /* Keep all job records in a table for long term statistics */ bool no_maxtime; /* Don't check Max*Time for this JCR */ bool keep_sd_auth_key; /* Clear or not the SD auth key after connection*/ - bool HasBase; /* True if job use base jobs */ #endif /* DIRECTOR_DAEMON */ -- 2.39.5