From 8fe276359efe90c40a83f85ff8476d17f10da740 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Wed, 20 Dec 2006 11:35:40 +0000 Subject: [PATCH] kes Add Volume name to Forward spacing message. kes Update migration job start time (so it is not zero) to prevent immediate recycling of the job. This *should* fix bug #733. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@3819 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/projects | 58 +++++++++++++++++++++++++++--- bacula/src/dird/migrate.c | 62 +++++++++++++++++++++++---------- bacula/src/stored/read_record.c | 5 ++- bacula/src/version.h | 6 ++-- bacula/technotes-1.39 | 4 +++ 5 files changed, 105 insertions(+), 30 deletions(-) diff --git a/bacula/projects b/bacula/projects index 18f05061a0..94c6047c4e 100644 --- a/bacula/projects +++ b/bacula/projects @@ -5,10 +5,10 @@ Projects: Summary: -Item 1: Accurate restoration of renamed/deleted files from +Item 1: Accurate restoration of renamed/deleted files Item 2: Implement a Bacula GUI/management tool. Item 3: Implement Base jobs. -Item 4: Implement from-client and to-client on restore command line. +Item 4: Implement from-client and to-client on restore command line. Item 5: Implement creation and maintenance of copy pools Item 6: Merge multiple backups (Synthetic Backup or Consolidation). Item 8: Deletion of Disk-Based Bacula Volumes @@ -44,11 +44,10 @@ Item 36: Implement multiple numeric backup levels as supported by dump Below, you will find more information on future projects: -Item 1: Accurate restoration of renamed/deleted files from - Incremental/Differential backups +Item 1: Accurate restoration of renamed/deleted files Date: 28 November 2005 Origin: Martin Simmons (martin at lispworks dot com) - Status: + Status: Robert Nelson will implement this What: When restoring a fileset for a specified date (including "most recent"), Bacula should give you exactly the files and directories @@ -1023,6 +1022,55 @@ Why: Support of multiple backup levels would provide for more advanced back Notes: Legato Networker supports a similar system with full, incr, and 1-9 as levels. +Item 1: Implement a server-side compression feature + Date: 18 December 2006 + Origin: Vadim A. Umanski , e-mail umanski@ext.ru + Status: + What: The ability to compress backup data on server receiving data + instead of doing that on client sending data. + Why: The need is practical. I've got some machines that can send + data to the network 4 or 5 times faster than compressing + them (I've measured that). They're using fast enough SCSI/FC + disk subsystems but rather slow CPUs (ex. UltraSPARC II). + And the backup server has got a quite fast CPUs (ex. Dual P4 + Xeons) and quite a low load. When you have 20, 50 or 100 GB + of raw data - running a job 4 to 5 times faster - that + really matters. On the other hand, the data can be + compressed 50% or better - so losing twice more space for + disk backup is not good at all. And the network is all mine + (I have a dedicated management/provisioning network) and I + can get as high bandwidth as I need - 100Mbps, 1000Mbps... + That's why the server-side compression feature is needed! + Notes: + +Item 1: Cause daemons to use a specific IP address to source communications + Origin: Bill Moran + Date: 18 Dec 2006 + Status: + What: Cause Bacula daemons (dir, fd, sd) to always use the ip address + specified in the [DIR|DF|SD]Addr directive as the source IP + for initiating communication. + Why: On complex networks, as well as extremely secure networks, it's + not unusual to have multiple possible routes through the network. + Often, each of these routes is secured by different policies + (effectively, firewalls allow or deny different traffic depending + on the source address) + Unfortunately, it can sometimes be difficult or impossible to + represent this in a system routing table, as the result is + excessive subnetting that quickly exhausts available IP space. + The best available workaround is to provide multiple IPs to + a single machine that are all on the same subnet. In order + for this to work properly, applications must support the ability + to bind outgoing connections to a specified address, otherwise + the operating system will always choose the first IP that + matches the required route. + Notes: Many other programs support this. For example, the following + can be configured in BIND: + query-source address 10.0.0.1; + transfer-source 10.0.0.2; + Which means queries from this server will always come from + 10.0.0.1 and zone transfers will always originate from + 10.0.0.2. Kern notes: I think this would add very little functionality, but a *lot* of additional overhead to Bacula. diff --git a/bacula/src/dird/migrate.c b/bacula/src/dird/migrate.c index 88a5189d3a..98689e8604 100644 --- a/bacula/src/dird/migrate.c +++ b/bacula/src/dird/migrate.c @@ -277,25 +277,6 @@ bool do_migration(JCR *jcr) Jmsg(jcr, M_INFO, 0, _("Start Migration JobId %s, Job=%s\n"), edit_uint64(jcr->JobId, ed1), jcr->Job); - set_jcr_job_status(jcr, JS_Running); - set_jcr_job_status(mig_jcr, JS_Running); - Dmsg2(dbglevel, "JobId=%d JobLevel=%c\n", (int)jcr->jr.JobId, jcr->jr.JobLevel); - - /* Update job start record for this migration control job */ - if (!db_update_job_start_record(jcr, jcr->db, &jcr->jr)) { - Jmsg(jcr, M_FATAL, 0, "%s", db_strerror(jcr->db)); - return false; - } - - Dmsg4(dbglevel, "mig_jcr: Name=%s JobId=%d Type=%c Level=%c\n", - mig_jcr->jr.Name, (int)mig_jcr->jr.JobId, - mig_jcr->jr.JobType, mig_jcr->jr.JobLevel); - - /* Update job start record for the real migration backup job */ - if (!db_update_job_start_record(mig_jcr, mig_jcr->db, &mig_jcr->jr)) { - Jmsg(jcr, M_FATAL, 0, "%s", db_strerror(mig_jcr->db)); - return false; - } /* @@ -335,6 +316,49 @@ bool do_migration(JCR *jcr) return false; } + /* + * We re-update the job start record so that the start + * time is set after the run before job. This avoids + * that any files created by the run before job will + * be saved twice. They will be backed up in the current + * job, but not in the next one unless they are changed. + * Without this, they will be backed up in this job and + * in the next job run because in that case, their date + * is after the start of this run. + */ + jcr->start_time = time(NULL); + jcr->jr.StartTime = jcr->start_time; + jcr->jr.JobTDate = jcr->start_time; + set_jcr_job_status(jcr, JS_Running); + + /* Update job start record for this migration control job */ + if (!db_update_job_start_record(jcr, jcr->db, &jcr->jr)) { + Jmsg(jcr, M_FATAL, 0, "%s", db_strerror(jcr->db)); + return false; + } + + + mig_jcr->start_time = time(NULL); + mig_jcr->jr.StartTime = mig_jcr->start_time; + mig_jcr->jr.JobTDate = mig_jcr->start_time; + set_jcr_job_status(mig_jcr, JS_Running); + + /* Update job start record for the real migration backup job */ + if (!db_update_job_start_record(mig_jcr, mig_jcr->db, &mig_jcr->jr)) { + Jmsg(jcr, M_FATAL, 0, "%s", db_strerror(mig_jcr->db)); + return false; + } + + Dmsg4(dbglevel, "mig_jcr: Name=%s JobId=%d Type=%c Level=%c\n", + mig_jcr->jr.Name, (int)mig_jcr->jr.JobId, + mig_jcr->jr.JobType, mig_jcr->jr.JobLevel); + + + /* + * Start the job prior to starting the message thread below + * to avoid two threads from using the BSOCK structure at + * the same time. + */ if (!bnet_fsend(sd, "run")) { return false; } diff --git a/bacula/src/stored/read_record.c b/bacula/src/stored/read_record.c index 7dfd412ecd..cb5d026cf4 100644 --- a/bacula/src/stored/read_record.c +++ b/bacula/src/stored/read_record.c @@ -366,9 +366,8 @@ static BSR *position_to_first_file(JCR *jcr, DCR *dcr) jcr->bsr->reposition = true; /* force repositioning */ bsr = find_next_bsr(jcr->bsr, dev); if (bsr && (bsr->volfile->sfile != 0 || bsr->volblock->sblock != 0)) { - Jmsg(jcr, M_INFO, 0, _("Forward spacing to file:block %u:%u.\n"), - bsr->volfile->sfile, bsr->volblock->sblock); - Dmsg2(dbglvl, "Forward spacing to file:block %u:%u.\n", + Jmsg(jcr, M_INFO, 0, _("Forward spacing Volume \"%s\" to file:block %u:%u.\n"), + dev->VolHdr.VolumeName, bsr->volfile->sfile, bsr->volblock->sblock); dev->reposition(dcr, bsr->volfile->sfile, bsr->volblock->sblock); } diff --git a/bacula/src/version.h b/bacula/src/version.h index d04ca33224..03aaf53e12 100644 --- a/bacula/src/version.h +++ b/bacula/src/version.h @@ -3,9 +3,9 @@ */ #undef VERSION -#define VERSION "1.39.31" -#define BDATE "16 December 2006" -#define LSMDATE "16Dec06" +#define VERSION "1.39.32" +#define BDATE "20 December 2006" +#define LSMDATE "20Dec06" #define PROG_COPYRIGHT "Copyright (C) %d-2006 Free Software Foundation Europe e.V.\n" #define BYEAR "2006" /* year for copyright messages in progs */ diff --git a/bacula/technotes-1.39 b/bacula/technotes-1.39 index e1b2d026ee..694e534fee 100644 --- a/bacula/technotes-1.39 +++ b/bacula/technotes-1.39 @@ -1,6 +1,10 @@ Technical notes on version 1.39 General: +20Dec06 +kes Add Volume name to Forward spacing message. +kes Update migration job start time (so it is not zero) to prevent + immediate recycling of the job. This *should* fix bug #733. 19Dec06 ebl Fix runscript configuration parsing bug. 17Dec06 -- 2.39.5