source: MondoRescue/trunk/mondo/src/mondorestore/mondo-rstr-compare.c@ 1081

Last change on this file since 1081 was 1081, checked in by Bruno Cornec, 17 years ago

merge -r1078:1080 $SVN_M/branches/stable

  • Property svn:keywords set to Id
File size: 20.2 KB
Line 
1/***************************************************************************
2* compares mondoarchive data
3* $Id: mondo-rstr-compare.c 1081 2007-01-28 22:20:07Z bruno $
4*/
5
6#include "my-stuff.h"
7#include "../common/mondostructures.h"
8#include "../common/libmondo.h"
9#include "mr-externs.h"
10#include "mondo-rstr-compare.h"
11#include "mondo-restore-EXT.h"
12#include "mondo-rstr-tools-EXT.h"
13#ifndef S_SPLINT_S
14#include <pthread.h>
15#endif
16#include "mr_mem.h"
17
18void popup_changelist_from_file(char *);
19
20
21/**
22 * @addtogroup LLcompareGroup
23 * @{
24 */
25/**
26 * Compare biggiefile number @p bigfileno with the filesystem mounted on @p MNT_RESTORING.
27 * @param bkpinfo The backup information structure. Only used in insist_on_this_cd_number().
28 * @param bigfileno The biggiefile number (starting from 0) to compare.
29 * @note This function uses an MD5 checksum.
30 */
31int compare_a_biggiefile(struct s_bkpinfo *bkpinfo, long bigfileno)
32{
33
34 FILE *fin;
35 FILE *fout;
36
37 /** needs malloc *******/
38 char *checksum = NULL;
39 char *original_cksum = NULL;
40 char *bigfile_fname = NULL;
41 char *tmp = NULL;
42 char *tmp1 = NULL;
43 char *command = NULL;
44
45 char *p = NULL;
46 int i = 0;
47 size_t n = 0;
48 int retval = 0;
49
50 struct s_filename_and_lstat_info biggiestruct;
51
52 assert(bkpinfo != NULL);
53
54 tmp1 = slice_fname(bigfileno, 0, ARCHIVES_PATH, "");
55 if (!does_file_exist(tmp1)) {
56 if (does_file_exist(MNT_CDROM "/archives/NOT-THE-LAST")) {
57 insist_on_this_cd_number(bkpinfo, (++g_current_media_number));
58 } else {
59 log_msg(2, "No CD's left. No biggiefiles left. No problem.");
60 return (0);
61 }
62 }
63 if (!(fin = fopen(tmp1, "r"))) {
64 mr_asprintf(&tmp, _("Cannot open bigfile %ld (%s)'s info file"),
65 bigfileno + 1, tmp);
66 log_to_screen(tmp);
67 mr_free(tmp);
68 mr_free(tmp1);
69 return (1);
70 }
71 mr_free(tmp1);
72
73 fread((void *) &biggiestruct, 1, sizeof(biggiestruct), fin);
74 paranoid_fclose(fin);
75
76 mr_asprintf(&checksum, biggiestruct.checksum);
77 mr_asprintf(&bigfile_fname, biggiestruct.filename);
78
79 log_msg(2, "biggiestruct.filename = %s", bigfile_fname);
80 log_msg(2, "biggiestruct.checksum = %s", checksum);
81
82 if (!g_text_mode) {
83 mr_asprintf(&tmp, _("Comparing %s"), bigfile_fname);
84 newtDrawRootText(0, 22, tmp);
85 newtRefresh();
86 mr_free(tmp);
87 }
88 /* BERLIOS: Useless ?
89 if (!checksum[0]) {
90 log_msg(2, "Warning - %s has no checksum", bigfile_fname_ptr);
91 } */
92 if (!strncmp(bigfile_fname, "/dev/", 5)) {
93 log_msg(2, _("Ignoring device %s"), bigfile_fname);
94 return(0);
95 } else {
96 mr_asprintf(&command,
97 "md5sum \"%s%s\" > /tmp/md5sum.txt 2> /tmp/errors.txt",
98 MNT_RESTORING, bigfile_fname);
99 }
100 log_msg(2, command);
101 paranoid_system("cat /tmp/errors >> /tmp/mondo-restore.log 2> /dev/null");
102 if (system(command)) {
103 log_OS_error("Warning - command failed");
104 mr_free(command);
105 mr_free(bigfile_fname);
106 return (1);
107 } else {
108 mr_free(command);
109 if (!(fin = fopen("/tmp/md5sum.txt", "r"))) {
110 log_msg(2, "Unable to open /tmp/md5sum.txt; can't get live checksum");
111 mr_free(bigfile_fname);
112 return (1);
113 } else {
114 mr_getline(&original_cksum, &n, fin);
115 paranoid_fclose(fin);
116 for (i = strlen(original_cksum);
117 i > 0 && original_cksum[i - 1] < 32; i--);
118 original_cksum[i] = '\0';
119 p = (char *) strchr(original_cksum, ' ');
120 if (p) {
121 *p = '\0';
122 }
123 }
124 }
125 if (!strcmp(checksum, original_cksum) != 0) {
126 log_msg(1, "bigfile #%ld ('%s') ... OK", bigfileno + 1, bigfile_fname);
127 } else {
128 log_msg(1, "bigfile #%ld ('%s') ... changed", bigfileno + 1, bigfile_fname);
129 retval++;
130 }
131 mr_free(original_cksum);
132 mr_free(checksum);
133
134 if (retval) {
135 if (!(fout = fopen("/tmp/changed.txt", "a"))) {
136 fatal_error("Cannot openout changed.txt");
137 }
138 fprintf(fout, "%s\n", bigfile_fname);
139 paranoid_fclose(fout);
140 }
141 mr_free(bigfile_fname);
142
143 return (retval);
144}
145
146/**************************************************************************
147 *END_COMPARE_A_BIGGIEFILE *
148 **************************************************************************/
149
150
151/**
152 * Compare all biggiefiles in the backup.
153 * @param bkpinfo The backup information structure. Used only in compare_a_biggiefile().
154 * @return 0 for success, nonzero for failure.
155 */
156int compare_all_biggiefiles(struct s_bkpinfo *bkpinfo)
157{
158 int retval = 0;
159 int res;
160 long noof_biggiefiles, bigfileno = 0;
161 char *tmp;
162
163 assert(bkpinfo != NULL);
164 log_msg(1, "Comparing biggiefiles");
165
166 if (length_of_file(BIGGIELIST) < 6) {
167 log_msg(1,
168 "OK, really teeny-tiny biggielist; not comparing biggiefiles");
169 return (0);
170 }
171 noof_biggiefiles = count_lines_in_file(BIGGIELIST);
172 if (noof_biggiefiles <= 0) {
173 log_msg(1, "OK, no biggiefiles; not comparing biggiefiles");
174 return (0);
175 }
176 mvaddstr_and_log_it(g_currentY, 0,
177 _
178 ("Comparing large files "));
179 open_progress_form(_("Comparing large files"),
180 _("I am now comparing the large files"),
181 _("against the filesystem. Please wait."), "",
182 noof_biggiefiles);
183 for (bigfileno = 0; bigfileno < noof_biggiefiles; bigfileno++) {
184 mr_asprintf(&tmp, "Comparing big file #%ld", bigfileno + 1);
185 log_msg(1, tmp);
186 update_progress_form(tmp);
187 mr_free(tmp);
188 res = compare_a_biggiefile(bkpinfo, bigfileno);
189 retval += res;
190 g_current_progress++;
191 }
192 close_progress_form();
193 /* BERLIOS: useless ?
194 return (0);
195 */
196 if (retval) {
197 mvaddstr_and_log_it(g_currentY++, 74, _("Errors."));
198 } else {
199 mvaddstr_and_log_it(g_currentY++, 74, _("Done."));
200 }
201 return (retval);
202}
203
204/**************************************************************************
205 *END_COMPARE_ALL_BIGGIEFILES *
206 **************************************************************************/
207
208
209/**
210 * Compare afioball @p tarball_fname against the filesystem.
211 * You must be chdir()ed to the directory where the filesystem is mounted
212 * before you call this function.
213 * @param tarball_fname The filename of the tarball to compare.
214 * @param current_tarball_number The fileset number contained in @p tarball_fname.
215 * @return 0 for success, nonzero for failure.
216 */
217int compare_a_tarball(char *tarball_fname, int current_tarball_number)
218{
219 int retval = 0;
220 int res;
221 long noof_lines;
222 long archiver_errors;
223 bool use_star;
224
225 /*** needs malloc *********/
226 char *command = NULL;
227 char *tmp = NULL;
228 char *filelist_name = NULL;
229 char *logfile = NULL;
230 char *archiver_exe = NULL;
231 char *compressor_exe = NULL;
232
233 use_star = (strstr(tarball_fname, ".star")) ? TRUE : FALSE;
234 assert_string_is_neither_NULL_nor_zerolength(tarball_fname);
235 mr_asprintf(&filelist_name, MNT_CDROM "/archives/filelist.%d",
236 current_tarball_number);
237
238 noof_lines = count_lines_in_file(filelist_name);
239 mr_free(filelist_name);
240
241 if (strstr(tarball_fname, ".bz2")) {
242 mr_asprintf(&compressor_exe, "bzip2");
243 } else if (strstr(tarball_fname, ".gz")) {
244 strcpy(compressor_exe, "gzip");
245 } else if (strstr(tarball_fname, ".gz")) {
246 strcpy(compressor_exe, "gzip");
247 } else if (strstr(tarball_fname, ".lzo")) {
248 mr_asprintf(&compressor_exe, "lzop");
249 } else {
250 compressor_exe = NULL;
251 }
252
253 if (use_star) {
254 mr_asprintf(&archiver_exe, "star -bz");
255 } else {
256 mr_asprintf(&archiver_exe, "afio");
257 }
258
259 if (compressor_exe != NULL) {
260 tmp = find_home_of_exe(compressor_exe);
261 if (!tmp) {
262 fatal_error("(compare_a_tarball) Compression program missing");
263 }
264 mr_free(tmp);
265
266 if (use_star) {
267 if (strcmp(compressor_exe, "bzip2")) {
268 fatal_error
269 ("(compare_a_tarball) Please use only bzip2 with star");
270 }
271 } else {
272 tmp = compressor_exe;
273 mr_asprintf(&compressor_exe, "-P %s -Z", tmp);
274 mr_free(tmp);
275 }
276 }
277// star -diff H=star -bz file=....
278
279#ifdef __FreeBSD__
280#define BUFSIZE 512L
281#else
282#define BUFSIZE (1024L*1024L)/TAPE_BLOCK_SIZE
283#endif
284
285 mr_asprintf(&logfile, "/tmp/afio.log.%d", current_tarball_number);
286 if (use_star) // doesn't use compressor_exe
287 {
288 mr_asprintf(&command,
289 "%s -diff H=star file=%s >> %s 2>> %s",
290 archiver_exe, tarball_fname, logfile, logfile);
291 } else {
292 mr_asprintf(&command,
293 "%s -r -b %ld -M 16m -c %ld %s %s >> %s 2>> %s",
294 archiver_exe,
295 TAPE_BLOCK_SIZE,
296 BUFSIZE, compressor_exe, tarball_fname, logfile, logfile);
297 }
298#undef BUFSIZE
299 mr_free(archiver_exe);
300 mr_free(compressor_exe);
301
302 res = system(command);
303 retval += res;
304 if (res) {
305 log_OS_error(command);
306 }
307 mr_free(command);
308
309 if (length_of_file(logfile) > 5) {
310 mr_asprintf(&command,
311 "sed s/': \\\"'/\\|/ %s | sed s/'\\\": '/\\|/ | cut -d'|' -f2 | sort -u | grep -vx \"dev/.*\" >> /tmp/changed.txt",
312 logfile);
313 system(command);
314 mr_free(command);
315 archiver_errors = count_lines_in_file(logfile);
316 } else {
317 archiver_errors = 0;
318 }
319
320 if (archiver_errors) {
321 mr_asprintf(&tmp,
322 "Differences found while processing fileset #%d ",
323 current_tarball_number);
324 log_msg(1, tmp);
325 mr_free(tmp);
326 }
327 unlink(logfile);
328 mr_free(logfile);
329 return (retval);
330}
331
332/**************************************************************************
333 *END_COMPARE_A_TARBALL *
334 **************************************************************************/
335
336
337/**
338 * Compare all afioballs in this backup.
339 * @param bkpinfo The backup media structure. Passed to other functions.
340 * @return 0 for success, nonzero for failure.
341 */
342int compare_all_tarballs(struct s_bkpinfo *bkpinfo)
343{
344 int retval = 0;
345 int res;
346 int current_tarball_number = 0;
347
348 /** needs malloc **********/
349
350 char *tarball_fname = NULL;
351 char *progress_str = NULL;
352 char *tmp = NULL;
353 long max_val;
354
355 assert(bkpinfo != NULL);
356 mvaddstr_and_log_it(g_currentY, 0, _("Comparing archives"));
357 read_cfg_var(g_mondo_cfg_file, "last-filelist-number", tmp);
358
359 max_val = atol(tmp);
360 mr_free(tmp);
361
362 mr_asprintf(&progress_str, _("Comparing with %s #%d "),
363 bkpinfo->backup_media_string,
364 g_current_media_number);
365
366 open_progress_form(_("Comparing files"),
367 _("Comparing tarballs against filesystem."),
368 _("Please wait. This may take some time."),
369 progress_str, max_val);
370
371 log_to_screen(progress_str);
372
373 for (;;) {
374 insist_on_this_cd_number(bkpinfo, g_current_media_number);
375 update_progress_form(progress_str);
376 mr_asprintf(&tarball_fname,
377 MNT_CDROM "/archives/%d.afio.bz2", current_tarball_number);
378
379 if (!does_file_exist(tarball_fname)) {
380 mr_free(tarball_fname);
381 mr_asprintf(&tarball_fname, MNT_CDROM "/archives/%d.afio.lzo",
382 current_tarball_number);
383 }
384 if (!does_file_exist(tarball_fname)) {
385 mr_free(tarball_fname);
386 mr_asprintf(&tarball_fname, MNT_CDROM "/archives/%d.afio.",
387 current_tarball_number);
388 }
389 if (!does_file_exist(tarball_fname)) {
390 mr_free(tarball_fname);
391 mr_asprintf(&tarball_fname, MNT_CDROM "/archives/%d.star.bz2",
392 current_tarball_number);
393 }
394 if (!does_file_exist(tarball_fname)) {
395 mr_free(tarball_fname);
396 mr_asprintf(&tarball_fname, MNT_CDROM "/archives/%d.star.",
397 current_tarball_number);
398 }
399 if (!does_file_exist(tarball_fname)) {
400 if (!does_file_exist(MNT_CDROM "/archives/NOT-THE-LAST") ||
401 system("find " MNT_CDROM
402 "/archives/slice* > /dev/null 2> /dev/null")
403 == 0) {
404 log_msg(2, "OK, I think I'm done with tarballs...");
405 mr_free(tarball_fname);
406 break;
407 }
408 log_msg(2, "OK, I think it's time for another CD...");
409 g_current_media_number++;
410 mr_free(progress_str);
411 mr_asprintf(&progress_str, _("Comparing with %s #%d "),
412 bkpinfo->backup_media_string,
413 g_current_media_number);
414 log_to_screen(progress_str);
415 } else {
416 res = compare_a_tarball(tarball_fname, current_tarball_number);
417 mr_free(tarball_fname);
418
419 g_current_progress++;
420 current_tarball_number++;
421 }
422 }
423 mr_free(progress_str);
424 close_progress_form();
425
426 if (retval) {
427 mvaddstr_and_log_it(g_currentY++, 74, _("Errors."));
428 } else {
429 mvaddstr_and_log_it(g_currentY++, 74, _("Done."));
430 }
431 return (retval);
432}
433
434/**************************************************************************
435 *END_COMPARE_ALL_TARBALLS *
436 **************************************************************************/
437
438/* @} - end LLcompareGroup */
439
440
441/**
442 * @addtogroup compareGroup
443 * @{
444 */
445/**
446 * Compare all data on a CD-R/CD-RW/DVD/ISO/NFS-based backup.
447 * @param bkpinfo The backup information structure. Passed to other functions.
448 * @return 0 for success, nonzero for failure.
449 */
450int compare_to_CD(struct s_bkpinfo *bkpinfo)
451{
452 /** needs malloc *********/
453 char *tmp = NULL;
454 char *cwd = NULL;
455 char *new = NULL;
456 char *command = NULL;
457 int resA = 0;
458 int resB = 0;
459 long noof_changed_files;
460
461 malloc_string(cwd);
462 malloc_string(new);
463
464 assert(bkpinfo != NULL);
465
466 getcwd(cwd, MAX_STR_LEN - 1);
467 chdir(bkpinfo->restore_path);
468 getcwd(new, MAX_STR_LEN - 1);
469 insist_on_this_cd_number(bkpinfo, g_current_media_number);
470 unlink("/tmp/changed.txt");
471
472 resA = compare_all_tarballs(bkpinfo);
473 resB = compare_all_biggiefiles(bkpinfo);
474 chdir(cwd);
475 noof_changed_files = count_lines_in_file("/tmp/changed.txt");
476 if (noof_changed_files) {
477 mr_asprintf(&tmp, _("%ld files do not match the backup "),
478 noof_changed_files);
479 // mvaddstr_and_log_it( g_currentY++, 0, tmp );
480 log_to_screen(tmp);
481 mr_free(tmp);
482
483 mr_asprintf(&command, "cat /tmp/changed.txt >> %s", MONDO_LOGFILE);
484 paranoid_system(command);
485 mr_free(command);
486 } else {
487 mr_asprintf(&tmp, _("All files match the backup "));
488 mvaddstr_and_log_it(g_currentY++, 0, tmp);
489 log_to_screen(tmp);
490 mr_free(tmp);
491 }
492
493 mr_free(cwd);
494 mr_free(new);
495
496 return (resA + resB);
497}
498
499/**************************************************************************
500 *END_COMPARE_TO_CD *
501 **************************************************************************/
502
503
504/**
505 * Compare all data in the user's backup.
506 * This function will mount filesystems, compare afioballs and biggiefiles,
507 * and show the user the differences.
508 * @param bkpinfo The backup information structure. Passed to other functions.
509 * @param mountlist The mountlist containing partitions to mount.
510 * @param raidlist The raidlist containing the user's RAID devices.
511 * @return The number of errors/differences found.
512 */
513int
514compare_mode(struct s_bkpinfo *bkpinfo,
515 struct mountlist_itself *mountlist,
516 struct raidlist_itself *raidlist)
517{
518 int retval = 0;
519 long q;
520 char *tmp;
521
522 /**************************************************************************
523 * also deletes tmp/filelist.full & tmp/biggielist.txt _and_ tries to *
524 * restore them from start of tape, if available *
525 **************************************************************************/
526 assert(bkpinfo != NULL);
527 assert(mountlist != NULL);
528 assert(raidlist != NULL);
529
530 while (get_cfg_file_from_archive(bkpinfo)) {
531 if (!ask_me_yes_or_no
532 (_
533 ("Failed to find config file/archives. Choose another source?")))
534 {
535 fatal_error("Unable to find config file/archives. Aborting.");
536 }
537 interactively_obtain_media_parameters_from_user(bkpinfo, FALSE);
538 }
539
540 read_cfg_file_into_bkpinfo(g_mondo_cfg_file, bkpinfo);
541 g_current_media_number = 1;
542 mvaddstr_and_log_it(1, 30, _("Comparing Automatically"));
543 iamhere("Pre-MAD");
544 retval = mount_all_devices(mountlist, FALSE);
545 iamhere("Post-MAD");
546 if (retval) {
547 unmount_all_devices(mountlist);
548 return (retval);
549 }
550 if (bkpinfo->backup_media_type == tape
551 || bkpinfo->backup_media_type == udev) {
552 retval += compare_to_tape(bkpinfo);
553 } else if (bkpinfo->backup_media_type == cdstream) {
554 retval += compare_to_cdstream(bkpinfo);
555 } else {
556 retval += compare_to_CD(bkpinfo);
557 }
558 if (retval) {
559 mvaddstr_and_log_it(g_currentY++,
560 0,
561 _
562 ("Warning - differences found during the compare phase"));
563 }
564
565 retval += unmount_all_devices(mountlist);
566
567 if (count_lines_in_file("/tmp/changed.txt") > 0) {
568 mvaddstr_and_log_it(g_currentY++, 0,
569 _
570 ("Differences found while files were being compared."));
571 streamline_changes_file("/tmp/changed.files", "/tmp/changed.txt");
572 if (count_lines_in_file("/tmp/changed.files") <= 0) {
573 mvaddstr_and_log_it(g_currentY++, 0,
574 _
575 ("...but they were logfiles and temporary files. Your archives are fine."));
576 log_to_screen(_
577 ("The differences were logfiles and temporary files. Your archives are fine."));
578 } else {
579 q = count_lines_in_file("/tmp/changed.files");
580 mr_asprintf(&tmp, _("%ld significant difference%s found."), q,
581 (q != 1) ? "s" : "");
582 mvaddstr_and_log_it(g_currentY++, 0, tmp);
583 log_to_screen(tmp);
584 mr_free(tmp);
585
586 mr_asprintf(&tmp,
587 _("Type 'less /tmp/changed.files' for a list of non-matching files"));
588 mvaddstr_and_log_it(g_currentY++, 0, tmp);
589 log_to_screen(tmp);
590 mr_free(tmp);
591
592 log_msg(2, "calling popup_changelist_from_file()");
593 popup_changelist_from_file("/tmp/changed.files");
594 log_msg(2, "Returning from popup_changelist_from_file()");
595 }
596 } else {
597 log_to_screen
598 (_
599 ("No significant differences were found. Your backup is perfect."));
600 }
601 kill_petris();
602 return (retval);
603}
604
605/**************************************************************************
606 *END_COMPARE_MODE *
607 **************************************************************************/
608
609
610/**
611 * Compare all data on a cdstream-based backup.
612 * @param bkpinfo The backup information structure. Fields used:
613 * - @c bkpinfo->disaster_recovery
614 * - @c bkpinfo->media_device
615 * - @c bkpinfo->restore_path
616 * @return 0 for success, nonzero for failure.
617 */
618int compare_to_cdstream(struct s_bkpinfo *bkpinfo)
619{
620 int res;
621
622 char *dir = NULL;
623 char *command = NULL;
624
625 assert(bkpinfo != NULL);
626 /** needs malloc **/
627 malloc_string(dir);
628 getcwd(dir, MAX_STR_LEN);
629 chdir(bkpinfo->restore_path);
630
631 mr_asprintf(&command, "cp -f /tmp/LAST-FILELIST-NUMBER %s/tmp",
632 bkpinfo->restore_path);
633 run_program_and_log_output(command, FALSE);
634 mr_free(command);
635 mvaddstr_and_log_it(g_currentY,
636 0, _("Verifying archives against filesystem"));
637
638 if (bkpinfo->disaster_recovery
639 && does_file_exist("/tmp/CDROM-LIVES-HERE")) {
640 mr_free(bkpinfo->media_device);
641 // last_line_of_file allocates the string
642 bkpinfo->media_device = last_line_of_file("/tmp/CDROM-LIVES-HERE");
643 } else {
644 mr_free(bkpinfo->media_device);
645 // find_cdrom_device allocates the string
646 bkpinfo->media_device = find_cdrom_device(FALSE);
647 }
648 res = verify_tape_backups(bkpinfo);
649 chdir(dir);
650 if (length_of_file("/tmp/changed.txt") > 2
651 && length_of_file("/tmp/changed.files") > 2) {
652 log_msg(0,
653 "Type 'less /tmp/changed.files' to see which files don't match the archives");
654 log_msg(2, "Calling popup_changelist_from_file()");
655 popup_changelist_from_file("/tmp/changed.files");
656 log_msg(2, "Returned from popup_changelist_from_file()");
657 }
658
659 mvaddstr_and_log_it(g_currentY++, 74, _("Done."));
660 mr_free(dir);
661 return (res);
662}
663
664/**************************************************************************
665 *END_COMPARE_CD_STREAM *
666 **************************************************************************/
667
668
669/**
670 * Compare all data on a tape-based backup.
671 * @param bkpinfo The backup information structure. Field used: @c bkpinfo->restore_path.
672 * @return 0 for success, nonzero for failure.
673 */
674/**************************************************************************
675 * F@COMPARE_TO_TAPE() *
676 * compare_to_tape() - gots me?? *
677 * *
678 * returns: int *
679 **************************************************************************/
680int compare_to_tape(struct s_bkpinfo *bkpinfo)
681{
682 int res;
683 char *dir = NULL;
684 char *command = NULL;
685
686 assert(bkpinfo != NULL);
687 malloc_string(dir);
688
689 getcwd(dir, MAX_STR_LEN);
690 chdir(bkpinfo->restore_path);
691 mr_asprintf(&command, "cp -f /tmp/LAST-FILELIST-NUMBER %s/tmp",
692 bkpinfo->restore_path);
693 run_program_and_log_output(command, FALSE);
694 mr_free(command);
695
696 mvaddstr_and_log_it(g_currentY,
697 0, _("Verifying archives against filesystem"));
698 res = verify_tape_backups(bkpinfo);
699 chdir(dir);
700 if (res) {
701 mvaddstr_and_log_it(g_currentY++, 74, _("Failed."));
702 } else {
703 mvaddstr_and_log_it(g_currentY++, 74, _("Done."));
704 }
705 mr_free(dir);
706 return (res);
707}
708
709/**************************************************************************
710 *END_COMPARE_TO_TAPE *
711 **************************************************************************/
712
713/* @} - end compareGroup */
Note: See TracBrowser for help on using the repository browser.