if test x${prefix} = xNONE && test x${datadir} = x${prefix}/share ; then
datadir=/usr/share
fi
-localedir=`eval echo ${datadir}/locale`
-AC_DEFINE_UNQUOTED(LOCALEDIR, "$localedir")
# ------------------------------------------------------------------
# If the user has not set --prefix, we set our default to nothing.
prefix=
fi
sysconfdir=`eval echo ${sysconfdir}`
+datadir=`eval echo ${datadir}`
+localedir=`eval echo ${datadir}/locale`
+AC_DEFINE_UNQUOTED(LOCALEDIR, "$localedir")
# -------------------------------------------------------------------------
# If the user has not set --exec-prefix, we default to ${prefix}
PID directory: ${piddir}
Subsys directory: ${subsysdir}
Man directory: ${mandir}
+ Data directory: ${datadir}
C Compiler: ${CC} ${CCVERSION}
C++ Compiler: ${CXX} ${CXXVERSION}
Compiler flags: ${WCFLAGS} ${CFLAGS}
if test x${prefix} = xNONE && test x${datadir} = x${prefix}/share ; then
datadir=/usr/share
fi
-localedir=`eval echo ${datadir}/locale`
-cat >>confdefs.h <<_ACEOF
-#define LOCALEDIR "$localedir"
-_ACEOF
-
# ------------------------------------------------------------------
# If the user has not set --prefix, we set our default to nothing.
prefix=
fi
sysconfdir=`eval echo ${sysconfdir}`
+datadir=`eval echo ${datadir}`
+localedir=`eval echo ${datadir}/locale`
+cat >>confdefs.h <<_ACEOF
+#define LOCALEDIR "$localedir"
+_ACEOF
+
# -------------------------------------------------------------------------
# If the user has not set --exec-prefix, we default to ${prefix}
PID directory: ${piddir}
Subsys directory: ${subsysdir}
Man directory: ${mandir}
+ Data directory: ${datadir}
C Compiler: ${CC} ${CCVERSION}
C++ Compiler: ${CXX} ${CXXVERSION}
Compiler flags: ${WCFLAGS} ${CFLAGS}
Kern's ToDo List
- 04 August 2005
+ 13 August 2005
Major development:
Project Developer
1. Fix bugs
- Tape xxx in drive 0, requested in drive 1
- The mount command does not work with drives other than 0.
+- A mount should cause the SD to re-examine what Slot is
+ loaded.
+- The SD locks on to the first available drive then
+ wants a Volume that is released but in another drive --
+ chaos.
- Look at fixing restore status stats in SD.
- My database is growing
records have been removed from the catalog.
For 1.39:
+- "Resuming" a failed backup (lost line for example) by using the
+ failed backup as a sort of "base" job.
- Look at NDMP
- Email to the user when the tape is about to need changing x
days before it needs changing.
General:
Changes to 1.37.36:
+15Aug05
+- Make datadir print on config.out listing.
+- Move get FileSet record up in backup init to eliminate continual
+ Full save seen by Peter Sjoberg.
+- Add VolumeName to read-only Python variables.
+- Add VolumePurged event for Python.
+- Suppress /dev/ Filesystem change prohibited INFO messages.
+- Do not delete FT_RAW files before restore (allows FIFOs
+ to be used for restore).
13Aug05
- Add drive specification to mount, unmount, release, label,
and relabel for Autochangers. Note Dir<->SD protocol has
FILESET_DBR fsr;
POOL_DBR pr;
+ memset(&fsr, 0, sizeof(fsr);
+ if (!get_or_create_fileset_record(jcr, &fsr)) {
+ return false;
+ }
+ bstrncpy(jcr->FSCreateTime, fsr.cCreateTime, sizeof(jcr->FSCreateTime));
+
/*
* Get definitive Job level and since time
*/
jcr->PoolId = pr.PoolId; /****FIXME**** this can go away */
jcr->jr.PoolId = pr.PoolId;
- if (!get_or_create_fileset_record(jcr, &fsr)) {
- return false;
- }
- bstrncpy(jcr->FSCreateTime, fsr.cCreateTime, sizeof(jcr->FSCreateTime));
-
-
Dmsg2(900, "cloned=%d run_cmds=%p\n", jcr->cloned, jcr->job->run_cmds);
if (!jcr->cloned && jcr->job->run_cmds) {
char *runcmd;
int prune_volume(UAContext *ua, MEDIA_DBR *mr);
/* ua_purge.c */
+bool mark_media_purged(UAContext *ua, MEDIA_DBR *mr);
+void purge_files_from_volume(UAContext *ua, MEDIA_DBR *mr );
int purge_jobs_from_volume(UAContext *ua, MEDIA_DBR *mr);
+void purge_files_from_job(UAContext *ua, JOB_DBR *jr);
+
/* ua_run.c */
extern int run_cmd(UAContext *ua, const char *cmd);
/* Read-only variables */
static struct s_vars getvars[] = {
- { N_("Job"), "s"},
- { N_("Level"), "s"},
- { N_("Type"), "s"},
- { N_("JobId"), "i"},
- { N_("Client"), "s"},
- { N_("NumVols"), "i"},
- { N_("Pool"), "s"},
- { N_("Storage"), "s"},
- { N_("Catalog"), "s"},
- { N_("MediaType"), "s"},
- { N_("JobName"), "s"},
- { N_("JobStatus"), "s"},
- { N_("Priority"), "i"},
- { N_("CatalogRes"), "(sssssis)"},
+ { "Job", "s"},
+ { "Level", "s"},
+ { "Type", "s"},
+ { "JobId", "i"},
+ { "Client", "s"},
+ { "NumVols", "i"},
+ { "Pool", "s"},
+ { "Storage", "s"},
+ { "Catalog", "s"},
+ { "MediaType", "s"},
+ { "JobName", "s"},
+ { "JobStatus", "s"},
+ { "Priority", "i"},
+ { "VolumeName", "s"},
+ { "CatalogRes", "(sssssis)"},
{ NULL, NULL}
};
/* Writable variables */
static struct s_vars setvars[] = {
- { N_("JobReport"), "s"},
- { N_("VolumeName"), "s"},
- { N_("Priority"), "i"},
+ { "JobReport", "s"},
+ { "VolumeName", "s"},
+ { "Priority", "i"},
{ NULL, NULL}
};
return Py_BuildValue(getvars[i].fmt, buf);
case 12: /* Priority */
return Py_BuildValue(getvars[i].fmt, jcr->JobPriority);
- case 13: /* CatalogRes */
+ case 13:
+ return Py_BuildValue(getvars[i].fmt, jcr->VolumeName);
+ case 14: /* CatalogRes */
return Py_BuildValue(getvars[i].fmt,
jcr->catalog->db_name, jcr->catalog->db_address,
jcr->catalog->db_user, jcr->catalog->db_password,
#include "dird.h"
/* Imported functions */
-int mark_media_purged(UAContext *ua, MEDIA_DBR *mr);
/* Forward referenced functions */
static int purge_files_from_client(UAContext *ua, CLIENT *client);
static int purge_jobs_from_client(UAContext *ua, CLIENT *client);
-void purge_files_from_volume(UAContext *ua, MEDIA_DBR *mr );
-int purge_jobs_from_volume(UAContext *ua, MEDIA_DBR *mr);
-void purge_files_from_job(UAContext *ua, JOB_DBR *jr);
-int mark_media_purged(UAContext *ua, MEDIA_DBR *mr);
-
#define MAX_DEL_LIST_LEN 1000000
-
static const char *select_jobsfiles_from_client =
"SELECT JobId FROM Job "
"WHERE ClientId=%s "
* IF volume status is Append, Full, Used, or Error, mark it Purged
* Purged volumes can then be recycled (if enabled).
*/
-int mark_media_purged(UAContext *ua, MEDIA_DBR *mr)
+bool mark_media_purged(UAContext *ua, MEDIA_DBR *mr)
{
+ JCR *jcr = ua->jcr;
if (strcmp(mr->VolStatus, "Append") == 0 ||
strcmp(mr->VolStatus, "Full") == 0 ||
strcmp(mr->VolStatus, "Used") == 0 ||
strcmp(mr->VolStatus, "Error") == 0) {
bstrncpy(mr->VolStatus, "Purged", sizeof(mr->VolStatus));
- if (!db_update_media_record(ua->jcr, ua->db, mr)) {
- return 0;
+ if (!db_update_media_record(jcr, ua->db, mr)) {
+ return false;
}
- return 1;
+ pm_strcpy(jcr->VolumeName, mr->VolumeName);
+ generate_job_event(jcr, "VolumePurged");
+ return true;
} else {
bsendmsg(ua, _("Cannot purge Volume with VolStatus=%s\n"), mr->VolStatus);
}
case FT_DIRBEGIN:
return 1; /* not used */
case FT_NORECURSE:
+ Jmsg(jcr, M_INFO, 1, _(" Recursion turned off. Will not descend into %s\n"),
+ ff_pkt->fname);
+ ff_pkt->type = FT_DIREND; /* Backup only the directory entry */
+ break;
case FT_NOFSCHG:
- case FT_INVALIDFS:
- case FT_DIREND:
- if (ff_pkt->type == FT_NORECURSE) {
- Jmsg(jcr, M_INFO, 1, _(" Recursion turned off. Will not descend into %s\n"),
- ff_pkt->fname);
- } else if (ff_pkt->type == FT_NOFSCHG) {
- Jmsg(jcr, M_INFO, 1, _(" File system change prohibited. Will not descend into %s\n"),
- ff_pkt->fname);
- } else if (ff_pkt->type == FT_INVALIDFS) {
- Jmsg(jcr, M_INFO, 1, _(" Disallowed filesystem. Will not descend into %s\n"),
+ /* Suppress message for /dev filesystems */
+ if (strncmp(ff_pkt->fname, "/dev/", 5) != 0) {
+ Jmsg(jcr, M_INFO, 1, _(" Filesystem change prohibited. Will not descend into %s\n"),
ff_pkt->fname);
}
- ff_pkt->type = FT_DIREND; /* value is used below */
- Dmsg1(130, "FT_DIR saving: %s\n", ff_pkt->link);
+ ff_pkt->type = FT_DIREND; /* Backup only the directory entry */
+ break;
+ case FT_INVALIDFS:
+ Jmsg(jcr, M_INFO, 1, _(" Disallowed filesystem. Will not descend into %s\n"),
+ ff_pkt->fname);
+ ff_pkt->type = FT_DIREND; /* Backup only the directory entry */
+ break;
+ case FT_DIREND:
+ Dmsg1(130, "FT_DIREND: %s\n", ff_pkt->link);
break;
case FT_SPEC:
Dmsg1(130, "FT_SPEC saving: %s\n", ff_pkt->fname);
case FT_SPEC:
case FT_REGE: /* empty file */
case FT_REG: /* regular file */
- if (exists) {
+ /*
+ * Note, we do not delete FT_RAW because these are device files
+ * or FIFOs that should already exist. If we blow it away,
+ * we may blow away a FIFO that is being used to read the
+ * restore data, or we may blow away a partition definition.
+ */
+ if (exists && attr->type != FT_RAW) {
/* Get rid of old copy */
if (unlink(attr->ofname) == -1) {
berrno be;
/* */
#undef VERSION
#define VERSION "1.37.36"
-#define BDATE "13 August 2005"
-#define LSMDATE "13Aug05"
+#define BDATE "15 August 2005"
+#define LSMDATE "15Aug05"
/* Debug flags */
#undef DEBUG