Changeset 1747 in MondoRescue for branches/2.2.5/mondo/src
- Timestamp:
- Oct 30, 2007, 1:18:55 PM (17 years ago)
- Location:
- branches/2.2.5/mondo/src
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.5/mondo/src/common/libmondo-archive.c
r1713 r1747 4068 4068 log_msg(2, 4069 4069 "Not verifying again. Per-CD/ISO verification already carried out."); 4070 sprintf(tmp, "cat %s/changed.files > %s/changed.files 2> /dev/null",bkpinfo->tmpdir, M INDI_CACHE);4070 sprintf(tmp, "cat %s/changed.files > %s/changed.files 2> /dev/null",bkpinfo->tmpdir, MONDO_CACHE); 4071 4071 paranoid_system(tmp); 4072 4072 } else { … … 4105 4105 sprintf(tmp, 4106 4106 "grep 'afio: ' %s | sed 's/afio: //' | grep -vE '^/dev/.*$' >> %s/changed.files", 4107 MONDO_LOGFILE, M INDI_CACHE);4107 MONDO_LOGFILE, MONDO_CACHE); 4108 4108 system(tmp); 4109 4109 4110 4110 sprintf(tmp, 4111 4111 "grep 'star: ' %s | sed 's/star: //' | grep -vE '^/dev/.*$' >> %s/changed.files", 4112 MONDO_LOGFILE, M INDI_CACHE);4112 MONDO_LOGFILE, MONDO_CACHE); 4113 4113 system(tmp); 4114 4114 run_program_and_log_output("umount " MNT_CDROM, FALSE); … … 4118 4118 //} 4119 4119 } 4120 sprintf(tmp, "%s/changed.files", M INDI_CACHE);4120 sprintf(tmp, "%s/changed.files", MONDO_CACHE); 4121 4121 diffs = count_lines_in_file(tmp); 4122 4122 -
branches/2.2.5/mondo/src/common/libmondo-filelist.c
r1668 r1747 1687 1687 char *userdef_filelist) 1688 1688 { 1689 char sz_datefile_wildcard[] = "/var/cache/mondo-archive/difflevel.%d";1689 char sz_datefile_wildcard[] = MONDO_CACHE"/difflevel.%d"; 1690 1690 char *p, *q; 1691 1691 char sz_datefile[80]; … … 1753 1753 snprintf(exclude_paths, (size_t)8*MAX_STR_LEN," %s %s %s %s %s %s . .. \ 1754 1754 " MNT_CDROM " " MNT_FLOPPY " /media \ 1755 /proc /sys /root/images/mondo " MINDI_CACHE, excp, call_program_and_get_last_line_of_output("locate /win386.swp 2> /dev/null"), call_program_and_get_last_line_of_output("locate /hiberfil.sys 2> /dev/null"), call_program_and_get_last_line_of_output("locate /pagefile.sys 2> /dev/null"), (tmpdir[0] == '/' && tmpdir[1] == '/') ? (tmpdir + 1) : tmpdir, (scratchdir[0] == '/' && scratchdir[1] == '/') ? (scratchdir + 1) : scratchdir);1755 /proc /sys /root/images/mondo " MINDI_CACHE, MONDO_CACHE, excp, call_program_and_get_last_line_of_output("locate /win386.swp 2> /dev/null"), call_program_and_get_last_line_of_output("locate /hiberfil.sys 2> /dev/null"), call_program_and_get_last_line_of_output("locate /pagefile.sys 2> /dev/null"), (tmpdir[0] == '/' && tmpdir[1] == '/') ? (tmpdir + 1) : tmpdir, (scratchdir[0] == '/' && scratchdir[1] == '/') ? (scratchdir + 1) : scratchdir); 1756 1756 1757 1757 log_msg(2, "Excluding paths = '%s'", exclude_paths); -
branches/2.2.5/mondo/src/common/libmondo-files.c
r1645 r1747 1276 1276 ("Unable to find ethN (eth0, eth1, ...) adapter via NFS mount you specified."); 1277 1277 } 1278 make_hole_for_dir("/var/cache/mondo-archive");1279 1278 /******** 1280 1279 * If the NFS device that found above is a bonded device, -
branches/2.2.5/mondo/src/common/libmondo-tools.c
r1744 r1747 938 938 939 939 unlink(MONDO_TRACEFILE); 940 asprintf(&tmp,"rm -Rf %s/changed.files*",M INDI_CACHE);940 asprintf(&tmp,"rm -Rf %s/changed.files*",MONDO_CACHE); 941 941 run_program_and_log_output(tmp, FALSE); 942 942 paranoid_free(tmp); … … 1131 1131 } 1132 1132 #endif 1133 1134 Lres = free_space_on_given_partition(MINDI_CACHE);1135 log_it("Free space on partition of %s = %ld MB", MINDI_CACHE, Lres);1136 1137 if (Lres < 50) {1138 sprintf(tmp, "The partition of %s has <50MB free. Please free up space or enlarge the partition or make %s a symbolic link.", MINDI_CACHE, MINDI_CACHE);1139 fatal_error(tmp);1140 }1141 1133 1142 1134 if (system("which " MKE2FS_OR_NEWFS " > /dev/null 2> /dev/null")) { -
branches/2.2.5/mondo/src/common/libmondo-verify.c
r1711 r1747 1325 1325 if (diffs > 0) { 1326 1326 sprintf(tmp, "cp -f %s %s/changed.files", changed_files_fname, 1327 M INDI_CACHE);1327 MONDO_CACHE); 1328 1328 run_program_and_log_output(tmp, FALSE); 1329 1329 sprintf(tmp, 1330 1330 "%ld files differed from live filesystem; type less %s or less %s/changed.files to see", 1331 diffs, changed_files_fname, M INDI_CACHE);1331 diffs, changed_files_fname, MONDO_CACHE); 1332 1332 log_msg(0, tmp); 1333 log_to_screen("See "M INDI_CACHE"/changed.files for a list of nonmatching files.");1333 log_to_screen("See "MONDO_CACHE"/changed.files for a list of nonmatching files."); 1334 1334 log_to_screen("The files probably changed on filesystem, not on backup media."); 1335 1335 // retval++; -
branches/2.2.5/mondo/src/common/my-stuff.h
r1688 r1747 235 235 */ 236 236 #define MINDI_CACHE "/var/cache/mindi" 237 238 /** 239 * The location where mondo changed info are stored. 240 */ 241 #define MONDO_CACHE "/var/cache/mondo" 237 242 238 243 /** -
branches/2.2.5/mondo/src/common/newt-specific.c
r1713 r1747 433 433 434 434 printf("---FATALERROR--- %s\n", error_string); 435 sprintf(command, "gzip -9c %s > %s/MA.log.gz 2> /dev/null", MONDO_LOGFILE, M INDI_CACHE);435 sprintf(command, "gzip -9c %s > %s/MA.log.gz 2> /dev/null", MONDO_LOGFILE, MONDO_CACHE); 436 436 system(command); 437 437 printf … … 441 441 ("The list's members can help you, if you attach that file to your e-mail.\n"); 442 442 printf("Log file: %s\n", MONDO_LOGFILE); 443 if (does_file_exist(M INDI_CACHE"/MA.log.gz")) {444 printf("FYI, I have gzipped the log and saved it to "M INDI_CACHE"/MA.log.gz.\n");443 if (does_file_exist(MONDO_CACHE"/MA.log.gz")) { 444 printf("FYI, I have gzipped the log and saved it to "MONDO_CACHE"/MA.log.gz.\n"); 445 445 } 446 446 printf("Mondo has aborted.\n"); -
branches/2.2.5/mondo/src/mondoarchive/main.c
r1736 r1747 327 327 328 328 log_msg(9, "Next"); 329 make_hole_for_dir(MONDO_CACHE); 330 329 331 welcome_to_mondoarchive(); 330 332 distro_specific_kludges_at_start_of_mondoarchive(); … … 505 507 } 506 508 507 if (length_of_file(M INDI_CACHE"/changed.files") > 2) {509 if (length_of_file(MONDO_CACHE"/changed.files") > 2) { 508 510 if (g_text_mode) { 509 log_to_screen("Type 'less "M INDI_CACHE"/changed.files' to see which files don't match the archives");510 } else { 511 log_msg(1, "Type 'less "M INDI_CACHE"/changed.files' to see which files don't match the archives");511 log_to_screen("Type 'less "MONDO_CACHE"/changed.files' to see which files don't match the archives"); 512 } else { 513 log_msg(1, "Type 'less "MONDO_CACHE"/changed.files' to see which files don't match the archives"); 512 514 log_msg(2, "Calling popup_changelist_from_file()"); 513 popup_changelist_from_file(M INDI_CACHE"/changed.files");515 popup_changelist_from_file(MONDO_CACHE"/changed.files"); 514 516 log_msg(2, "Returned from popup_changelist_from_file()"); 515 517 } 516 518 } else { 517 unlink(M INDI_CACHE"/changed.files");519 unlink(MONDO_CACHE"/changed.files"); 518 520 } 519 521 log_to_screen(say_at_end); … … 528 530 run_program_and_log_output("mount", 2); 529 531 530 system("rm -f /var/cache/mondo-archive/last-backup.aborted");532 system("rm -f "MONDO_CACHE"/last-backup.aborted"); 531 533 if (!retval) { 532 534 printf("Mondoarchive ran OK.\n"); -
branches/2.2.5/mondo/src/mondorestore/mondo-restore.c
r1736 r1747 2957 2957 } 2958 2958 mkdir(MNT_CDROM, 0x770); 2959 make_hole_for_dir(MONDO_CACHE); 2959 2960 2960 2961 /* Backup original mountlist.txt */ … … 3255 3256 /* clean up at the end */ 3256 3257 if (retval) { 3257 if (does_file_exist(M INDI_CACHE"/changed.files")) {3258 if (does_file_exist(MONDO_CACHE"/changed.files")) { 3258 3259 log_to_screen 3259 ("See "M INDI_CACHE"/changed.files for list of files that have changed.");3260 ("See "MONDO_CACHE"/changed.files for list of files that have changed."); 3260 3261 } 3261 3262 mvaddstr_and_log_it(g_currentY++, -
branches/2.2.5/mondo/src/mondorestore/mondo-rstr-compare.c
r1664 r1747 207 207 log_msg(1, tmp_ptr); 208 208 if (retval) { 209 if (!(fout = fopen(M INDI_CACHE"/changed.txt", "a"))) {209 if (!(fout = fopen(MONDO_CACHE"/changed.txt", "a"))) { 210 210 fatal_error("Cannot openout changed.txt"); 211 211 } … … 384 384 if (length_of_file(logfile) > 5) { 385 385 sprintf(command, 386 "sed s/': \\\"'/\\|/ %s | sed s/'\\\": '/\\|/ | cut -d'|' -f2 | sort -u | grep -vE \"^dev/.*\" >> "M INDI_CACHE"/changed.txt",386 "sed s/': \\\"'/\\|/ %s | sed s/'\\\": '/\\|/ | cut -d'|' -f2 | sort -u | grep -vE \"^dev/.*\" >> "MONDO_CACHE"/changed.txt", 387 387 logfile); 388 388 system(command); … … 545 545 getcwd(new, MAX_STR_LEN - 1); 546 546 insist_on_this_cd_number(g_current_media_number); 547 unlink(M INDI_CACHE"/changed.txt");547 unlink(MONDO_CACHE"/changed.txt"); 548 548 549 549 resA = compare_all_tarballs(); 550 550 resB = compare_all_biggiefiles(); 551 551 chdir(cwd); 552 noof_changed_files = count_lines_in_file(M INDI_CACHE"/changed.txt");552 noof_changed_files = count_lines_in_file(MONDO_CACHE"/changed.txt"); 553 553 if (noof_changed_files) { 554 554 sprintf(tmp, "%ld files do not match the backup ", … … 556 556 // mvaddstr_and_log_it( g_currentY++, 0, tmp ); 557 557 log_to_screen(tmp); 558 sprintf(command, "cat "M INDI_CACHE"/changed.txt >> %s", MONDO_LOGFILE);558 sprintf(command, "cat "MONDO_CACHE"/changed.txt >> %s", MONDO_LOGFILE); 559 559 paranoid_system(command); 560 560 } else { … … 662 662 } 663 663 664 if (count_lines_in_file(M INDI_CACHE"/changed.txt") > 0) {664 if (count_lines_in_file(MONDO_CACHE"/changed.txt") > 0) { 665 665 mvaddstr_and_log_it(g_currentY++, 0, 666 666 "Differences found while files were being compared."); 667 streamline_changes_file(M INDI_CACHE"/changed.files", MINDI_CACHE"/changed.txt");668 if (count_lines_in_file(M INDI_CACHE"/changed.files") <= 0) {667 streamline_changes_file(MONDO_CACHE"/changed.files", MONDO_CACHE"/changed.txt"); 668 if (count_lines_in_file(MONDO_CACHE"/changed.files") <= 0) { 669 669 mvaddstr_and_log_it(g_currentY++, 0, 670 670 "...but they were logfiles and temporary files. Your archives are fine."); … … 672 672 ("The differences were logfiles and temporary files. Your archives are fine."); 673 673 } else { 674 q = count_lines_in_file(M INDI_CACHE"/changed.files");674 q = count_lines_in_file(MONDO_CACHE"/changed.files"); 675 675 sprintf(tmp, "%ld significant difference%s found.", q, 676 676 (q != 1) ? "s" : ""); … … 687 687 chdir(bkpinfo->restore_path); 688 688 getcwd(new, MAX_STR_LEN - 1); 689 popup_changelist_from_file(M INDI_CACHE"/changed.files");689 popup_changelist_from_file(MONDO_CACHE"/changed.files"); 690 690 chdir(cwd); 691 691 log_msg(2, "Returning from popup_changelist_from_file()"); … … 744 744 res = verify_tape_backups(); 745 745 chdir(dir); 746 if (length_of_file(M INDI_CACHE"/changed.txt") > 2747 && length_of_file(M INDI_CACHE"/changed.files") > 2) {746 if (length_of_file(MONDO_CACHE"/changed.txt") > 2 747 && length_of_file(MONDO_CACHE"/changed.files") > 2) { 748 748 log_msg(0, 749 "Type 'less "M INDI_CACHE"/changed.files' to see which files don't match the archives");749 "Type 'less "MONDO_CACHE"/changed.files' to see which files don't match the archives"); 750 750 log_msg(2, "Calling popup_changelist_from_file()"); 751 popup_changelist_from_file(M INDI_CACHE"/changed.files");751 popup_changelist_from_file(MONDO_CACHE"/changed.files"); 752 752 log_msg(2, "Returned from popup_changelist_from_file()"); 753 753 }
Note:
See TracChangeset
for help on using the changeset viewer.