Search This Blog

2020-09-07

Lab 10. Backup Azure VM/ Azure Service Vault

1. Upload files Upload and upload the files \Allfiles\Labs\10\az104-10-vms-template.json and \Allfiles\Labs\10\az104-10-vms-parameters.json

Location: https://github.com/MicrosoftLearning/AZ-104-MicrosoftAzureAdministrator/tree/master/Allfiles/Labs/10

2. Create the resource group

$location = 'eastus'

$rgName = 'az104-10-rg0' 

New-AzResourceGroup -Name $rgName -Location $location

3. create the first virtual network and deploy a virtual machine into it 

New-AzResourceGroupDeployment ` 
-ResourceGroupName $rgName ` 
-TemplateFile $HOME/az104-10-vms-template.json ` 
-TemplateParameterFile $HOME/az104-10-vms-parameters.json ` 
-AsJob

4. create a recovery services vault - az104-10-rsv1

5. Backup configuration of the new RSV


6. Security setting on the RSV


7. Configure VM level backup




8. Select VM to backup and then select Enable Backup (which will appear after selecting the VM)

9.  Take manual Backup




10. Implement File and folder backup for VM1
    a.    Login to the VM1
    b.    In the Server Manager window, click Local Server, click IE Enhanced Security Configuration and turn it Off for Administrators.
    c.    Prepare Infrastructure
    

    d. Download and install the agent
    
    e.    Proceed to registration

f. Wait the Vault Credential Step

g. Download Vault Credential and save it

h.    Browse the Vault credential - Step f above


i. Generate Passphrase

j.    On the Server Registration page of the Register Server Wizard, review the warning regarding the location of the passphrase file, ensure that the Launch Microsoft Azure Recovery Services Agent checkbox is selected and click Close. This will automatically open the Microsoft Azure Backup console.

k.    Configure Microsoft Azure Backup

l.    
 

m.    


n.    


o.


p.


q.



11.    Perform file recovery by using Azure Recovery Services agent

a.

b.On the Select Volume and Date page, in the Select the volume drop down list, select C:\, accept the default selection of the available backup, and click Mount.


c. From the Command Prompt, run the following to copy the restore the hosts file to the original location (replace [recovery_volume] with the drive letter of the recovery volume you identified earlier):

robocopy F:\Windows\System32\drivers\etc C:\Windows\system32\drivers\etc hosts /r:1 /w:1


12.    Perform file recovery by using Azure virtual machine snapshots
a.    Login to VM0 and azure portal
b.
c.

d.

e.

f.

g.

h.
robocopy [os_volume]:\Windows\System32\drivers\etc C:\Windows\system32\drivers\etc hosts /r:1 /w:1

i. Unmount when recover is done


13. Review the Azure Recovery Services soft delete functionality













14. Delete all resources

Get-AzResourceGroup -Name 'az104-10*' | Remove-AzResourceGroup -Force -AsJob



2016-02-17

Important concepts about Javascript for Node JS Developer

Special Values
Null,undefined,{},NaN,Infinity

Special Datatype
object,function,string,number

Typecase
parseInt(),parseFloat(),Boolean()

check datatype :
typeof()-return as string like 'number','object'
instanceof-[] instanceof Array=>true
isNaN(),isFinite()

String Functions:
length,indexOf(),substr(),slice(),split,trim(),search(REGULAR EXPR)

Create Object:
var obj1={first_name='manab',last_name='basu'}

delete properties from object:
delete user.first_name

to add properties in object :
user["first_name"]="Manab"

lenght Of Object
Object.keys(user).length

Array:
Create Array:var arr=[] or var arr=['a','b','c']
typeof arr=Object

Check : Array.isArray(arr)

Add Item: arr.push('a') or arr[4]='a' or arr.unshift('c')- add element at beginning

Delete Item-delete arr[3] or arr.pop()-pop item from the end,arr.shift()-Remove item from begening

Extract Element from array-arr.splice(START_INDEX,NO OF ELEMENT) & it reduce the array size based on NO OF ELEMENT

String to array:"A,b,c".split(',');

Array to string:[1,2,3].join(":");=>1:2:3

Sort:arr.sort()

Sort String of array(names):
names.sort(function(a, b){
var a1=a.toLowerCase(),b1=b.toLowerCase();
    if(a1 < b1) return -1;
    if(a1 > b1) return 1;
    return 0;
})

Functions:
check arguments:write- console.log(arguments);- within function

Constraint
Ternary Operator: var x=today?"X":"Y"

prototype:The prototype property is initially an empty object, and can have members added to it - as you would any other object.
var myObject = function(name){
    this.name = name;
    return this;
};
console.log(typeof myObject.prototype); // object
myObject.prototype.getName = function(){//adding a new member getName() to the class myObject
    return this.name;
};
or
function Shape(){
};
Shape.prototype.X=0;
Shape.prototype.Y=0;
Shape.prototype.move=function(x,y){
 this.X=x;
 this.Y=y;
}
Shape.prototype.distance=function(){
 return Math.sqrt(this.X*this.X+this.Y*this.Y);
}
//call
var s=new Shape();
s.move(10,10);
console.log(s.distance());

Inheritance:
function Square(){}
Square.prototype=new Shape();
Square.prototype.__proto__=Shape().prototype;
Square.prototype.width=0;
Square.prototype.area=function(){
 return this.width*this.width;
}
var sq=new Square();
sq.move(5,5);
sq.width=15;
console.log(sq.distance());
console.log(sq.area());
Error Handling:
function test(){
 throw new Error("Bad Error");
}
//Calling Function
try{
 test();
}
catch(e){
 console.log(e.message);
}
Global: global object
global.name="Manab";
global["name"];