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)  

Backup Functions

Functions for backing up data. More...

Collaboration diagram for Backup Functions:

Modules

 Mid-Level Backup Functions
 
 Low-Level Backup Functions
 

Functions

int backup_data ()
 Wrapper function for all the backup commands. More...
 
int interactively_obtain_media_parameters_from_user (int archiving_to_media)
 Ask user for details of backup/restore information. More...
 
void estimate_noof_media_required (long noof_sets)
 Determine the approximate number of media that the backup will take up, and tell the user. More...
 

Detailed Description

Functions for backing up data.

Function Documentation

◆ backup_data()

◆ estimate_noof_media_required()

void estimate_noof_media_required ( long  noof_sets)

Determine the approximate number of media that the backup will take up, and tell the user.

The uncompressed size is estimated as size_of_all_biggiefiles_K() plus (noof_sets x bkpinfo->optimal_set_size). The compression factor is estimated as 2/3 for LZO and 1/2 for bzip2. The data is not saved anywhere. If there are any "imagedevs", the estimate is not shown as it will be wildly inaccurate. If there are more than 50 media estimated, the estimate will not be shown.

Parameters
bkpinfoThe backup information structure. Fields used:
  • bkpinfo->backup_media_type
  • bkpinfo->image_devs
  • bkpinfo->media_size
  • bkpinfo->optimal_set_size
  • bkpinfo->use_lzo
noof_setsThe number of filesets created.

Definition at line 1113 of file libmondo-files.c.

References s_bkpinfo::backup_media_type, bkpinfo, log_it, log_to_screen(), media_descriptor_string(), s_bkpinfo::media_size, mr_asprintf, mr_free, number_to_text(), s_bkpinfo::optimal_set_size, size_of_all_biggiefiles_K(), s_bkpinfo::use_gzip, s_bkpinfo::use_lzma, and s_bkpinfo::use_lzo.

Referenced by call_filelist_chopper().

◆ interactively_obtain_media_parameters_from_user()

int interactively_obtain_media_parameters_from_user ( int  archiving_to_media)

Ask user for details of backup/restore information.

Called when mondoarchive doesn't get any parameters.

Parameters
bkpinfoThe backup information structure to fill out with the user's data.
archiving_to_mediaTRUE if archiving, FALSE if restoring.
Returns
0, always.
Bug:
No point of ‘int’ return value.

Definition at line 2168 of file libmondo-devices.c.

References ask_me_yes_or_no(), assert, s_bkpinfo::backup_data, s_bkpinfo::backup_media_type, bkpinfo, bkptype_to_string(), s_bkpinfo::boot_device, s_bkpinfo::boot_loader, s_bkpinfo::boot_type, call_program_and_get_last_line_of_output(), cdr, cdrw, s_bkpinfo::cdrw_speed, cdstream, s_bkpinfo::compression_level, DEFAULT_DVD_DISK_SIZE, s_bkpinfo::disaster_recovery, does_file_exist(), does_string_exist_in_boot_block(), dvd, s_bkpinfo::exclude_paths, FALSE, fatal_error(), figure_out_kernel_path_interactively_if_necessary(), find_cdrom_device(), find_cdrw_device(), find_dvd_device(), find_home_of_exe(), find_tape_device_and_size(), finish(), g_getfacl, g_getfattr, g_ISO_restore_mode, g_kernel_version, g_restoring_live_from_cd, g_selfmounted_isodir, s_bkpinfo::image_devs, s_bkpinfo::include_paths, s_bkpinfo::internal_tape_block_size, is_this_device_mounted(), iso, s_bkpinfo::isodir, s_bkpinfo::kernel_path, list_of_NETFS_mounts_only(), log_it, log_msg, log_to_screen(), s_bkpinfo::make_cd_use_lilo, malloc_string, s_bkpinfo::manual_cd_tray, MAX_STR_LEN, media_descriptor_string(), s_bkpinfo::media_device, s_bkpinfo::media_size, mr_asprintf, mr_boot_type(), mr_free, mr_make_devlist_from_pathlist(), mr_popup_and_get_string(), mr_strcat, mr_strip_spaces(), mvaddstr_and_log_it(), netfs, s_bkpinfo::netfs_mount, s_bkpinfo::netfs_proto, s_bkpinfo::netfs_remote_dir, s_bkpinfo::netfs_user, s_bkpinfo::nonbootable_backup, none, paranoid_fclose, paranoid_free, paranoid_system, s_bkpinfo::please_dont_eject, popup_and_get_string(), popup_and_OK(), s_bkpinfo::prefix, read_cfg_var(), s_bkpinfo::restore_data, s_bkpinfo::restore_mode, run_program_and_log_output(), s_bkpinfo::scratchdir, setup_scratchdir(), setup_tmpdir(), tape, s_bkpinfo::tmpdir, TRUE, udev, usb, s_bkpinfo::use_lzo, s_bkpinfo::use_obdr, VANILLA_SCSI_CDROM, VANILLA_SCSI_TAPE, s_bkpinfo::verify_data, which_backup_media_type(), which_boot_loader(), which_compression_level(), which_compression_type(), s_bkpinfo::zip_exe, and s_bkpinfo::zip_suffix.