bool do_backup_init(JCR *jcr)
{
+ free_rstorage(jcr); /* we don't read so release */
+
if (!get_or_create_fileset_record(jcr)) {
return false;
}
}
/* If pool storage specified, use it instead of job storage */
- copy_storage(jcr, jcr->pool->storage, _("Pool resource"));
+ copy_wstorage(jcr, jcr->pool->storage, _("Pool resource"));
- if (!jcr->storage) {
+ if (!jcr->wstorage) {
Jmsg(jcr, M_FATAL, 0, _("No Storage specification found in Job or Pool.\n"));
return false;
}
/*
* Now start a job with the Storage daemon
*/
- if (!start_storage_daemon_job(jcr, NULL, jcr->storage)) {
+ if (!start_storage_daemon_job(jcr, NULL, jcr->wstorage)) {
return false;
}
/*
* send Storage daemon address to the File daemon
*/
- store = jcr->store;
+ store = jcr->wstore;
if (store->SDDport == 0) {
store->SDDport = store->SDport;
}
jcr->jr.JobId,
jcr->jr.Job,
level_to_str(jcr->JobLevel), jcr->since,
- jcr->client->hdr.name, cr.Uname,
- jcr->fileset->hdr.name, jcr->FSCreateTime,
- jcr->pool->hdr.name, jcr->pool_source,
- jcr->store->hdr.name, jcr->storage_source,
+ jcr->client->name(), cr.Uname,
+ jcr->fileset->name(), jcr->FSCreateTime,
+ jcr->pool->name(), jcr->pool_source,
+ jcr->wstore->name(), jcr->storage_source,
schedt,
sdt,
edt,
fd = bpipe ? bpipe->wfd : NULL;
} else {
/* ***FIXME*** handle BASE */
- fd = fopen(fname, jcr->JobLevel==L_FULL?"w+":"a+");
+ fd = fopen(fname, jcr->JobLevel==L_FULL?"w+b":"a+b");
}
if (fd) {
VolCount = db_get_job_volume_parameters(jcr, jcr->db, jcr->JobId,