Index: /branches/eam_branches/ipp-20111122/Ohana/src/libdvo/include/dvo.h
===================================================================
--- /branches/eam_branches/ipp-20111122/Ohana/src/libdvo/include/dvo.h	(revision 33519)
+++ /branches/eam_branches/ipp-20111122/Ohana/src/libdvo/include/dvo.h	(revision 33520)
@@ -626,4 +626,5 @@
 int HostTableWaitJobs (HostTable *table, char *file, int lineno);
 int HostTableWaitJobsGetIO (HostTable *table, char *file, int lineno);
+int HostTableTestHost (SkyRegion *region, int hostID);
 
 // functions to support tiny versions of Average and Measure
Index: /branches/eam_branches/ipp-20111122/Ohana/src/libdvo/src/HostTable.c
===================================================================
--- /branches/eam_branches/ipp-20111122/Ohana/src/libdvo/src/HostTable.c	(revision 33519)
+++ /branches/eam_branches/ipp-20111122/Ohana/src/libdvo/src/HostTable.c	(revision 33520)
@@ -342,2 +342,14 @@
   return globalStatus;
 }
+
+int HostTableTestHost (SkyRegion *region, int hostID) {
+
+  if (!hostID) return FALSE;
+
+  if (region->hostFlags & DATA_USE_BCK) {
+    if (region->backupID == hostID) return TRUE;
+  } else {
+    if (region->hostID == hostID) return TRUE;
+  }
+  return FALSE;
+}
Index: /branches/eam_branches/ipp-20111122/Ohana/src/opihi/dvo/avextract.c
===================================================================
--- /branches/eam_branches/ipp-20111122/Ohana/src/opihi/dvo/avextract.c	(revision 33519)
+++ /branches/eam_branches/ipp-20111122/Ohana/src/opihi/dvo/avextract.c	(revision 33520)
@@ -143,6 +143,7 @@
   interrupt = FALSE;
   for (i = 0; (i < skylist[0].Nregions) && !interrupt; i++) {
-    // parallel case, wrong client
-    if (HOST_ID && (HOST_ID != skylist[0].regions[i]->hostID)) continue;
+
+    // does this host ID match the desired location for the table?
+    if (!HostTableTestHost(skylist[0].regions[i], HOST_ID)) continue;
 
     /* lock, load, unlock catalog */
Index: /branches/eam_branches/ipp-20111122/Ohana/src/opihi/dvo/mextract.c
===================================================================
--- /branches/eam_branches/ipp-20111122/Ohana/src/opihi/dvo/mextract.c	(revision 33519)
+++ /branches/eam_branches/ipp-20111122/Ohana/src/opihi/dvo/mextract.c	(revision 33520)
@@ -159,6 +159,7 @@
 
   for (i = 0; (i < skylist[0].Nregions) && !interrupt; i++) {
-    // parallel case, wrong client
-    if (HOST_ID && (HOST_ID != skylist[0].regions[i]->hostID)) continue;
+
+    // does this host ID match the desired location for the table?
+    if (!HostTableTestHost(skylist[0].regions[i], HOST_ID)) continue;
 
     /* lock, load, unlock catalog */
Index: /branches/eam_branches/ipp-20111122/Ohana/src/photdbc/src/CopyBackupToHost.c
===================================================================
--- /branches/eam_branches/ipp-20111122/Ohana/src/photdbc/src/CopyBackupToHost.c	(revision 33519)
+++ /branches/eam_branches/ipp-20111122/Ohana/src/photdbc/src/CopyBackupToHost.c	(revision 33520)
@@ -106,4 +106,8 @@
 
     valid:
+      if (j == 0) {
+	fprintf (stderr, "copying %s to %s\n", skylist->regions[i]->name, dstHost->pathname);
+      }
+
       // read srcname, write to tgtname, get MD5 sum for srcname as we go:
       // XXX files that fail here should be skipped (but don't give up)
Index: /branches/eam_branches/ipp-20111122/Ohana/src/photdbc/src/initialize_dvodist.c
===================================================================
--- /branches/eam_branches/ipp-20111122/Ohana/src/photdbc/src/initialize_dvodist.c	(revision 33519)
+++ /branches/eam_branches/ipp-20111122/Ohana/src/photdbc/src/initialize_dvodist.c	(revision 33520)
@@ -104,5 +104,5 @@
     }
     // usage dvodist -out-backup (srcHost) to (dstHost)
-    MODE = MODE_OUT_BACKUP;
+    MODE = MODE_USE_BACKUP;
     remove_argument (N, &argc, argv);
     srcHostname = strcreate (argv[N]);
Index: /branches/eam_branches/ipp-20111122/Ohana/src/relastro/src/UpdateObjectOffsets.c
===================================================================
--- /branches/eam_branches/ipp-20111122/Ohana/src/relastro/src/UpdateObjectOffsets.c	(revision 33519)
+++ /branches/eam_branches/ipp-20111122/Ohana/src/relastro/src/UpdateObjectOffsets.c	(revision 33520)
@@ -23,5 +23,6 @@
   for (i = 0; i < skylist[0].Nregions; i++) {
 
-    if (hostID && (skylist[0].regions[i]->hostID != hostID)) continue;
+    // does this host ID match the desired location for the table?
+    if (!HostTableTestHost(skylist[0].regions[i], hostID)) continue;
 
     // define the catalog file name
Index: /branches/eam_branches/ipp-20111122/Ohana/src/relastro/src/high_speed_catalogs.c
===================================================================
--- /branches/eam_branches/ipp-20111122/Ohana/src/relastro/src/high_speed_catalogs.c	(revision 33519)
+++ /branches/eam_branches/ipp-20111122/Ohana/src/relastro/src/high_speed_catalogs.c	(revision 33520)
@@ -22,5 +22,6 @@
   for (i = 0; i < skylist[0].Nregions; i++) {
 
-    if (hostID && (skylist[0].regions[i]->hostID != hostID)) continue;
+    // does this host ID match the desired location for the table?
+    if (!HostTableTestHost(skylist[0].regions[i], hostID)) continue;
 
     // set up the basic catalog info
Index: /branches/eam_branches/ipp-20111122/Ohana/src/relastro/src/load_catalogs.c
===================================================================
--- /branches/eam_branches/ipp-20111122/Ohana/src/relastro/src/load_catalogs.c	(revision 33519)
+++ /branches/eam_branches/ipp-20111122/Ohana/src/relastro/src/load_catalogs.c	(revision 33520)
@@ -22,5 +22,6 @@
   for (i = 0; i < skylist[0].Nregions; i++) {
 
-    if (hostID && (skylist[0].regions[i]->hostID != hostID)) continue;
+    // does this host ID match the desired location for the table?
+    if (!HostTableTestHost(skylist[0].regions[i], hostID)) continue;
 
     // we only allow output if we do not use a subset.  in this case,
Index: /branches/eam_branches/ipp-20111122/Ohana/src/relastro/src/relastro_objects.c
===================================================================
--- /branches/eam_branches/ipp-20111122/Ohana/src/relastro/src/relastro_objects.c	(revision 33519)
+++ /branches/eam_branches/ipp-20111122/Ohana/src/relastro/src/relastro_objects.c	(revision 33520)
@@ -34,5 +34,6 @@
   for (i = 0; i < skylist[0].Nregions; i++) {
 
-    if (hostID && (skylist[0].regions[i]->hostID != hostID)) continue;
+    // does this host ID match the desired location for the table?
+    if (!HostTableTestHost(skylist[0].regions[i], hostID)) continue;
 
     // set up the basic catalog info
Index: /branches/eam_branches/ipp-20111122/Ohana/src/relphot/src/load_catalogs.c
===================================================================
--- /branches/eam_branches/ipp-20111122/Ohana/src/relphot/src/load_catalogs.c	(revision 33519)
+++ /branches/eam_branches/ipp-20111122/Ohana/src/relphot/src/load_catalogs.c	(revision 33520)
@@ -35,5 +35,6 @@
     dvo_catalog_init (&catalog[i], TRUE);
 
-    if (hostID && (skylist[0].regions[i]->hostID != hostID)) continue;
+    // does this host ID match the desired location for the table?
+    if (!HostTableTestHost(skylist[0].regions[i], hostID)) continue;
 
     // set up the basic catalog info
Index: /branches/eam_branches/ipp-20111122/Ohana/src/relphot/src/reload_catalogs.c
===================================================================
--- /branches/eam_branches/ipp-20111122/Ohana/src/relphot/src/reload_catalogs.c	(revision 33519)
+++ /branches/eam_branches/ipp-20111122/Ohana/src/relphot/src/reload_catalogs.c	(revision 33520)
@@ -37,5 +37,7 @@
   /* load data from each region file */
   for (i = 0; i < skylist[0].Nregions; i++) {
-    if (hostID && (skylist[0].regions[i]->hostID != hostID)) continue;
+
+    // does this host ID match the desired location for the table?
+    if (!HostTableTestHost(skylist[0].regions[i], hostID)) continue;
 
     gettimeofday (&start, (void *) NULL);
Index: /branches/eam_branches/ipp-20111122/Ohana/src/relphot/src/relphot_objects.c
===================================================================
--- /branches/eam_branches/ipp-20111122/Ohana/src/relphot/src/relphot_objects.c	(revision 33519)
+++ /branches/eam_branches/ipp-20111122/Ohana/src/relphot/src/relphot_objects.c	(revision 33520)
@@ -33,5 +33,6 @@
   for (i = 0; i < skylist[0].Nregions; i++) {
 
-    if (hostID && (skylist[0].regions[i]->hostID != hostID)) continue;
+    // does this host ID match the desired location for the table?
+    if (!HostTableTestHost(skylist[0].regions[i], hostID)) continue;
 
     // set up the basic catalog info
Index: /branches/eam_branches/ipp-20111122/Ohana/src/uniphot/src/update_dvo_setphot.c
===================================================================
--- /branches/eam_branches/ipp-20111122/Ohana/src/uniphot/src/update_dvo_setphot.c	(revision 33519)
+++ /branches/eam_branches/ipp-20111122/Ohana/src/uniphot/src/update_dvo_setphot.c	(revision 33520)
@@ -43,6 +43,6 @@
   for (i = 0; i < skylist[0].Nregions; i++) {
 
-    if (HOST_ID && (HOST_ID != skylist->regions[i]->hostID)) continue;
-    if (HOST_ID && !(skylist->regions[i]->hostFlags & DATA_ON_TGT)) continue;
+    // does this host ID match the desired location for the table?
+    if (!HostTableTestHost(skylist[0].regions[i], HOST_ID)) continue;
 
     char localFilename[1024];
