- Add umount command for Phil. :-)
- Fix update volume volfrompool.
- Modify restore to print an error message if the size of a
restored file does not correspond to the saved stat packet.
- Fix count of files to be restored *not* to include
top level created directories.
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1632
91ce42f0-d328-0410-95d8-
f526ca767f89
Major development:
Project Developer
Major development:
Project Developer
========================================================
1.35 Items to do for release:
========================================================
1.35 Items to do for release:
-- Backspace to beginning of line (conio) does not erase first char.
-- Doc to do unmount before removing magazine.
-- Detect fixed tape block mode during positioning by looking at
- block numbers in btape "test". Possibly adjust in Bacula.
-- Fix possible bug in update volumefrompool (email 9/28 from
- jesk@killall.org
-- Make restore check if the file size restored is correct.
-
- Document a get out of jail procedure if everything breaks if
you lost/broke the Catalog -- do the same for "I know my
file is there how do I get it back?".
- Document a get out of jail procedure if everything breaks if
you lost/broke the Catalog -- do the same for "I know my
file is there how do I get it back?".
+- Add Pool/Storage override regression test.
+- Add relabel regression test.
+- Add delete JobId to regression.
+- Add bscan to four-concurrent-jobs regression.
Maybe for 1.35:
- Look at patches/bacula_db.b2z postgresql that loops during restore.
See Gregory Wright.
Maybe for 1.35:
- Look at patches/bacula_db.b2z postgresql that loops during restore.
See Gregory Wright.
-- Add delete JobId to regression.
-- Add bscan to four-concurrent-jobs regression.
- Add IPv6 to regression
- Perhaps add read/write programs and/or plugins to FileSets.
- How to handle backing up portables ...
- Add IPv6 to regression
- Perhaps add read/write programs and/or plugins to FileSets.
- How to handle backing up portables ...
- Add some sort of guaranteed Interval for upgrading jobs.
Documentation to do: (any release a little bit at a time)
- Add some sort of guaranteed Interval for upgrading jobs.
Documentation to do: (any release a little bit at a time)
+- Doc to do unmount before removing magazine.
- Alternative to static linking "ldd prog" save all binaries listed,
restore them and point LD_LIBRARY_PATH to them.
- Document add "</dev/null >/dev/null 2>&1" to the bacula-fd command line
- Alternative to static linking "ldd prog" save all binaries listed,
restore them and point LD_LIBRARY_PATH to them.
- Document add "</dev/null >/dev/null 2>&1" to the bacula-fd command line
changing tape settings while a job is running.)
- Lookup HP cleaning recommendations.
- Lookup HP tape replacement recommendations (see trouble shooting autochanger)
changing tape settings while a job is running.)
- Lookup HP cleaning recommendations.
- Lookup HP tape replacement recommendations (see trouble shooting autochanger)
-- Add more obvious documentation of @ for conf files.
- Document doing table repair
- Document doing table repair
For 1.37 Testing/Documentation:
For 1.37 Testing/Documentation:
+- When an error in input occurs and conio beeps, you can back
+ up through the prompt.
+- Detect fixed tape block mode during positioning by looking at
+ block numbers in btape "test". Possibly adjust in Bacula.
- Implement a Client filename case fold option (default = fold
on Win32).
- Fix list volumes to output volume retention in some other
- Implement a Client filename case fold option (default = fold
on Win32).
- Fix list volumes to output volume retention in some other
- Turn on transactions if multiple connections are on in DB.
- Fix storage overrides in Run directives.
- Look into failing Excludes in Win32
- Turn on transactions if multiple connections are on in DB.
- Fix storage overrides in Run directives.
- Look into failing Excludes in Win32
+- Make restore check if the file size restored is correct.
+- Backspace to beginning of line (conio) does not erase first char.
+- Fix possible bug in update volumefrompool (email 9/28 from
+ jesk@killall.org
Generalized console input/output handler
A maintanable replacement for readline()
Generalized console input/output handler
A maintanable replacement for readline()
- Kern Sibbald, December MMIII
+ Updated for Bacula, Kern Sibbald, December MMIII
This code is in part derived from code that I wrote in
1981, so some of it is a bit old and could use a cleanup.
This code is in part derived from code that I wrote in
1981, so some of it is a bit old and could use a cleanup.
case F_ERSCHR: /* Rubout */
backup(curline);
delchr(1, curline, sizeof(curline));
case F_ERSCHR: /* Rubout */
backup(curline);
delchr(1, curline, sizeof(curline));
+ if (cp == 0) {
+ t_char(' ');
+ t_char(0x8);
+ }
break;
case F_DELEOL:
t_clrline(0, t_width);
break;
case F_DELEOL:
t_clrline(0, t_width);
while (cp > 0) {
backup(curline); /* backup to beginning of line */
}
while (cp > 0) {
backup(curline); /* backup to beginning of line */
}
- t_clrline(0,t_width); /* erase line */
+ t_clrline(0, t_width); /* erase line */
cp = 0;
cl = 0; /* reset cursor counter */
cp = 0;
cl = 0; /* reset cursor counter */
+ t_char(' ');
+ t_char(0x8);
break;
case F_SOL:
while (cp > 0) {
break;
case F_SOL:
while (cp > 0) {
{ N_("time"), time_cmd, _("print current time")},
{ N_("trace"), trace_cmd, _("turn on/off trace to file")},
{ N_("unmount"), unmount_cmd, _("unmount <storage-name>")},
{ N_("time"), time_cmd, _("print current time")},
{ N_("trace"), trace_cmd, _("turn on/off trace to file")},
{ N_("unmount"), unmount_cmd, _("unmount <storage-name>")},
+ { N_("umount"), unmount_cmd, _("umount <storage-name> for old-time Unix guys")},
{ N_("update"), update_cmd, _("update Volume or Pool")},
{ N_("use"), use_cmd, _("use catalog xxx")},
{ N_("var"), var_cmd, _("does variable expansion")},
{ N_("update"), update_cmd, _("update Volume or Pool")},
{ N_("use"), use_cmd, _("use catalog xxx")},
{ N_("var"), var_cmd, _("does variable expansion")},
memset(&pr, 0, sizeof(pr));
pr.PoolId = mr->PoolId;
memset(&pr, 0, sizeof(pr));
pr.PoolId = mr->PoolId;
- if (!get_pool_dbr(ua, &pr)) {
+ if (!db_get_pool_record(ua->jcr, ua->db, &pr) ||
+ !acl_access_ok(ua, Pool_ACL, pr.Name)) {
return;
}
set_pool_dbr_defaults_in_media_dbr(mr, &pr);
if (!db_update_media_defaults(ua->jcr, ua->db, mr)) {
bsendmsg(ua, _("Error updating Volume record: ERR=%s"), db_strerror(ua->db));
} else {
return;
}
set_pool_dbr_defaults_in_media_dbr(mr, &pr);
if (!db_update_media_defaults(ua->jcr, ua->db, mr)) {
bsendmsg(ua, _("Error updating Volume record: ERR=%s"), db_strerror(ua->db));
} else {
- bsendmsg(ua, _("Volume defaults updated from Pool record.\n"));
+ bsendmsg(ua, _("Volume defaults updated from \"%s\" Pool record.\n"),
+ pr.Name);
MEDIA_DBR mr;
memset(&pr, 0, sizeof(pr));
MEDIA_DBR mr;
memset(&pr, 0, sizeof(pr));
+ memset(&mr, 0, sizeof(mr));
if (!get_pool_dbr(ua, &pr)) {
return;
}
if (!get_pool_dbr(ua, &pr)) {
return;
}
- memset(&mr, 0, sizeof(mr));
set_pool_dbr_defaults_in_media_dbr(&mr, &pr);
mr.PoolId = pr.PoolId;
if (!db_update_media_defaults(ua->jcr, ua->db, &mr)) {
set_pool_dbr_defaults_in_media_dbr(&mr, &pr);
mr.PoolId = pr.PoolId;
if (!db_update_media_defaults(ua->jcr, ua->db, &mr)) {
break;
case 8:
update_volfrompool(ua, &mr);
break;
case 8:
update_volfrompool(ua, &mr);
case 9:
update_all_vols_from_pool(ua);
case 9:
update_all_vols_from_pool(ua);
case 11:
update_volfrompool(ua, &mr);
case 11:
update_volfrompool(ua, &mr);
case 12:
update_all_vols_from_pool(ua);
case 12:
update_all_vols_from_pool(ua);
default: /* Done or error */
bsendmsg(ua, "Selection done.\n");
return 1;
default: /* Done or error */
bsendmsg(ua, "Selection done.\n");
return 1;
if (node->extract || node->extract_dir) {
Dmsg2(400, "type=%d FI=%d\n", node->type, node->FileIndex);
add_findex(rx->bsr, node->JobId, node->FileIndex);
if (node->extract || node->extract_dir) {
Dmsg2(400, "type=%d FI=%d\n", node->type, node->FileIndex);
add_findex(rx->bsr, node->JobId, node->FileIndex);
+ if (node->extract && node->type != TN_NEWDIR) {
rx->selected_files++; /* count only saved files */
}
}
rx->selected_files++; /* count only saved files */
}
}
switch (stream) {
case STREAM_UNIX_ATTRIBUTES:
case STREAM_UNIX_ATTRIBUTES_EX:
switch (stream) {
case STREAM_UNIX_ATTRIBUTES:
case STREAM_UNIX_ATTRIBUTES_EX:
Dmsg1(30, "Stream=Unix Attributes. extract=%d\n", extract);
/* If extracting, it was from previous stream, so
* close the output file.
Dmsg1(30, "Stream=Unix Attributes. extract=%d\n", extract);
/* If extracting, it was from previous stream, so
* close the output file.
case CF_EXTRACT:
extract = true;
P(jcr->mutex);
case CF_EXTRACT:
extract = true;
P(jcr->mutex);
- pm_strcpy(&jcr->last_fname, attr->ofname);
+ pm_strcpy(jcr->last_fname, attr->ofname);
V(jcr->mutex);
jcr->JobFiles++;
fileAddr = 0;
V(jcr->mutex);
jcr->JobFiles++;
fileAddr = 0;
break;
case CF_CREATED:
P(jcr->mutex);
break;
case CF_CREATED:
P(jcr->mutex);
- pm_strcpy(&jcr->last_fname, attr->ofname);
+ pm_strcpy(jcr->last_fname, attr->ofname);
V(jcr->mutex);
jcr->JobFiles++;
fileAddr = 0;
V(jcr->mutex);
jcr->JobFiles++;
fileAddr = 0;
case STREAM_FILE_DATA:
case STREAM_SPARSE_DATA:
case STREAM_WIN32_DATA:
case STREAM_FILE_DATA:
case STREAM_SPARSE_DATA:
case STREAM_WIN32_DATA:
if (extract) {
if (stream == STREAM_SPARSE_DATA) {
ser_declare;
if (extract) {
if (stream == STREAM_SPARSE_DATA) {
ser_declare;
struct utimbuf ut;
mode_t old_mask;
bool ok = true;
struct utimbuf ut;
mode_t old_mask;
bool ok = true;
#if defined(HAVE_CYGWIN) || defined(HAVE_WIN32)
if (attr->stream == STREAM_UNIX_ATTRIBUTES_EX &&
#if defined(HAVE_CYGWIN) || defined(HAVE_WIN32)
if (attr->stream == STREAM_UNIX_ATTRIBUTES_EX &&
if (is_bopen(ofd)) {
bclose(ofd);
}
if (is_bopen(ofd)) {
bclose(ofd);
}
- pm_strcpy(&attr->ofname, "*none*");
+ pm_strcpy(attr->ofname, "*none*");
return true;
}
if (attr->data_stream == STREAM_WIN32_DATA ||
return true;
}
if (attr->data_stream == STREAM_WIN32_DATA ||
if (is_bopen(ofd)) {
bclose(ofd);
}
if (is_bopen(ofd)) {
bclose(ofd);
}
- pm_strcpy(&attr->ofname, "*none*");
+ pm_strcpy(attr->ofname, "*none*");
old_mask = umask(0);
if (is_bopen(ofd)) {
old_mask = umask(0);
if (is_bopen(ofd)) {
+ char ec1[50], ec2[50];
+ fsize = blseek(ofd, 0, SEEK_CUR);
bclose(ofd); /* first close file */
bclose(ofd); /* first close file */
+ if (fsize > 0 && fsize != attr->statp.st_size) {
+ Jmsg3(jcr, M_ERROR, 0, _("File size of restored file %s not correct. Original %s, restored %s.\n"),
+ attr->ofname, edit_uint64(attr->statp.st_size, ec1),
+ edit_uint64(fsize, ec2));
+ }
}
ut.actime = attr->statp.st_atime;
}
ut.actime = attr->statp.st_atime;
- pm_strcpy(&attr->ofname, "*none*");
+ pm_strcpy(attr->ofname, "*none*");
umask(old_mask);
return ok;
}
umask(old_mask);
return ok;
}
-/*
- * Generate error message
- */
-/* DO NOT USE */
-char *xberror(BFILE *bfd)
-{
- LPTSTR msg;
-
- FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER|
- FORMAT_MESSAGE_FROM_SYSTEM,
- NULL,
- bfd->lerror,
- 0,
- (LPTSTR)&msg,
- 0,
- NULL);
- strip_trailing_junk(msg);
- if (!bfd->errmsg) {
- bfd->errmsg = get_pool_memory(PM_FNAME);
- }
- pm_strcpy(bfd->errmsg, msg);
- LocalFree(msg);
- return bfd->errmsg;
-}
-
/* Returns: bytes read on success
* 0 on EOF
* -1 on error
/* Returns: bytes read on success
* 0 on EOF
* -1 on error
-#define VERSION "1.35.7"
-#define BDATE "03 October 2004"
-#define LSMDATE "03Oct04"
+#define VERSION "1.35.8"
+#define BDATE "04 October 2004"
+#define LSMDATE "04Oct04"
/* Debug flags */
#undef DEBUG
/* Debug flags */
#undef DEBUG