mondo  3.3.0
About: Mondo (like Mindi part of MondoRescue, a disaster recovery suite for Linux/FreeBSD) is responsible for carrying out the actual backups and and restores
  Fossies Dox: mondo-3.3.0.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

s_bkpinfo Struct Reference

The backup information structure. More...

#include <mondostructures.h>

Data Fields

char media_device [MAX_STR_LEN/4]
 The device we're backing up to. More...
 
long media_size
 A field containing the sizes of the media in our backup set, in MB. More...
 
char boot_loader
 The boot loader that is installed. More...
 
char * boot_device
 The boot device on which boot_loader is installed. More...
 
char zip_exe [MAX_STR_LEN/4]
 The compression program to use. More...
 
char zip_suffix [MAX_STR_LEN/4]
 The extension your compression program uses. More...
 
char image_devs [MAX_STR_LEN/4]
 Devices to back up as biggiefiles. More...
 
int compression_level
 The compression level (1-9) to use. More...
 
bool use_lzo
 If TRUE, then use lzop to compress data. More...
 
bool use_gzip
 If TRUE, then use gzip to compress data. More...
 
bool use_lzma
 If TRUE, then use lzma to compress data. More...
 
bool verify_data
 If TRUE, then we should verify a backup. More...
 
bool backup_data
 If TRUE, then we should back up some data. More...
 
bool restore_data
 If TRUE, then we should restore some data. More...
 
bool use_star
 If TRUE, then we should backup/restore using star, not afio. More...
 
long internal_tape_block_size
 Size of internal block reads/writes. More...
 
bool disaster_recovery
 If TRUE, we're making a CD that will autonuke without confirmation when booted. More...
 
char isodir [MAX_STR_LEN/4]
 The directory we're backing up to. More...
 
char prefix [MAX_STR_LEN/4]
 The prefix to put in front of media number If backup_media_type is iso, then this is the prefix for the filename If backup_media_type is anything else, this is ignored. More...
 
char scratchdir [MAX_STR_LEN/4]
 The scratch directory to use. More...
 
char tmpdir [MAX_STR_LEN/4]
 The temp directory to use. More...
 
long optimal_set_size
 The optimal size for each fileset. More...
 
t_bkptype backup_media_type
 The type of media we're backing up to. More...
 
bool make_filelist
 Whether we should use a premade filelist or generate our own. More...
 
char * include_paths
 Directories to back up, or (if !make_filelist) the filelist to use. More...
 
char * exclude_paths
 Directories to NOT back up. More...
 
char * exclude_devs
 Devices to NOT back up. More...
 
char restore_path [MAX_STR_LEN]
 The path to restore files relative to during a restore. More...
 
char call_before_iso [MAX_STR_LEN]
 A command to call BEFORE making an ISO image. More...
 
char call_make_iso [MAX_STR_LEN]
 A command to call to make an ISO image. More...
 
char call_burn_iso [MAX_STR_LEN]
 A command to call to burn the ISO image. More...
 
char call_after_iso [MAX_STR_LEN]
 A command to call AFTER making an ISO image. More...
 
char kernel_path [MAX_STR_LEN]
 Path to the user's kernel. More...
 
char * netfs_mount
 The NETFS mount to back up to/restore from. More...
 
char * netfs_remote_dir
 The directory, relative to the root of netfs_mount, to put the backups in. More...
 
char * netfs_user
 The potential user to use for NETFS backup. More...
 
char * subdir
 The potential subdirectory under which are located ISO images on HDD (restore mode only) More...
 
char * netfs_proto
 The protocol to use for Network backup (NFS, SSHFS, ...) More...
 
char postnuke_tarball [MAX_STR_LEN]
 A tarball containing a program called "usr/bin/post-nuke" that will be run after nuking the system. More...
 
bool wipe_media_first
 If TRUE, then pass cdrecord the argument "blank=fast" to wipe the CDs before writing to them. More...
 
int differential
 The differential level of this backup. More...
 
bool please_dont_eject
 If TRUE, then don't eject media when backing up or restoring. More...
 
int cdrw_speed
 The speed of the CD-R[W] drive. More...
 
bool manual_cd_tray
 If TRUE, then cdrecord will be passed some flags to help compensate for PCs with eccentric CD-ROM drives. More...
 
bool nonbootable_backup
 If TRUE, do not make the first CD bootable. More...
 
bool make_cd_use_lilo
 If TRUE, make the bootable CD use LILO/ELILO. More...
 
bool use_obdr
 If TRUE, make the the tape bootable. More...
 
t_restore_mode restore_mode
 Nature of the restore. More...
 
t_boot boot_type
 The type of boot of our ssytem. More...
 

Detailed Description

The backup information structure.

This is the central structure to all the activity going on inside Mondo. It is passed to almost every function that is not just a helper, even those which only use one variable of it, because it is useful keeping all the information together in one place. The usage of particular fields in the bkpinfo is marked in function documentation, but it is best to fill out as many fields as apply, because that function may in turn pass the bkpinfo to other functions which use other fields.

To fill out the bkpinfo first call reset_bkpinfo() and pre_param_configuration(). Then set the backup-specific parameters (see mondo/mondoarchive/mondo-cli.c->process_switches for an example). After that, you should call post_param_configuration() to set some final parameters based on those you have already set. Failure to do the last step will result in extremely strange and hard-to-track errors in chop_filelist(), since optimal_set_size is 0.

Definition at line 338 of file mondostructures.h.

Field Documentation

◆ backup_data

bool s_bkpinfo::backup_data

If TRUE, then we should back up some data.

Definition at line 439 of file mondostructures.h.

Referenced by interactively_obtain_media_parameters_from_user(), main(), process_switches(), reset_bkpinfo(), and verify_data().

◆ backup_media_type

◆ boot_device

char* s_bkpinfo::boot_device

The boot device on which boot_loader is installed.

This is a bit difficult to autodetect; you may want to take truncate_to_drive_name() of where_is_root_mounted().

Definition at line 372 of file mondostructures.h.

Referenced by call_mindi_to_supply_boot_disks(), interactively_obtain_media_parameters_from_user(), process_switches(), and reset_bkpinfo().

◆ boot_loader

char s_bkpinfo::boot_loader

The boot loader that is installed.

Available choices are:

  • 'G' for GRUB
  • 'L' for LILO
  • 'E' for ELILO
  • (FreeBSD only) 'B' for boot0
  • (FreeBSD only) 'D' for dangerously dedicated
  • 'R' for Raw
  • 'U' for Unknown or None

The function which_boot_loader() can help you set this.

Definition at line 365 of file mondostructures.h.

Referenced by call_mindi_to_supply_boot_disks(), interactively_obtain_media_parameters_from_user(), process_switches(), and reset_bkpinfo().

◆ boot_type

◆ call_after_iso

char s_bkpinfo::call_after_iso[MAX_STR_LEN]

A command to call AFTER making an ISO image.

Definition at line 557 of file mondostructures.h.

Referenced by make_iso_fs(), process_switches(), and reset_bkpinfo().

◆ call_before_iso

char s_bkpinfo::call_before_iso[MAX_STR_LEN]

A command to call BEFORE making an ISO image.

Definition at line 542 of file mondostructures.h.

Referenced by make_iso_fs(), post_param_configuration(), process_switches(), and reset_bkpinfo().

◆ call_burn_iso

char s_bkpinfo::call_burn_iso[MAX_STR_LEN]

A command to call to burn the ISO image.

Definition at line 552 of file mondostructures.h.

Referenced by make_iso_fs(), and reset_bkpinfo().

◆ call_make_iso

char s_bkpinfo::call_make_iso[MAX_STR_LEN]

A command to call to make an ISO image.

Definition at line 547 of file mondostructures.h.

Referenced by make_iso_fs(), post_param_configuration(), and reset_bkpinfo().

◆ cdrw_speed

◆ compression_level

◆ differential

int s_bkpinfo::differential

The differential level of this backup.

Currently only 0 (full backup) and 1 (files changed since last full backup) are supported.

Definition at line 610 of file mondostructures.h.

Referenced by call_mindi_to_supply_boot_disks(), interactive_mode(), nuke_mode(), prepare_filelist(), process_switches(), read_cfg_file_into_bkpinfo(), and reset_bkpinfo().

◆ disaster_recovery

bool s_bkpinfo::disaster_recovery

◆ exclude_devs

char* s_bkpinfo::exclude_devs

Devices to NOT back up.

Multiple devices should be separated by spaces.

Definition at line 530 of file mondostructures.h.

Referenced by call_mindi_to_supply_boot_disks(), finish(), mr_make_devlist_from_pathlist(), and reset_bkpinfo().

◆ exclude_paths

char* s_bkpinfo::exclude_paths

Directories to NOT back up.

Ignored if make_filelist == FALSE. Multiple directories should be separated by spaces. /tmp, /proc, the scratchdir, and the tempdir are automatically excluded.

Definition at line 524 of file mondostructures.h.

Referenced by finish(), interactively_obtain_media_parameters_from_user(), mr_make_devlist_from_pathlist(), prepare_filelist(), process_switches(), and reset_bkpinfo().

◆ image_devs

char s_bkpinfo::image_devs[MAX_STR_LEN/4]

Devices to back up as biggiefiles.

This is useful for backing up NTFS partitions. ntfsclone is used to back up only the used sectors, so the space tradeoff is not bad. However, several caveats apply to such a partition:

  • It must not be mounted during the backup
  • It must be in a format that ntfsclone knows how to handle, i.e. NTFS
  • It cannot be verified during the verify or compare phase
  • It may not be resized or selectively restored at restore-time (all or nothing)

This is a useful feature, but use at your own risk.

Definition at line 400 of file mondostructures.h.

Referenced by call_filelist_chopper(), call_mindi_to_supply_boot_disks(), interactively_obtain_media_parameters_from_user(), process_switches(), and reset_bkpinfo().

◆ include_paths

char* s_bkpinfo::include_paths

Directories to back up, or (if !make_filelist) the filelist to use.

In the former case, multiple directories should be separated by spaces. If you do nothing, "/" will be used.

Definition at line 517 of file mondostructures.h.

Referenced by finish(), interactively_obtain_media_parameters_from_user(), mr_make_devlist_from_pathlist(), post_param_configuration(), prepare_filelist(), process_switches(), and reset_bkpinfo().

◆ internal_tape_block_size

◆ isodir

char s_bkpinfo::isodir[MAX_STR_LEN/4]

The directory we're backing up to.

If backup_media_type is iso, then this is that directory. If backup_media_type is netfs, then this is the directory where the share is mounted. If backup_media_type is anything else, this is ignored.

Definition at line 469 of file mondostructures.h.

Referenced by catchall_mode(), do_that_initial_phase(), get_isodir_info(), interactively_obtain_media_parameters_from_user(), iso_fiddly_bits(), main(), mount_media(), post_param_configuration(), process_filelist_and_biggielist(), process_switches(), read_cfg_file_into_bkpinfo(), reset_bkpinfo(), restore_to_live_filesystem(), verify_cd_image(), and write_iso_and_go_on().

◆ kernel_path

char s_bkpinfo::kernel_path[MAX_STR_LEN]

◆ make_cd_use_lilo

bool s_bkpinfo::make_cd_use_lilo

If TRUE, make the bootable CD use LILO/ELILO.

If FALSE, use isolinux (the default).

Definition at line 639 of file mondostructures.h.

Referenced by call_mindi_to_supply_boot_disks(), interactively_obtain_media_parameters_from_user(), make_iso_fs(), post_param_configuration(), process_switches(), and reset_bkpinfo().

◆ make_filelist

bool s_bkpinfo::make_filelist

Whether we should use a premade filelist or generate our own.

If TRUE, then we generate our own filelist from the directories in include_paths. If FALSE, then we use the filelist whose name is specified in include_paths.

Definition at line 510 of file mondostructures.h.

Referenced by prepare_filelist(), process_switches(), and reset_bkpinfo().

◆ manual_cd_tray

bool s_bkpinfo::manual_cd_tray

If TRUE, then cdrecord will be passed some flags to help compensate for PCs with eccentric CD-ROM drives.

If it has BurnProof technology, or is in a laptop, it probably falls into this category.

Definition at line 628 of file mondostructures.h.

Referenced by eval_call_to_make_ISO(), interactively_obtain_media_parameters_from_user(), make_iso_fs(), post_param_configuration(), process_switches(), reset_bkpinfo(), verify_cd_image(), and write_iso_and_go_on().

◆ media_device

◆ media_size

◆ netfs_mount

char* s_bkpinfo::netfs_mount

The NETFS mount to back up to/restore from.

If backup_media_type is not netfs, this is ignored. It must contain a colon, and the server's address should be in dotted-decimal IP address form. (Domain names will be resolved in post_param_configuration().)

Definition at line 570 of file mondostructures.h.

Referenced by interactively_obtain_media_parameters_from_user(), main(), post_param_configuration(), process_switches(), read_cfg_file_into_bkpinfo(), and reset_bkpinfo().

◆ netfs_proto

char* s_bkpinfo::netfs_proto

◆ netfs_remote_dir

char* s_bkpinfo::netfs_remote_dir

◆ netfs_user

char* s_bkpinfo::netfs_user

◆ nonbootable_backup

bool s_bkpinfo::nonbootable_backup

If TRUE, do not make the first CD bootable.

This is dangerous but it saves a minute or so. It is useful in testing. Use with care.

Definition at line 634 of file mondostructures.h.

Referenced by call_mindi_to_supply_boot_disks(), interactively_obtain_media_parameters_from_user(), make_iso_fs(), make_usb_fs(), post_param_configuration(), process_switches(), and reset_bkpinfo().

◆ optimal_set_size

long s_bkpinfo::optimal_set_size

The optimal size for each fileset.

This is set automatically in post_param_configuration() based on your backup_media_type; you needn't set it yourself.

Definition at line 498 of file mondostructures.h.

Referenced by call_filelist_chopper(), call_mindi_to_supply_boot_disks(), estimate_noof_media_required(), make_slices_and_images(), post_param_configuration(), reset_bkpinfo(), and slice_up_file_etc().

◆ please_dont_eject

◆ postnuke_tarball

char s_bkpinfo::postnuke_tarball[MAX_STR_LEN]

A tarball containing a program called "usr/bin/post-nuke" that will be run after nuking the system.

If "", do not use a post-nuke tarball.

Definition at line 597 of file mondostructures.h.

Referenced by copy_mondo_and_mindi_stuff_to_scratchdir(), pre_param_configuration(), process_switches(), and reset_bkpinfo().

◆ prefix

char s_bkpinfo::prefix[MAX_STR_LEN/4]

The prefix to put in front of media number If backup_media_type is iso, then this is the prefix for the filename If backup_media_type is anything else, this is ignored.

Definition at line 476 of file mondostructures.h.

Referenced by do_that_initial_phase(), interactively_obtain_media_parameters_from_user(), mount_media(), post_param_configuration(), process_switches(), read_cfg_file_into_bkpinfo(), reset_bkpinfo(), verify_cd_image(), and write_iso_and_go_on().

◆ restore_data

bool s_bkpinfo::restore_data

If TRUE, then we should restore some data.

Definition at line 444 of file mondostructures.h.

Referenced by interactively_obtain_media_parameters_from_user(), main(), process_switches(), and reset_bkpinfo().

◆ restore_mode

◆ restore_path

char s_bkpinfo::restore_path[MAX_STR_LEN]

The path to restore files relative to during a restore.

This is useful if you want to extract the files (to test, for example) without overwriting the old ones. Ignored during a backup.

Definition at line 537 of file mondostructures.h.

Referenced by clean_blkid(), clean_multipathconf(), compare_mode(), compare_to_CD(), compare_to_cdstream(), compare_to_tape(), interactive_mode(), main(), reset_bkpinfo(), restore_a_biggiefile_from_CD(), restore_a_biggiefile_from_stream(), restore_all_tarballs_from_stream(), restore_everything(), restore_to_live_filesystem(), verify_all_slices_on_CD(), and verify_biggiefiles_from_stream().

◆ scratchdir

◆ subdir

char* s_bkpinfo::subdir

The potential subdirectory under which are located ISO images on HDD (restore mode only)

Definition at line 586 of file mondostructures.h.

Referenced by finish(), get_isodir_info(), mount_media(), and reset_bkpinfo().

◆ tmpdir

char s_bkpinfo::tmpdir[MAX_STR_LEN/4]

The temp directory to use.

This is where filesets are stored by the archival threads before the main thread moves them to the scratchdir. You don't need a lot of space here.

Definition at line 491 of file mondostructures.h.

Referenced by archive_this_fileset(), backup_data(), call_filelist_chopper(), call_mindi_to_supply_boot_disks(), copy_from_src_to_dest(), copy_mondo_and_mindi_stuff_to_scratchdir(), create_afio_files_in_background(), do_that_initial_phase(), find_cdrom_device(), finish(), get_cfg_file_from_archive(), get_last_filelist_number(), interactively_obtain_media_parameters_from_user(), load_filelist_into_array(), main(), make_afioballs_and_images(), make_afioballs_and_images_OLD(), make_slices_and_images(), make_those_slices_phase(), make_usb_fs(), openin_tape(), pause_and_ask_for_cdr(), post_param_configuration(), prepare_filelist(), process_filelist_and_biggielist(), process_switches(), reset_bkpinfo(), restore_a_biggiefile_from_stream(), restore_a_tarball_from_stream(), restore_all_biggiefiles_from_CD(), restore_all_biggiefiles_from_stream(), restore_all_tarballs_from_stream(), run_program_and_log_output(), run_program_and_log_to_screen(), set_EXAT_list(), setup_MR_global_filenames(), setup_tmpdir(), size_of_all_biggiefiles_K(), slice_up_file_etc(), some_basic_system_sanity_checks(), sort_file(), verify_a_biggiefile_from_stream(), verify_a_tarball(), verify_afioballs_from_stream(), verify_all_slices_on_CD(), verify_an_afioball_from_stream(), verify_biggiefiles_from_stream(), verify_cd_image(), verify_data(), verify_tape_backups(), verify_usb_image(), write_backcatalog_to_tape(), and write_cfg_var().

◆ use_gzip

bool s_bkpinfo::use_gzip

If TRUE, then use gzip to compress data.

This is used mainly in estimates. The backup/restore may or may not work if you do not set this. You should also set zip_exe and zip_suffix.

Definition at line 421 of file mondostructures.h.

Referenced by call_mindi_to_supply_boot_disks(), estimate_noof_media_required(), post_param_configuration(), process_switches(), read_cfg_file_into_bkpinfo(), reset_bkpinfo(), verify_a_tarball(), and verify_all_slices_on_CD().

◆ use_lzma

bool s_bkpinfo::use_lzma

If TRUE, then use lzma to compress data.

This is used mainly in estimates. The backup/restore may or may not work if you do not set this. You should also set zip_exe and zip_suffix.

Definition at line 429 of file mondostructures.h.

Referenced by call_mindi_to_supply_boot_disks(), estimate_noof_media_required(), post_param_configuration(), process_switches(), read_cfg_file_into_bkpinfo(), reset_bkpinfo(), verify_a_tarball(), and verify_all_slices_on_CD().

◆ use_lzo

bool s_bkpinfo::use_lzo

If TRUE, then use lzop to compress data.

This is used mainly in estimates. The backup/restore may or may not work if you do not set this. You should also set zip_exe and zip_suffix.

Definition at line 413 of file mondostructures.h.

Referenced by archive_this_fileset(), call_mindi_to_supply_boot_disks(), estimate_noof_media_required(), interactively_obtain_media_parameters_from_user(), post_param_configuration(), process_switches(), read_cfg_file_into_bkpinfo(), reset_bkpinfo(), slice_up_file_etc(), verify_a_tarball(), and verify_all_slices_on_CD().

◆ use_obdr

◆ use_star

◆ verify_data

bool s_bkpinfo::verify_data

◆ wipe_media_first

bool s_bkpinfo::wipe_media_first

If TRUE, then pass cdrecord the argument "blank=fast" to wipe the CDs before writing to them.

This has no effect for DVDs.

Definition at line 603 of file mondostructures.h.

Referenced by process_switches(), and reset_bkpinfo().

◆ zip_exe

char s_bkpinfo::zip_exe[MAX_STR_LEN/4]

The compression program to use.

Currently supported choices are lzop, bzip2, gzip or lzma. This is ignored if compression_level is 0.

Definition at line 379 of file mondostructures.h.

Referenced by archive_this_fileset(), interactively_obtain_media_parameters_from_user(), post_param_configuration(), read_cfg_file_into_bkpinfo(), reset_bkpinfo(), restore_a_biggiefile_from_stream(), restore_a_tarball_from_stream(), slice_up_file_etc(), and verify_a_tarball().

◆ zip_suffix


The documentation for this struct was generated from the following file: