Hi.

A while ago I tried to set up a backup strategy where I defined three pools.
An incremental pool; a full backup pool; and a copy pool.

The idea was to run incremental backups forever (except for the first one that 
would be promoted to a full).
Then at the end each week consolidate the incremental backups into a full 
backup using a VirtualFull job.
Then take a copy of the full backup for off-site storage.

When using a tape library with two drives, I could achieve incremental and 
virtual full backups okay.
But I could not run the Copy job because it refused to run, complaining that 
the read storage is the same as the write storage.

I looked at the code for migrate.c and compared it to vbackup.c since both have 
similar concepts.
I wanted to see why the virtual backups work and the copy jobs wouldn't.
I found identical code in both, except in the vbackup.c the particular check 
that fails for migrate.c has been wrapped in #ifdef to remove it.
Also a FIXME comment is in vbackup.c saying that instead it should just verify 
that the pools are different.

I made the same changes to migrate.c (including adding the FIXME comment) as 
there were in vbackup.c
After doing that my copy job then worked okay within my tape library and my 
backup strategy works as I expected.

Below is a patch to migrate.c to do the same thing as vbackup.c does.
It applies to the latest git checkout of the Bacula code.

--- bacula-3.0.3.orig/src/dird/migrate.c
+++ bacula-3.0.3/src/dird/migrate.c
@@ -350,11 +350,14 @@
     Dmsg2(dbglevel, "Read store=%s, write store=%s\n",
        ((STORE *)jcr->rstorage->first())->name(),
        ((STORE *)jcr->wstorage->first())->name());
+   /* ***FIXME***  we really should simply verify that the pools are different 
*/
+#ifdef xxx
     if (((STORE *)jcr->rstorage->first())->name() == ((STORE 
*)jcr->wstorage->first())->name()) {
        Jmsg(jcr, M_FATAL, 0, _("Read storage \"%s\" same as write storage.\n"),
             ((STORE *)jcr->rstorage->first())->name());
        return false;
     }
+#endif
     if (!start_storage_daemon_job(jcr, jcr->rstorage, jcr->wstorage, 
/*send_bsr*/true)) {
        return false;
     }

What would be involved in having this patch accepted into the code base?

Regards,

-- 
----------
Jim Barber
DDI Health

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Bacula-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-devel

Reply via email to