backupbuddy_backup/wp-content/plugins/backupbuddy/classes/backup.php
/* integrity_check()
	 *
	 * Perform integrity check on backup file to confirm backup.
	 *
	 */
integrity_check()
Perform integrity check on backup file to confirm backup.
integrity_check () Perform integrity check on backup file to confirm backup .
function integrity_check() {
		pb_backupbuddy::status( 'milestone', 'start_integrity' );
		pb_backupbuddy::status( 'message', __( 'Scanning and verifying backup file integrity.', 'it-l10n-backupbuddy' ) );
		if ( ( $this->_backup['profile']['type'] != 'files' ) && ( $this->_backup['profile']['skip_database_dump'] == '1' ) ) {
			pb_backupbuddy::status( 'warning', 'WARNING: Database .SQL file does NOT exist because the database dump has been set to be SKIPPED based on settings. Use with caution!' );
		}
		$options = array(
			'skip_database_dump' => $this->_backup['profile']['skip_database_dump'],
		);
		pb_backupbuddy::status( 'details', 'Starting integrity check on `' . $this->_backup['archive_file'] . '`.' );
		$result = backupbuddy_core::backup_integrity_check( $this->_backup['archive_file'], $this->_backup_options, $options, $skipLogRedirect = true );
		if ( false === $result['is_ok'] ) {
			$message = __( 'Backup failed to pass integrity check. The backup may have failed OR the backup may be valid but the integrity check could not verify it. This could be due to permissions, large file size, running out of memory, or other error. Verify you have not excluded one or more required files, paths, or database tables; check for warnings above in the status log.  You may wish to manually verify the backup file is functional or re-scan.', 'it-l10n-backupbuddy' );
			pb_backupbuddy::status( 'error', $message );
			pb_backupbuddy::status( 'details', 'Running cleanup procedure now in current step as backup procedure is halting.' );
			$this->post_backup( true ); 
			pb_backupbuddy::status( 'details', __( 'Sending integrity check failure email.', 'it-l10n-backupbuddy' ) );
			backupbuddy_core::mail_error( $message );
			return false;
		}
		pb_backupbuddy::status( 'milestone', 'finish_integrity' );
		return true;
	}
function integrity_check ( ) { pb_backupbuddy :: status ( 'milestone' , 'start_integrity' ) ; pb_backupbuddy :: status ( 'message' , __ ( 'Scanning and verifying backup file integrity.' , 'it-l10n-backupbuddy' ) ) ; if ( ( $ this -> _backup [ 'profile' ] [ 'type' ] != 'files' ) && ( $ this -> _backup [ 'profile' ] [ 'skip_database_dump' ] == '1' ) ) { pb_backupbuddy :: status ( 'warning' , 'WARNING: Database .SQL file does NOT exist because the database dump has been set to be SKIPPED based on settings. Use with caution!' ) ; } $ options = array ( 'skip_database_dump' => $ this -> _backup [ 'profile' ] [ 'skip_database_dump' ] , ) ; pb_backupbuddy :: status ( 'details' , 'Starting integrity check on `' . $ this -> _backup [ 'archive_file' ] . '`.' ) ; $ result = backupbuddy_core :: backup_integrity_check ( $ this -> _backup [ 'archive_file' ] , $ this -> _backup_options , $ options , $ skipLogRedirect = true ) ; if ( false === $ result [ 'is_ok' ] ) { $ message = __ ( 'Backup failed to pass integrity check. The backup may have failed OR the backup may be valid but the integrity check could not verify it. This could be due to permissions, large file size, running out of memory, or other error. Verify you have not excluded one or more required files, paths, or database tables; check for warnings above in the status log.  You may wish to manually verify the backup file is functional or re-scan.' , 'it-l10n-backupbuddy' ) ; pb_backupbuddy :: status ( 'error' , $ message ) ; pb_backupbuddy :: status ( 'details' , 'Running cleanup procedure now in current step as backup procedure is halting.' ) ; $ this -> post_backup ( true ) ; pb_backupbuddy :: status ( 'details' , __ ( 'Sending integrity check failure email.' , 'it-l10n-backupbuddy' ) ) ; backupbuddy_core :: mail_error ( $ message ) ; return false ; } pb_backupbuddy :: status ( 'milestone' , 'finish_integrity' ) ; return true ; }
integrity_check()
 Perform integrity check on backup file to confirm backup.
integrity_check () Perform integrity check on backup file to confirm backup .
// Post backup cleanup in fail mode. //pb_backupbuddy::status( 'haltScript', '' ); // Halt JS on page.