X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=bacula%2Fsrc%2Fjcr.h;h=405632676ad27f8d886f2fe58b14b4864acdb837;hb=10cfd798ced2d27f61ead2de6fe9b1bcc8e3468d;hp=c2b85f7ea5118330dda01d28357297ead43c5ad8;hpb=aa7041b2ca4730efc8c09f4058633463a1c29511;p=bacula%2Fbacula diff --git a/bacula/src/jcr.h b/bacula/src/jcr.h index c2b85f7ea5..405632676a 100644 --- a/bacula/src/jcr.h +++ b/bacula/src/jcr.h @@ -1,7 +1,7 @@ /* Bacula(R) - The Network Backup Solution - Copyright (C) 2000-2016 Kern Sibbald + Copyright (C) 2000-2017 Kern Sibbald The original author of Bacula is Kern Sibbald, with contributions from many others, a complete list can be found in the file AUTHORS. @@ -58,6 +58,9 @@ #define JT_MIGRATE 'g' /* Migration Job */ #define JT_SCAN 'S' /* Scan Job */ +/* Used to handle ClientAcl in various commands, not stored in the DB */ +#define JT_BACKUP_RESTORE '*' /* Backup or Restore Job */ + /* Job Status. Some of these are stored in the DB */ #define JS_Canceled 'A' /* canceled by user */ #define JS_Blocked 'B' /* blocked */ @@ -86,9 +89,10 @@ #define JS_WaitDevice 'q' /* Queued waiting for device */ #define JS_WaitStoreRes 's' /* Waiting for storage resource */ #define JS_WaitStartTime 't' /* Waiting for start time */ +#define JS_CloudUpload 'u' /* Cloud upload */ +#define JS_CloudDownload 'w' /* Cloud download */ - -/* Migration selection types */ +/* Migration selection types. Do not change the order. */ enum { MT_SMALLEST_VOL = 1, MT_OLDEST_VOL, @@ -109,18 +113,20 @@ enum { #define job_waiting(jcr) \ (jcr->job_started && \ - (jcr->JobStatus == JS_WaitFD || \ - jcr->JobStatus == JS_WaitSD || \ - jcr->JobStatus == JS_WaitMedia || \ - jcr->JobStatus == JS_WaitMount || \ - jcr->JobStatus == JS_WaitStoreRes || \ - jcr->JobStatus == JS_WaitJobRes || \ - jcr->JobStatus == JS_WaitClientRes|| \ - jcr->JobStatus == JS_WaitMaxJobs || \ - jcr->JobStatus == JS_WaitPriority || \ - jcr->SDJobStatus == JS_WaitMedia || \ - jcr->SDJobStatus == JS_WaitMount || \ - jcr->SDJobStatus == JS_WaitDevice || \ + (jcr->JobStatus == JS_WaitFD || \ + jcr->JobStatus == JS_WaitSD || \ + jcr->JobStatus == JS_WaitMedia || \ + jcr->JobStatus == JS_WaitMount || \ + jcr->JobStatus == JS_WaitStoreRes || \ + jcr->JobStatus == JS_WaitJobRes || \ + jcr->JobStatus == JS_WaitClientRes || \ + jcr->JobStatus == JS_WaitMaxJobs || \ + jcr->JobStatus == JS_WaitPriority || \ + jcr->SDJobStatus == JS_WaitMedia || \ + jcr->SDJobStatus == JS_WaitMount || \ + jcr->SDJobStatus == JS_WaitDevice || \ + jcr->SDJobStatus == JS_CloudUpload || \ + jcr->SDJobStatus == JS_CloudDownload || \ jcr->SDJobStatus == JS_WaitMaxJobs)) @@ -145,8 +151,10 @@ struct bpContext; #ifdef FILE_DAEMON +class VSSClient; class htable; -class XACL; +class BACL; +class BXATTR; class snapshot_manager; struct CRYPTO_CTX { @@ -207,6 +215,7 @@ public: bool no_client_used() const { return (m_JobLevel == L_VIRTUAL_FULL); }; + bool can_be_stopped(); /* in lib/jcr.c */ const char *get_OperationName(); /* in lib/jcr.c */ const char *get_ActionName(bool past); /* in lib/jcr.c */ void setJobStatus(int JobStatus); /* in lib/jcr.c */ @@ -305,7 +314,10 @@ public: POOLMEM *comment; /* Comment for this Job */ int64_t max_bandwidth; /* Bandwidth limit for this Job */ htable *path_list; /* Directory list (used by findlib) */ - + int job_uid; /* UID used during job session */ + char *job_user; /* Specific permission for a job */ + char *job_group; /* Specific permission for a job */ + POOLMEM *StatusErrMsg; /* Error message displayed in the job report */ uint32_t getErrors() { return JobErrors + SDErrors; }; /* Get error count */ /* Daemon specific part of JCR */ @@ -367,6 +379,7 @@ public: POOLMEM *wstore_source; /* Where write storage came from */ POOLMEM *catalog_source; /* Where catalog came from */ POOLMEM *next_vol_list; /* Volumes previously requested */ + rblist *bsr_list; /* Bootstrap that can be needed during restore */ int32_t replace; /* Replace option */ int32_t NumVols; /* Number of Volume used in pool */ int32_t reschedule_count; /* Number of times rescheduled */ @@ -402,6 +415,7 @@ public: bool RescheduleIncompleteJobs; /* set if incomplete can be rescheduled */ bool use_all_JobIds; /* Use all jobids present in command line */ bool sd_client; /* This job runs as SD client */ + bool dummy_jobmedia; /* Dummy JobMedia written */ #endif /* DIRECTOR_DAEMON */ @@ -412,7 +426,8 @@ public: POOLMEM *last_fname; /* last file saved/verified */ POOLMEM *job_metadata; /* VSS job metadata */ pthread_cond_t job_start_wait; /* Wait for SD to start Job */ - XACL *xacl; /* ACLs and Extended Attributes for backup/restore */ + BACL *bacl; /* ACLs for backup/restore */ + BXATTR *bxattr; /* Extended Attributes for backup/restore */ int32_t last_type; /* type of last file saved/verified */ int incremental; /* set if incremental for SINCE */ time_t last_stat_time; /* Last time stats sent to Dir */ @@ -450,6 +465,7 @@ public: uint64_t base_size; /* compute space saved with base job */ utime_t snapshot_retention; /* Snapshot retention (from director) */ snapshot_manager *snap_mgr; /* Snapshot manager */ + VSSClient *pVSSClient; /* VSS handler */ #endif /* FILE_DAEMON */ @@ -496,6 +512,7 @@ public: bool Resched; /* Job may be rescheduled */ bool bscan_insert_jobmedia_records; /*Bscan: needs to insert job media records */ bool sd_client; /* Set if acting as client */ + bool use_new_match_all; /* TODO: Remove when the match_bsr() will be well tested */ /* Parmaters for Open Read Session */ BSR *bsr; /* Bootstrap record -- has everything */