Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- Bacula® is a registered trademark of John Walker.
+ Bacula® is a registered trademark of Kern Sibbald.
The licensor of Bacula is the Free Software Foundation Europe
(FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
Switzerland, email:ftf@fsfeurope.org.
/* Dummy functions */
int generate_daemon_event(JCR *jcr, const char *event) { return 1; }
+extern bool parse_sd_config(CONFIG *config, const char *configfile, int exit_code);
/* Forward referenced functions */
static void do_scan(void);
static int num_media = 0;
static int num_files = 0;
+static CONFIG *config;
#define CONFIG_FILE "bacula-sd.conf"
char *configfile = NULL;
STORES *me = NULL; /* our Global resource */
OSDependentInit();
- while ((ch = getopt(argc, argv, "b:c:dD:h:p:mn:pP:rsStu:vV:w:?")) != -1) {
+ while ((ch = getopt(argc, argv, "b:c:d:D:h:p:mn:pP:rsSt:u:vV:w:?")) != -1) {
switch (ch) {
case 'S' :
showProgress = true;
configfile = bstrdup(CONFIG_FILE);
}
- parse_config(configfile);
+ config = new_config_parser();
+ parse_sd_config(config, configfile, M_ERROR_TERM);
LockRes();
me = (STORES *)GetNextRes(R_STORAGE, NULL);
if (!me) {
struct stat sb;
fstat(dev->fd(), &sb);
currentVolumeSize = sb.st_size;
- Pmsg1(000, _("First Volume Size = %sn"),
+ Pmsg1(000, _("First Volume Size = %s\n"),
edit_uint64(currentVolumeSize, ed1));
}
struct stat sb;
fstat(dev->fd(), &sb);
currentVolumeSize = sb.st_size;
- Pmsg1(000, _("First Volume Size = %sn"),
+ Pmsg1(000, _("First Volume Size = %s\n"),
edit_uint64(currentVolumeSize, ed1));
}
return stat;
jr.PoolId = pr.PoolId;
mjcr->start_time = jr.StartTime;
- mjcr->JobLevel = jr.JobLevel;
+ mjcr->set_JobLevel(jr.JobLevel);
mjcr->client_name = get_pool_memory(PM_FNAME);
pm_strcpy(mjcr->client_name, label.ClientName);
}
break;
- case STREAM_UNIX_ACCESS_ACL: /* Standard ACL attributes on UNIX */
- case STREAM_UNIX_DEFAULT_ACL: /* Default ACL attributes on UNIX */
- /* Ignore Unix attributes */
+ case STREAM_UNIX_ACCESS_ACL: /* Deprecated Standard ACL attributes on UNIX */
+ case STREAM_UNIX_DEFAULT_ACL: /* Deprecated Default ACL attributes on UNIX */
+ case STREAM_ACL_AIX_TEXT:
+ case STREAM_ACL_DARWIN_ACCESS_ACL:
+ case STREAM_ACL_FREEBSD_DEFAULT_ACL:
+ case STREAM_ACL_FREEBSD_ACCESS_ACL:
+ case STREAM_ACL_HPUX_ACL_ENTRY:
+ case STREAM_ACL_IRIX_DEFAULT_ACL:
+ case STREAM_ACL_IRIX_ACCESS_ACL:
+ case STREAM_ACL_LINUX_DEFAULT_ACL:
+ case STREAM_ACL_LINUX_ACCESS_ACL:
+ case STREAM_ACL_TRU64_DEFAULT_ACL:
+ case STREAM_ACL_TRU64_DEFAULT_DIR_ACL:
+ case STREAM_ACL_TRU64_ACCESS_ACL:
+ case STREAM_ACL_SOLARIS_ACLENT:
+ case STREAM_ACL_SOLARIS_ACE:
+ /* Ignore Unix ACL attributes */
+ break;
+
+ case STREAM_XATTR_SOLARIS_SYS:
+ case STREAM_XATTR_SOLARIS:
+ case STREAM_XATTR_DARWIN:
+ case STREAM_XATTR_FREEBSD:
+ case STREAM_XATTR_LINUX:
+ case STREAM_XATTR_NETBSD:
+ /* Ignore Unix Extended attributes */
break;
default:
ar.ClientId = mjcr->ClientId;
ar.JobId = mjcr->JobId;
ar.Stream = rec->Stream;
- ar.FileIndex = rec->FileIndex;
+ if (type == FT_DELETED) {
+ ar.FileIndex = 0;
+ } else {
+ ar.FileIndex = rec->FileIndex;
+ }
ar.attr = ap;
if (dcr->VolFirstIndex == 0) {
dcr->VolFirstIndex = rec->FileIndex;
}
if (verbose) {
Pmsg3(000, _("Updated Job termination record for JobId=%u Level=%s TermStat=%c\n"),
- jr->JobId, job_level_to_str(mjcr->JobLevel), jr->JobStatus);
+ jr->JobId, job_level_to_str(mjcr->get_JobLevel()), jr->JobStatus);
}
if (verbose > 1) {
const char *term_msg;
case JS_Terminated:
term_msg = _("Backup OK");
break;
+ case JS_Warnings:
+ term_msg = _("Backup OK -- with warnings");
+ break;
case JS_FatalError:
case JS_ErrorTerminated:
term_msg = _("*** Backup Error ***");
mjcr->JobId,
mjcr->Job,
mjcr->fileset_name,
- job_level_to_str(mjcr->JobLevel),
+ job_level_to_str(mjcr->get_JobLevel()),
mjcr->client_name,
sdt,
edt,
* the JobId and the ClientId.
*/
jobjcr = new_jcr(sizeof(JCR), bscan_free_jcr);
- jobjcr->JobType = jr->JobType;
- jobjcr->JobLevel = jr->JobLevel;
+ jobjcr->set_JobType(jr->JobType);
+ jobjcr->set_JobLevel(jr->JobLevel);
jobjcr->JobStatus = jr->JobStatus;
bstrncpy(jobjcr->Job, jr->Job, sizeof(jobjcr->Job));
jobjcr->JobId = JobId; /* this is JobId on tape */
/* Dummies to replace askdir.c */
bool dir_find_next_appendable_volume(DCR *dcr) { return 1;}
bool dir_update_volume_info(DCR *dcr, bool relabel, bool update_LastWritten) { return 1; }
-bool dir_create_jobmedia_record(DCR *dcr) { return 1; }
+bool dir_create_jobmedia_record(DCR *dcr, bool zero) { return 1; }
bool dir_ask_sysop_to_create_appendable_volume(DCR *dcr) { return 1; }
bool dir_update_file_attributes(DCR *dcr, DEV_RECORD *rec) { return 1;}
bool dir_send_job_status(JCR *jcr) {return 1;}