Exemplo n.º 1
0
void BackupSystem::perform_backup(){
	auto start_time = OpaqueTimestamp::utc_now();
	for (auto &vi : system_ops::enumerate_volumes()){
		if (!is_backupable(vi.drive_type))
			continue;
		this->current_volumes[vi.volume_path] = vi;
	}
	if (!this->use_snapshots){
		this->perform_backup_inner(start_time);
		return;
	}
	std::cout << "Creating shadows.\n";
	VssSnapshot snapshot(get_map_keys(this->current_volumes));
	for (auto &shadow : snapshot.get_snapshot_properties().get_shadows()){
		start_time = shadow.created_at;
		break;
	}
	this->set_path_mapper(snapshot);
	this->perform_backup_inner(start_time);
}
Exemplo n.º 2
0
/**
 * etchtype_get_fields()
 * returns a disposable arraylist of references. the list is marked
 * such that list->destroy() will not attempt to free content.
 * caller must cast result to etch_arraylist*
 */
void* etchtype_get_fields (etch_type* type)
{
    etch_type_impl* impl = (etch_type_impl*) type->impl;
    return get_map_keys(impl->fieldmap);
}