#define JT_CONSOLE 'C' /* console program */
#define JT_SYSTEM 'S' /* internal system "job" */
#define JT_ADMIN 'D' /* admin job */
-#define JT_ARCHIVE 'A'
+#define JT_ARCHIVE 'A' /* Archive Job */
+#define JT_COPY 'Y' /* Copy Job */
+#define JT_MIGRATION 'M' /* Migration Job */
/* Job Status. Some of these are stored in the DB */
#define JS_Created 'C' /* created but not yet running */
dlist *msg_queue; /* Queued messages */
alist job_end_push; /* Job end pushed calls */
bool dequeuing; /* dequeuing messages */
+ POOLMEM *VolumeName; /* Volume name desired -- pool_memory */
POOLMEM *errmsg; /* edited error message */
char Job[MAX_NAME_LENGTH]; /* Unique name of this Job */
uint32_t JobId; /* Director's JobId */
time_t start_time; /* when job actually started */
time_t run_time; /* used for computing speed */
time_t end_time; /* job end time */
- POOLMEM *VolumeName; /* Volume name desired -- pool_memory */
POOLMEM *client_name; /* client name */
POOLMEM *RestoreBootstrap; /* Bootstrap file to restore */
char *sd_auth_key; /* SD auth key */
/* This should be empty in the library */
#ifdef DIRECTOR_DAEMON
+#define MAX_STORE 2
/* Director Daemon specific part of JCR */
pthread_t SD_msg_chan; /* Message channel thread id */
pthread_cond_t term_wait; /* Wait for job termination */
volatile bool sd_msg_thread_done; /* Set when Storage message thread terms */
BSOCK *ua; /* User agent */
JOB *job; /* Job resource */
- STORE *store; /* Storage resource */
+ alist *storage[MAX_STORE]; /* Storage possibilities */
+ STORE *store; /* Storage daemon selected */
CLIENT *client; /* Client resource */
POOL *pool; /* Pool resource */
POOL *full_pool; /* Full backup pool resource */
pthread_t heartbeat_id; /* id of heartbeat thread */
volatile BSOCK *hb_bsock; /* duped SD socket */
POOLMEM *RunAfterJob; /* Command to run after job */
+ DIRRES* director; /* Director resource */
#endif /* FILE_DAEMON */
int type;
DCR *dcr; /* device context record */
DEVRES *device; /* device resource to use */
- VOLUME_CAT_INFO VolCatInfo; /* Catalog info for desired volume */
POOLMEM *job_name; /* base Job name (not unique) */
POOLMEM *fileset_name; /* FileSet */
POOLMEM *fileset_md5; /* MD5 for FileSet */
- POOLMEM *pool_name; /* pool to use */
- POOLMEM *pool_type; /* pool type to use */
- POOLMEM *media_type; /* media type */
- POOLMEM *dev_name; /* device name */
VOL_LIST *VolList; /* list to read */
int32_t NumVolumes; /* number of volumes used */
int32_t CurVolume; /* current volume number */
- int label_status; /* device volume label status */
int label_errors; /* count of label errors */
bool session_opened;
long Ticket; /* ticket for this job */
bool no_attributes; /* set if no attributes wanted */
bool spool_data; /* set to spool data */
int CurVol; /* Current Volume count */
-
+ DIRRES* director; /* Director resource */
+
uint32_t FileId; /* Last file id inserted */
/* Parmaters for Open Read Session */
extern JCR *get_jcr_by_partial_name(char *Job);
extern JCR *get_jcr_by_full_name(char *Job);
extern JCR *get_next_jcr(JCR *jcr);
+extern void set_jcr_job_status(JCR *jcr, int JobStatus);
+
+#ifdef TRACE_JCR_CHAIN
+extern void b_lock_jcr_chain(const char *filen, int line);
+extern void b_unlock_jcr_chain(const char *filen, int line);
+#define lock_jcr_chain() b_lock_jcr_chain(__FILE__, __LINE__);
+#define unlock_jcr_chain() b_unlock_jcr_chain(__FILE__, __LINE__);
+#else
extern void lock_jcr_chain();
extern void unlock_jcr_chain();
-extern void set_jcr_job_status(JCR *jcr, int JobStatus);
+#endif
#ifdef DEBUG
extern void b_free_jcr(const char *file, int line, JCR *jcr);