Changeset 998 in MondoRescue


Ignore:
Timestamp:
Dec 7, 2006, 2:01:34 AM (17 years ago)
Author:
Bruno Cornec
Message:

Attempt to solve #113

Location:
branches/stable
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/mindi/mindi

    r997 r998  
    10641064    [ "$INTERNAL_TAPE_BLOCK_SIZE" ] && echo "internal-tape-block-size $INTERNAL_TAPE_BLOCK_SIZE" >> $outfile
    10651065    use_lzo=$USE_LZO; [ "$use_lzo" = "" ] && use_lzo="no"
     1066    use_gzip=$USE_GZIP; [ "$use_gzip" = "" ] && use_gzip="no"
    10661067    use_comp=$USE_COMP; [ "$use_comp" = "" ] && use_comp="yes"
    10671068    use_star=$USE_STAR; [ "$use_star" = "" ] && use_star="no"
    10681069    echo "use-lzo $use_lzo" >> $outfile
     1070    echo "use-gzip $use_gzip" >> $outfile
    10691071    echo "use-star $use_star" >> $outfile
    10701072    echo "use-comp $use_comp" >> $outfile
     
    26322634        echo -en "$LAST_FILELIST_NUMBER" > $mountpoint/tmp/LAST-FILELIST-NUMBER
    26332635        [ "$USE_LZO" = "yes" ] && echo -en "Pras 4 Pres 2004" >> $mountpoint/tmp/USING-LZO
     2636        [ "$USE_GZIP" = "yes" ] && echo -en "YES" >> $mountpoint/tmp/USING-GZIP
    26342637        [ "$USE_COMP" = "yes" ] && echo -en "Compression, yep" >> $mountpoint/tmp/USING-COMP
    26352638        [ "$USE_STAR" = "yes" ] && echo -en "Using star. Hooray." >> $mountpoint/tmp/USING-STAR
     
    28542857        INTERNAL_TAPE_BLOCK_SIZE="${18}"
    28552858        DIFFERENTIAL="${19}"
    2856         NOT_BOOT="${20}"
     2859        USE_GZIP="${20}"
     2860        NOT_BOOT="${21}"
    28572861        [ "$USE_COMP" = "" ] && USE_COMP=yes
     2862        [ "$USE_GZIP" = "" ] && USE_GZIP=no
    28582863        [ "$NOT_BOOT" = "" ] && NOT_BOOT=no
    28592864        [ "$TAPEDEV" ] && LogIt "This is a tape-based backup. Fine."
  • branches/stable/mindi/rootfs/README

    r294 r998  
     1# $Id$
     2#
    13README              MINDI LINUX / MONDO RESCUE            February 7th, 2002
    24
     
    2426accordingly.
    2527
    26 Before you e-mail me, please read the FAQ, the manual, the log and preferably
     28Before you e-mail us, please read the FAQ, the manual, the log and preferably
    2729the mailing list.
    2830
    29                                            - Hugo Rabson <hugo@firstlinux.net>
     31                                           - Dev Team
    3032
    3133
  • branches/stable/mondo-doc/mondoarchive.8

    r954 r998  
    256256
    257257.TP
     258.BI "-G "
     259Use gzip, the standard and quicker Linux compression engine, instead of bzip2.
     260
     261.TP
    258262.BI "-R "
    259263EXPERIMENTAL. Do not use in mission-critical environments. Star is an alternative to afio. Mondo now supports POSIX ACLs and extended attributes, so -R is essentially redundant for now.
  • branches/stable/mondo/src/common/libmondo-archive.c

    r949 r998  
    697697    char *command;
    698698    char *use_lzo_sz;
     699    char *use_gzip_sz;
    699700    char *use_comp_sz;
    700701    char *use_star_sz;
     
    727728    malloc_string(scratchdir);
    728729    malloc_string(use_lzo_sz);
     730    malloc_string(use_gzip_sz);
    729731    malloc_string(use_star_sz);
    730732    malloc_string(use_comp_sz);
     
    771773    } else {
    772774        strcpy(use_lzo_sz, "no");
     775    }
     776    if (bkpinfo->use_gzip) {
     777        strcpy(use_gzip_sz, "yes");
     778    } else {
     779        strcpy(use_gzip_sz, "no");
    773780    }
    774781    if (bkpinfo->use_star) {
     
    10031010            "mindi --custom %s %s/images '%s' '%s' \
    10041011'%s' %ld '%s' '%s' '%s' \
    1005 '%s' %s %ld '%s' '%s' '%s' '%s' %ld %d", bkpinfo->tmpdir,   // parameter #2
     1012'%s' %s %ld '%s' '%s' '%s' '%s' %ld %d '%s'", bkpinfo->tmpdir,  // parameter #2
    10061013            bkpinfo->scratchdir,    // parameter #3
    10071014            bkpinfo->kernel_path,   // parameter #4
     
    10201027            use_star_sz,        // parameter #17
    10211028            bkpinfo->internal_tape_block_size,  // parameter #18 (LONG)
    1022             bkpinfo->differential); // parameter #19 (INT)
     1029            bkpinfo->differential,  // parameter #19 (INT)
     1030            use_gzip_sz);       // parameter #20 (STRING)
    10231031
    10241032// Watch it! This next line adds a parameter...
     
    10751083    paranoid_free(tmp);
    10761084    paranoid_free(use_lzo_sz);
     1085    paranoid_free(use_gzip_sz);
    10771086    paranoid_free(scratchdir);
    10781087    paranoid_free(use_comp_sz);
  • branches/stable/mondo/src/common/libmondo-files.c

    r888 r998  
    13581358    if (bkpinfo->use_lzo) {
    13591359        scratchLL = (scratchLL * 2) / 3;
     1360    else if (bkpinfo->use_gzip) {
     1361        scratchLL = (scratchLL * 2) / 3;
    13601362    } else {
    13611363        scratchLL = scratchLL / 2;
  • branches/stable/mondo/src/common/libmondo-tools.c

    r911 r998  
    649649        strcpy(bkpinfo->zip_exe, "lzop");
    650650        strcpy(bkpinfo->zip_suffix, "lzo");
     651    } else if (bkpinfo->use_gzip) {
     652        strcpy(bkpinfo->zip_exe, "gzip");
     653        strcpy(bkpinfo->zip_suffix, "gz");
    651654    } else if (bkpinfo->compression_level != 0) {
    652655        strcpy(bkpinfo->zip_exe, "bzip2");
     
    967970    bkpinfo->restore_path[0] = '\0';
    968971    bkpinfo->use_lzo = FALSE;
     972    bkpinfo->use_gzip = FALSE;
    969973    bkpinfo->do_not_compress_these[0] = '\0';
    970974    bkpinfo->verify_data = FALSE;
     
    11221126    }
    11231127    retval += whine_if_not_found("bzip2");
     1128    retval += whine_if_not_found("gzip");
    11241129    retval += whine_if_not_found("awk");
    11251130    retval += whine_if_not_found("md5sum");
  • branches/stable/mondo/src/common/libmondo-verify.c

    r948 r998  
    337337        if (bkpinfo->use_lzo) {
    338338            strcpy(sz_exe, "lzop");
     339        else if (bkpinfo->use_gzip) {
     340            strcpy(sz_exe, "gzip");
    339341        } else {
    340342            strcpy(sz_exe, "bzip2");
     
    519521        strcpy(bkpinfo->zip_suffix, "lzo");
    520522        bkpinfo->use_lzo = TRUE;
     523        bkpinfo->use_gzip = FALSE;
     524    }
     525    if (strstr(tarball_fname, ".gz")
     526        && strcmp(bkpinfo->zip_suffix, "gz")) {
     527        log_msg(2, "OK, I'm going to start using gzip.");
     528        strcpy(bkpinfo->zip_exe, "gzip");
     529        strcpy(bkpinfo->zip_suffix, "gz");
     530        bkpinfo->use_lzo = FALSE;
     531        bkpinfo->use_gzip = TRUE;
    521532    }
    522533    if (strstr(tarball_fname, ".bz2")
     
    526537        strcpy(bkpinfo->zip_suffix, "bz2");
    527538        bkpinfo->use_lzo = FALSE;
     539        bkpinfo->use_gzip = FALSE;
    528540    }
    529541    unlink(outlog);
  • branches/stable/mondo/src/common/mondostructures.h

    r558 r998  
    398398   */
    399399    bool use_lzo;
     400
     401  /**
     402   * If TRUE, then use @c gzip to compress data.
     403   * This is used mainly in estimates. The backup/restore may or may
     404   * not work if you do not set this. You should also set @p zip_exe
     405   * and @p zip_suffix.
     406   */
     407    bool use_gzip;
    400408
    401409  /**
  • branches/stable/mondo/src/mondoarchive/mondo-cli.c

    r949 r998  
    926926            log_to_screen
    927927                ("Please install LZOP. You can't use '-L' until you do.\n");
     928        }
     929    }
     930
     931    if (flag_set['G']) {
     932        bkpinfo->use_gzip = TRUE;
     933        if (run_program_and_log_output("which gzip", FALSE)) {
     934            retval++;
     935            log_to_screen
     936                ("Please install gzip. You can't use '-G' until you do.\n");
    928937        }
    929938    }
  • branches/stable/mondo/src/mondorestore/mondo-restore.c

    r952 r998  
    15721572                    if (does_file_exist
    15731573                        (slice_fname
     1574                         (bigfileno, sliceno, ARCHIVES_PATH, "gz"))) {
     1575                    strcpy(bzip2_command, "gzip");
     1576                    strcpy(suffix, "gz");
     1577                } else
     1578                    if (does_file_exist
     1579                        (slice_fname
    15741580                         (bigfileno, sliceno, ARCHIVES_PATH, "bz2"))) {
    15751581                    strcpy(bzip2_command, "bzip2");
     
    20372043        if (strstr(tarball_fname, ".bz2")) {
    20382044            strcpy(executable, "bzip2");
     2045        } else if (strstr(tarball_fname, ".gz")) {
     2046            strcpy(executable, "gzip");
    20392047        } else if (strstr(tarball_fname, ".lzo")) {
    20402048            strcpy(executable, "lzop");
  • branches/stable/mondo/src/mondorestore/mondo-rstr-compare.c

    r541 r998  
    317317    if (strstr(tarball_fname, ".bz2")) {
    318318        strcpy(compressor_exe, "bzip2");
     319    } else if (strstr(tarball_fname, ".gz")) {
     320        strcpy(compressor_exe, "gzip");
    319321    } else if (strstr(tarball_fname, ".lzo")) {
    320322        strcpy(compressor_exe, "lzop");
  • branches/stable/mondo/src/mondorestore/mondo-rstr-tools.c

    r951 r998  
    11361136    if (strstr(value, "yes")) {
    11371137        bkpinfo->use_lzo = TRUE;
     1138        bkpinfo->use_gzip = FALSE;
    11381139        strcpy(bkpinfo->zip_exe, "lzop");
    11391140        strcpy(bkpinfo->zip_suffix, "lzo");
    11401141    } else {
    1141         read_cfg_var(cfg_file, "use-comp", value);
     1142        read_cfg_var(cfg_file, "use-gzip", value);
    11421143        if (strstr(value, "yes")) {
    11431144            bkpinfo->use_lzo = FALSE;
    1144             strcpy(bkpinfo->zip_exe, "bzip2");
    1145             strcpy(bkpinfo->zip_suffix, "bz2");
     1145            bkpinfo->use_gzip = TRUE;
     1146            strcpy(bkpinfo->zip_exe, "gzip");
     1147            strcpy(bkpinfo->zip_suffix, "gz");
    11461148        } else {
    1147             bkpinfo->zip_exe[0] = bkpinfo->zip_suffix[0] = '\0';
     1149            read_cfg_var(cfg_file, "use-comp", value);
     1150            if (strstr(value, "yes")) {
     1151                bkpinfo->use_lzo = FALSE;
     1152                bkpinfo->use_gzip = FALSE;
     1153                strcpy(bkpinfo->zip_exe, "bzip2");
     1154                strcpy(bkpinfo->zip_suffix, "bz2");
     1155            } else {
     1156                bkpinfo->zip_exe[0] = bkpinfo->zip_suffix[0] = '\0';
     1157            }
    11481158        }
    11491159    }
  • branches/stable/mondo/src/restore-scripts/mondo/restore-bigfiles-from-iso

    r567 r998  
    6363            if echo "$slicename" | grep "bz2" > /dev/null ; then
    6464                bzip2 -dc $slicename >> "$OUTFNAME" || Die "Failed to decompress slice $slicename"
     65            elif echo "$slicename" | grep "gz" > /dev/null ; then
     66                gzip -dc $slicename >> "$OUTFNAME" || Die "Failed to decompress slice $slicename"
    6567            elif echo "$slicename" | grep "lzo" > /dev/null ; then
    6668                lzop -dc $slicename >> "$OUTFNAME" || Die "Failed to decompress slice $slicename"
Note: See TracChangeset for help on using the changeset viewer.