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;
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 */
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 */