Thursday, March 18, 2021

Azure - Azcopy blobs guide

1. Make sure you are on the right account (read https://craigforrester.com/posts/azure-cli-basics-logging-in/)


2. Create sas token.

3. Make sure you are logged in with

azcopy login

4. now copy with for example the following command:

AZcopy copy "c:\App_Data\MyBlobs\*" "https://{{youraccount}}.blob.core.windows.net/vpp?{{your SAS TOKEN }}" --recursive

OR
az storage blob download-batch --account-name customerVPP --source vppnext --destination C:\Users\Downloads\vppnext


# List currently authenticated subscriptions

az account list # Log in to a subscription az login # Display subscriptions by Name and show which is selected az account list --query "[].{Name:name, IsDefault:isDefault}" # Select a specific subscription by name az account set --subscription "Visual Studio Enterprise" # Show usernames associated with specific subscriptions az account list --query "[].{Name:name, User:user.name}" # Show usernames associated with a specific subscription matching Name az account list --query "[?contains(name, 'Visual')].{Name:name, User:user.name}" # Log out of a specific subscription by username az logout --username "user@example.com" # List virtual machines for select account az vm list

az copy to pageblob type : --blob-type=PageBlob

--blob-type=BlockBlob (used in episerver)

Thursday, March 4, 2021

Monday, February 1, 2021

Linux - Add Permanent Path variable

 Add a line to: 

~/.profile


Example $PATH - Refers to your current path.

export PATH="$PATH:/usr/bin/mobydick"

Just modifying $PATH directly is useless since it is NOT permanent (current shell only). And needs this command to execute:

source ~/.bash_profile

Thursday, January 21, 2021

Windows Terminal - Settings.json location

 %userprofile%\AppData\Local\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState

Tuesday, December 22, 2020

Virtual Box - Resize existing disk

In cmd 

"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" modifyhd {Name}.vdi --resize {size in MB}

0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%

Friday, December 18, 2020

MS SQL - Db stuck in 'Restoring... '


RUN SQL QUERY ON THE DB:

 RESTORE DATABASE [DATABASENAME] WITH RECOVERY

Monday, December 14, 2020