Deleting Perforce Workspace from cloned VM - perforce

Does deleting a workspace only affect local files in perforce, or is there some bookkeeping kept by the perforce server? I've cloned a VM and now have two of the same workspaces on two separate machines, but want to remove one from one machine but not the other. How can this be done?

Deleting a workspace deletes it from the server, so you definitely don't want to do that.
In your new VM, create a new workspace. If you want it to be exactly the same as the original VM, create the new workspace by using the original workspace as a template. From P4V, right-click on the workspace from the Workspace view and choose "Create/Update workspace from originalworkspace"
Or, from the command line:
p4 client -o -t originalworkspace mynewworkspace

Related

how to use existing github yml files for Azure devops pipelines

I want to create Azure DevOps pipelines, but instead of writing new yaml files, use prepared ones that are in a github repository.
I have connected GitHub to my Azure DevOps account, but I Can't see an option to use yaml files in that repository.
I only have an option to create a new pipeline yaml, and then set it in the repo folder structure.
If I try and set it on the location of the yaml file I want to use, which is already in the repo, I get - of course, an error stating there's a file there.
My work around is to set a new yaml file with a different name, copy the content from the existing file and then delete that one and rename the new file to the name of the file I copied from.
Surely there must be a better, easier, more logical and short way.
I would appreciate any help.
Under project settings you should link your Github account.
Then you can go and create a new pipeline and select the Github location
after this step, your available github repositories will appear and you can select your existing .YML file.
Existing pipeline:

Delete and recreate the registry for an azure machine learning workspace

Our azure machine learning workspace container registry has grown extremely large (4Tb) and has many obsolete entries. I would like to delete the registry and simply create a new one. We do not need any entries from the old one.
If I delete the current registry, create a new one, how do I attach it to the workspace? I dont want to create a new workspace.
Attaching a registry to an existing workspace can be done with this command (replace placeholders with your own values):
az ml workspace update -n [ML workspace name] -g [Resource group name] --container-registry [ACR ID] -u

Azure DevOps Pipines - Git Respository local directory location

I have created a Pipeline in Azure DevOps and have associated a git repository.
It is cloned to my agent, but I can't get control over in which local directory the repository is cloned to. I am working with self hosted Agent.
The next task need to use a specific file in the repository to complete the task.
The last things tha should happen in the pipline, is push back changes made in the respository.
I think what you want is WorkingDirectory, the local path on the agent where your source code files are downloaded. For example: c:\agent_work\1\s

Import terraform workspaces from S3 remote state

I am using terraform to deploy to multiple AWS accounts and each account with its own set of environments. I'm using terraform workspaces and s3 remote state. When I switch between these accounts my terraform workspace list is empty now for one of the accounts. Is there a way to sync the state of workspace from the s3 remote state?
Please advise.
Thanks,
I have tried to create the workspace but when I run terraform plan it does create all the resources even though they exists already in the remote state.
I managed to fix it using the following:
I created the new namespaces manually using terraform workspace command
terraform workspace new dev
Created and switched to workspace "dev"!
You're now on a new, empty workspace. Workspaces isolate their state,
so if you run "terraform plan" Terraform will not see any existing state
for this configuration.
I went to S3 where I have the remote state and now under the environment dev I have duplicate states.
I copied the state from the old folder key and added to the new folder key (using copy/paste) in S3 console window
IN dynamo db lock state I have duplicate id of LockID for my environment with different digests. I had to copy the Digest of the old entry and replace the digest for the new entry. After that when I run terraform plan everything went smoothly and I had to repeat the same process for all the environments.
I hope this helps anyone else having the same use case.
Thanks,

Azure: Is it possible to delete a restore point in azure backup?

I have a test restore point (it's older than 30 days) I wanted to delete to save on the cost. I tried via azure portal the only option I found is to delete the backup data, not the restore point of a particular vm.
I'm currently using classic deployment and the VMs are deployed using classic deployment.
Now it is possible thought portal, powershell and CLI.
First of all you need to stop backup (retain backup).
Disable soft delete in RSV properties.
After that find appropriate RG - AzureBackupRG-location_of_vm, example: AzureBackupRG_westus2_1 Remember to check "Show hidden types" in RG.
Last step is to delete restore points in this RG. You only delete restore point, not backup from vault
*
*PORTAL**:
Temporarily stop the backup and retain backup data.
To move virtual machines configured with Azure Backup, do the following steps:
Find the location of your virtual machine.
Find a resource group with the following naming pattern: AzureBackupRG_<location of your VM>_1. For example, AzureBackupRG_westus2_1
In the Azure portal, check Show hidden types.
Find the resource with type Microsoft.Compute/restorePointCollections that has the naming pattern AzureBackup_<name of your VM that you're trying to move>_###########.
Delete this resource. This operation deletes only the instant recovery points, not the backed-up data in the vault.
After the delete operation is complete, you can move your virtual machine.
Move the VM to the target resource group.
Resume the backup.
Link to MS Doc
As for as I know, It's impossible to delete a restore point in Azure backup. According to delete backup date in the official doc.
Unlike the process for restoring recovery points, when you delete
backup data, you can't choose specific recovery points to delete. If
you delete your backup data, you delete all associated recovery
points.
Moreover, It's not necessary to select specific recovery points to delete as you could customize retention range in backup policy. The Retention means how long data needs to be stored. Refer to this.
I got an 'internal system error' while trying to delete the restore point. This was because the VM had already been deallocated. I turned it back on, then was able the delete the restore point successfully, then shut the VM down again.

Resources