public/wordpress/wp-content/plugins/backupbuddy/controllers/cron.php
// Copy Rackspace backup to local backup directory
Copy Rackspace backup to local backup directory
Copy Rackspace backup to local backup directory
function _process_rackspace_copy( $rs_backup, $rs_username, $rs_api_key, $rs_container, $rs_server ) {
		pb_backupbuddy::set_greedy_script_limits();
		if ( ! class_exists( 'backupbuddy_core' ) ) {
			require_once( pb_backupbuddy::plugin_path() . '/classes/core.php' );
		}
		require_once( pb_backupbuddy::plugin_path() . '/destinations/rackspace/lib/rackspace/cloudfiles.php' );
		$auth = new CF_Authentication( $rs_username, $rs_api_key, NULL, $rs_server );
		$auth->authenticate();
		$conn = new CF_Connection( $auth );
		$container = $conn->get_container( $rs_container );
		$rsfile = $container->get_object( $rs_backup );
		$destination_file = backupbuddy_core::getBackupDirectory() . $rs_backup;
		if ( file_exists( $destination_file ) ) {
			$destination_file = str_replace( 'backup-', 'backup_copy_' . pb_backupbuddy::random_string( 5 ) . '-', $destination_file );
		}
		$fso = fopen( backupbuddy_core::getBackupDirectory() . $rs_backup, 'w' );
		$rsfile->stream($fso);
		fclose($fso);
	}
function _process_rackspace_copy ( $ rs_backup , $ rs_username , $ rs_api_key , $ rs_container , $ rs_server ) { pb_backupbuddy :: set_greedy_script_limits ( ) ; if ( ! class_exists ( 'backupbuddy_core' ) ) { require_once ( pb_backupbuddy :: plugin_path ( ) . '/classes/core.php' ) ; } require_once ( pb_backupbuddy :: plugin_path ( ) . '/destinations/rackspace/lib/rackspace/cloudfiles.php' ) ; $ auth = new CF_Authentication ( $ rs_username , $ rs_api_key , NULL , $ rs_server ) ; $ auth -> authenticate ( ) ; $ conn = new CF_Connection ( $ auth ) ; $ container = $ conn -> get_container ( $ rs_container ) ; $ rsfile = $ container -> get_object ( $ rs_backup ) ; $ destination_file = backupbuddy_core :: getBackupDirectory ( ) . $ rs_backup ; if ( file_exists ( $ destination_file ) ) { $ destination_file = str_replace ( 'backup-' , 'backup_copy_' . pb_backupbuddy :: random_string ( 5 ) . '-' , $ destination_file ) ; } $ fso = fopen ( backupbuddy_core :: getBackupDirectory ( ) . $ rs_backup , 'w' ) ; $ rsfile -> stream ( $ fso ) ; fclose ( $ fso ) ; }
Copy Rackspace backup to local backup directory
Copy Rackspace backup to local backup directory
// Set container // Get file from Rackspace