// all in one wp migration pattern: WP_PLUGIN_DIR/all-in-one-wp-migration/storage/*/*.wpress, `ai1wm-backups` folder in wp-content is already implicitly handled on the UDP settings with a `*backups` predefined exclusion rule for `others` directory
// If the report is of a large amount, then we're probably getting the total memory on the hypervisor (this has been observed), and don't really know the VPS's memory
* Get a site name suitable for use in the backup filename
*
* @return String
*/
privatefunctionget_site_name(){
// Get the blog name and rip out known-problematic characters. Remember that we may need to be able to upload this to any FTP server or cloud storage, where filename support may be unknown
$updraftplus->log("There appear to be no mu-plugins to backup. Will not raise an error.");
$flag_error=false;
}
}
if($flag_error)$updraftplus->log(sprintf(__("%s - could not back this entity up; the corresponding directory does not exist (%s)",'updraftplus'),$whichone,$create_from_dir),'error');
// Firstly, make sure that the temporary file is not already being written to - which can happen if a resumption takes place whilst an old run is still active
$updraftplus->log("File exists ($zip_name), but was apparently not modified within the last 30 seconds, so we assume that any previous run has now terminated (time_mod=$time_mod, time_now=$time_now, diff=".($time_now-$time_mod).")");
}
// Now, check for other forms of temporary file, which would indicate that some activity is going on (even if it hasn't made it into the main zip file yet)
// Note: this doesn't catch PclZip temporary files
// Because of zip-splitting, the mere fact that files exist is not enough to indicate that the entity is finished. For that, we need to also see that no subsequent file has been started.
// Q. What if the previous runner died in between zips, and it is our job to start the next one? A. The next temporary file is created before finishing the former zip, so we are safe (and we are also safe-guarded by the updated value of the index being stored in the database).
return$files_existing;
}
$this->log_account_space();
$this->zip_microtime_start=microtime(true);
// The paths in the zip should then begin with '$whichone', having removed WP_CONTENT_DIR from the front
$updraftplus->log("Created $whichone zip (".$this->index.") - ".round($kbsize,1)." KB in ".round($timetaken,1)." s ($rate KB/s) ($checksum_description)");
// We can now remove any left-over temporary files from this job
}
}elseif($this->index>$original_index){
$updraftplus->log("Did not create $whichone zip (".$this->index.") - not needed (2)");
// Added 12-Feb-2014 (to help multiple morefiles)
$this->index--;
}else{
$updraftplus->log("Looked-for $whichone zip (".$this->index.") was not found (".basename($full_path).".tmp)",'warning');
* This method is for calling outside of a cloud_backup() context. It constructs a list of services for which prune operations should be attempted, and then calls prune_retained_backups() if necessary upon them.
// If there was no check-in last time, then attempt a different service first - in case a time-out on the attempted service leads to no activity and everything stopping
// if $remote_storage_instances is not empty then we are looping over a list of instances the user wants to backup to so we want to ignore if the instance is enabled or not
$updraftplus->log("This instance id ($instance_id) is set as inactive.");
}
$instance_id_count++;
}
}
}catch(Exception$e){
$log_message='Exception ('.get_class($e).') occurred during backup uploads to the '.$service.'. Exception Message: '.$e->getMessage().' (Code: '.$e->getCode().', line '.$e->getLine().' in '.$e->getFile().')';
$updraftplus->log($log_message);
error_log($log_message);
$updraftplus->log(sprintf(__('A PHP exception (%s) has occurred: %s','updraftplus'),get_class($e),$e->getMessage()),'error');
// @codingStandardsIgnoreLine
}catch(Error$e){
$log_message='PHP Fatal error ('.get_class($e).') has occurred during backup uploads to the '.$service.'. Error Message: '.$e->getMessage().' (Code: '.$e->getCode().', line '.$e->getLine().' in '.$e->getFile().')';
$updraftplus->log($log_message);
error_log($log_message);
$updraftplus->log(sprintf(__('A PHP fatal error (%s) has occurred: %s','updraftplus'),get_class($e),$e->getMessage()),'error');