--- /dev/null
+#!/bin/sh
+#
+# Shell script to fix PostgreSQL tables in version 8
+#
+echo " "
+echo "This script will fix a Bacula PostgreSQL database version 8"
+echo "Depending on the size of your database,"
+echo "this script may take several minutes to run."
+echo " "
+#
+# Set the following to the path to psql.
+bindir=****EDIT-ME to be the path to psql****
+
+if $bindir/psql $* -f - <<END-OF-DATA
+\c bacula
+
+alter table media alter column endblock rename to endblock-old;
+alter table media add column endblock bigint;
+update media set endblock = endblock-old;
+alter table media alter column endblock set not null;
+alter table media drop column endblock-old;
+
+vacuum;
+
+END-OF-DATA
+then
+ echo "Update of Bacula PostgreSQL tables succeeded."
+else
+ echo "Update of Bacula PostgreSQL tables failed."
+fi
+exit 0
--- /dev/null
+#!/bin/sh
+#
+# Shell script to fix PostgreSQL tables in version 8
+#
+echo " "
+echo "This script will fix a Bacula PostgreSQL database version 8"
+echo "Depending on the size of your database,"
+echo "this script may take several minutes to run."
+echo " "
+#
+# Set the following to the path to psql.
+bindir=****EDIT-ME to be the path to psql****
+
+if $bindir/psql $* -f - <<END-OF-DATA
+\c bacula
+
+alter table media alter column endblock rename to endblock-old;
+alter table media add column endblock bigint;
+update media set endblock = endblock-old;
+alter table media alter column endblock set not null;
+alter table media drop column endblock-old;
+
+vacuum;
+
+END-OF-DATA
+then
+ echo "Update of Bacula PostgreSQL tables succeeded."
+else
+ echo "Update of Bacula PostgreSQL tables failed."
+fi
+exit 0
if (!get_auth || !auth) {
stop_bsock_timer(tid);
Dmsg0(50, _("Director and Storage daemon passwords or names not the same.\n"));
- Jmsg0(jcr, M_FATAL, 0, _("Director and Storage daemon passwords or names not the same.\n"
- "Please see http://www.bacula.org/html-manual/faq.html#AuthorizationErrors for help.\n"));
+ Jmsg0(jcr, M_FATAL, 0,
+ _("Director and Storage daemon passwords or names not the same or\n"
+ "you have exceeded the Maximum Concurrent Jobs on the SD.\n"
+ "Please see http://www.bacula.org/html-manual/faq.html#AuthorizationErrors for help.\n"));
return 0;
}
Dmsg1(116, ">stored: %s", sd->msg);
if (!get_auth || !auth) {
stop_bsock_timer(tid);
Dmsg0(50, _("Director and File daemon passwords or names not the same.\n"));
- Jmsg(jcr, M_FATAL, 0, _("Director and File daemon passwords or names not the same.\n"
- "Please see http://www.bacula.org/html-manual/faq.html#AuthorizationErrors for help.\n"));
+ Jmsg(jcr, M_FATAL, 0,
+ _("Director and File daemon passwords or names not the same or\n"
+ "you have exceeded the Maximum Concurrent Jobs on the FD.\n"
+ "Please see http://www.bacula.org/html-manual/faq.html#AuthorizationErrors for help.\n"));
return 0;
}
Dmsg1(116, ">filed: %s", fd->msg);
{
JCR *jcr = dcr->jcr;
DEVICE *dev = dcr->dev;
- int slot = dcr->VolCatInfo.Slot;
+ int slot;
int drive = jcr->device->drive_index;
int rtn_stat = -1; /* error status */
+ slot = dcr->VolCatInfo.InChanger ? dcr->VolCatInfo.Slot : 0;
/*
* Handle autoloaders here. If we cannot autoload it, we
* will return FALSE to ask the sysop.
return 0; /* For user, bail out right now */
}
if (dir_find_next_appendable_volume(dcr)) {
- slot = dcr->VolCatInfo.Slot;
+ slot = dcr->VolCatInfo.InChanger ? dcr->VolCatInfo.Slot : 0;
} else {
slot = 0;
}