2 Bacula(R) - The Network Backup Solution
4 Copyright (C) 2000-2017 Kern Sibbald
6 The original author of Bacula is Kern Sibbald, with contributions
7 from many others, a complete list can be found in the file AUTHORS.
9 You may use this file and others of this release according to the
10 license defined in the LICENSE file, which includes the Affero General
11 Public License, v3.0 ("AGPLv3") and some additional permissions and
12 terms pursuant to its AGPLv3 Section 7.
14 This notice must be preserved when any source code is
15 conveyed and/or propagated.
17 Bacula(R) is a registered trademark of Kern Sibbald.
20 * Includes specific to the Director User Agent Server
22 * Kern Sibbald, August MMI
33 BDB *db; /* Pointing to shared or private db */
34 BDB *shared_db; /* Main Bacula DB access */
35 BDB *private_db; /* Private DB access */
37 CONRES *cons; /* console resource */
38 POOLMEM *cmd; /* return command/name buffer */
39 POOLMEM *args; /* command line arguments */
40 POOLMEM *errmsg; /* store error message */
41 char *argk[MAX_CMD_ARGS]; /* argument keywords */
42 char *argv[MAX_CMD_ARGS]; /* argument values */
43 int argc; /* number of arguments */
44 char **prompt; /* list of prompts */
45 char **unique; /* extra unique field */
46 int max_prompts; /* max size of list */
47 int num_prompts; /* current number in list */
48 char api_opts[MAX_NAME_LENGTH]; /* Api options */
49 int api; /* For programs want an API */
50 int cmd_index; /* Index in command table */
51 bool force_mult_db_connections; /* overwrite cat.mult_db_connections */
52 bool auto_display_messages; /* if set, display messages */
53 bool user_notified_msg_pending; /* set when user notified */
54 bool automount; /* if set, mount after label */
55 bool quit; /* if set, quit */
56 bool verbose; /* set for normal UA verbosity */
57 bool batch; /* set for non-interactive mode */
58 bool gui; /* set if talking to GUI program */
59 bool runscript; /* set if we are in runscript */
60 uint32_t pint32_val; /* positive integer */
61 int32_t int32_val; /* positive/negative */
62 int64_t int64_val; /* big int */
64 void *bvfs; /* used in some bvfs queries */
66 void signal(int sig) { UA_sock->signal(sig); };
68 /* The below are in ua_output.c */
69 void send_msg(const char *fmt, ...);
70 void error_msg(const char *fmt, ...);
71 void warning_msg(const char *fmt, ...);
72 void info_msg(const char *fmt, ...);
75 /* Context for insert_tree_handler() */
77 TREE_ROOT *root; /* root */
78 TREE_NODE *node; /* current node */
79 TREE_NODE *avail_node; /* unused node last insert */
80 int cnt; /* count for user feedback */
81 bool all; /* if set mark all as default */
82 bool hardlinks_in_mem; /* Set to optimize for speed */
83 bool no_auto_parent; /* Set to not select parent directories */
85 uint32_t FileEstimate; /* estimate of number of files */
86 uint32_t FileCount; /* current count of files */
87 uint32_t LastCount; /* last count of files */
88 uint32_t DeltaCount; /* trigger for printing */
89 alist *uid_acl; /* UID allowed in the tree */
90 alist *gid_acl; /* GID allowed in the tree */
91 alist *dir_acl; /* Directories that can be displayed */
92 char *last_dir_acl; /* Last directory from the DirectoryACL list */
96 char **name; /* list of names */
97 int num_ids; /* ids stored */
98 int max_ids; /* size of array */
99 int num_del; /* number deleted */
100 int tot_ids; /* total to process */
104 /* Main structure for obtaining JobIds or Files to be restored */
109 char ClientName[MAX_NAME_LENGTH]; /* backup client */
110 char RestoreClientName[MAX_NAME_LENGTH]; /* restore client */
111 char RestoreMediaType[MAX_NAME_LENGTH]; /* restore Media type when storage override */
113 POOLMEM *JobIds; /* User entered string of JobIds */
114 POOLMEM *BaseJobIds; /* Base jobids */
119 uint32_t selected_files;
128 POOLMEM *fname; /* filename only */
129 POOLMEM *path; /* path only */
131 int fnl; /* filename length */
132 int pnl; /* path length */
134 bool all; /* mark all as default */
135 bool hardlinks_in_mem; /* keep hard links in memory */
136 bool fdcalled; /* True if we should reuse the FD socket */
137 bool no_auto_parent; /* Select or not parent directories */
139 POOLMEM *component_fname;
143 #define MAX_ID_LIST_LEN 2000000