Changeset 1770 in MondoRescue for branches/stable/mondo/src/common/libmondo-archive.c
- Timestamp:
- Nov 6, 2007, 11:01:53 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/mondo/src/common/libmondo-archive.c
r1769 r1770 929 929 bkpinfo->tmpdir, bkpinfo->scratchdir); 930 930 if (system(command)) { 931 fatal_error("Unable to create temporary dufftarball");931 fatal_error("Unable to create temporary all tarball"); 932 932 } 933 933 mr_free(command); … … 936 936 /* BERLIOS: Not executed ? 937 937 sprintf(command, "cp -f %s/mindi-*oot*.img %s/images", 938 */ 939 /* For USB we already have everything on the key */ 940 if (bkpinfo->backup_media_type == usb) { 941 mr_asprintf(&command, "rm -rf %s/images", bkpinfo->scratchdir); 942 run_program_and_log_output(command, FALSE); 943 mr_free(command); 944 } else { 945 mr_asprintf(&command, "cp -f %s/mindi-*oot*.img %s/images", 938 946 bkpinfo->tmpdir, bkpinfo->scratchdir); 939 */ 940 mr_asprintf(&tmp, "cp -f %s/images/all.tar.gz %s", 947 if (system(command)) { 948 mr_msg(2, "Unable to copy mindi images"); 949 } 950 mr_free(command); 951 952 mr_asprintf(&tmp, "cp -f %s/images/all.tar.gz %s", 941 953 bkpinfo->scratchdir, bkpinfo->tmpdir); 942 if (system(tmp)) { 943 fatal_error("Cannot find all.tar.gz in tmpdir"); 944 } 945 mr_free(tmp); 954 if (system(tmp)) { 955 fatal_error("Cannot find all.tar.gz in tmpdir"); 956 mr_free(tmp); 957 } 958 } 946 959 947 960 if (res) { … … 1162 1175 "Writing any remaining data to media "); 1163 1176 1164 mr_msg(1, "Closing tape/CD ... ");1177 mr_msg(1, "Closing tape/CD/USB ... "); 1165 1178 if (IS_THIS_A_STREAMING_BACKUP(bkpinfo->backup_media_type)) { 1166 1179 /* write tape/cdstream */ … … 1249 1262 write_data_disks_to_stream(data_disks_file); 1250 1263 } else { 1251 mr_msg(1, "Backing up to CD's"); 1264 if (bkpinfo->backup_media_type == usb) { 1265 mr_msg(1, "Backing up to USB's"); 1266 } else { 1267 mr_msg(1, "Backing up to CD's"); 1268 } 1252 1269 } 1253 1270 mr_free(data_disks_file); … … 1574 1591 log_msg(1, message_to_screen); 1575 1592 1576 if (is_this_device_mounted(bkpinfo->media_device)) { 1593 asprintf(&tmp1, "%s1", bkpinfo->media_device); 1594 if (is_this_device_mounted(tmp1)) { 1577 1595 log_msg(1, "USB device mounted. Remounting it at the right place"); 1578 asprintf(&tmp, "umount %s", bkpinfo->media_device);1596 asprintf(&tmp, "umount %s", tmp1); 1579 1597 run_program_and_log_output(tmp, FALSE); 1580 1598 paranoid_free(tmp); 1581 1599 } 1600 paranoid_free(tmp); 1601 1582 1602 log_msg(1, "Mounting USB device."); 1583 1603 asprintf(&tmp1, "%s/usb", bkpinfo->tmpdir); … … 1596 1616 1597 1617 /* Command to execute */ 1598 asprintf(&tmp,"mv %s/ .??* %s/* %s", bkpinfo->scratchdir, bkpinfo->scratchdir, tmp1);1618 asprintf(&tmp,"mv %s/* %s", bkpinfo->scratchdir, tmp1); 1599 1619 res = eval_call_to_make_USB(tmp, message_to_screen); 1600 1620 if (res) { … … 3262 3282 media_descriptor_string(g_backup_media_type)); 3263 3283 chdir("/"); 3264 iamhere("Before calling verify_cd_image()"); 3265 res += verify_cd_image(); 3266 iamhere("After calling verify_cd_image()"); 3284 iamhere("Before calling verification of image()"); 3285 if (bkpinfo->backup_media_type == usb) { 3286 res += verify_usb_image(); 3287 } else { 3288 res += verify_cd_image(); 3289 } 3290 iamhere("After calling verification of image()"); 3267 3291 } 3268 3292 if (!res) { … … 3299 3323 3300 3324 if (last_cd) { 3301 mr_msg(2, "This was your last CD.");3325 mr_msg(2, "This was your last media."); 3302 3326 } else { 3303 3327 mr_msg(2, "Continuing to backup your data..."); … … 3340 3364 mr_msg(2, 3341 3365 "Not verifying again. Per-CD/ISO verification already carried out."); 3342 sprintf(tmp, "cat %s/changed.files > %s/changed.files 2> /dev/null",bkpinfo->tmpdir, M INDI_CACHE);3366 sprintf(tmp, "cat %s/changed.files > %s/changed.files 2> /dev/null",bkpinfo->tmpdir, MONDO_CACHE); 3343 3367 paranoid_system(tmp); 3344 3368 } else { … … 3369 3393 mr_asprintf(&tmp, 3370 3394 "grep 'afio: ' %s | sed 's/afio: //' | grep -vE '^/dev/.*$' >> %s/changed.files", 3371 MONDO_LOGFILE, M INDI_CACHE);3395 MONDO_LOGFILE, MONDO_CACHE); 3372 3396 system(tmp); 3373 3397 mr_free(tmp); … … 3375 3399 mr_asprintf(&tmp, 3376 3400 "grep 'star: ' %s | sed 's/star: //' | grep -vE '^/dev/.*$' >> %s/changed.files", 3377 MONDO_LOGFILE, M INDI_CACHE);3401 MONDO_LOGFILE, MONDO_CACHE); 3378 3402 system(tmp); 3379 3403 mr_free(tmp); … … 3382 3406 eject_device(bkpinfo->media_device); 3383 3407 } 3384 sprintf(tmp, "%s/changed.files", M INDI_CACHE);3408 sprintf(tmp, "%s/changed.files", MONDO_CACHE); 3385 3409 diffs = count_lines_in_file(tmp); 3386 3410
Note:
See TracChangeset
for help on using the changeset viewer.