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

Last change on this file since 783 was 783, checked in by Bruno Cornec, 18 years ago
  • Massive rewrite continues for memory management.
  • main structure should now have all parameters allocated dynamically
  • new lib libmr.a + dir + build process reviewed to support it.
  • new include subdir to host external definitions of the new lib
  • code now compiles. Still one remaining link issues for mondorestore. This should allow for some tests soon.

(goal is to separate completely reviewed code and functions and provide clean interfaces)

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