GithubHelp home page GithubHelp logo

isabella232 / archivefeaturesupport Goto Github PK

View Code? Open in Web Editor NEW

This project forked from azure/archivefeaturesupport

0.0 0.0 0.0 43 KB

This repository will contain the scripts for Archive feature support

License: MIT License

PowerShell 100.00%

archivefeaturesupport's Introduction

page_type languages products description
sample
powershell
azure
Automates top asks using PowerShell for Azure Backup archive feature

Automate top asks using PowerShell for Azure Backup

Automate archive move using PowerShell for Azure Backup

Features

Runbooks for Archive move

Sample Scripts

  1. Run Latest Version of Powershell in administrator mode

  2. Run the following command to set the execution policy (this allows permission for scripts to be run)

     Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process 
    
  3. Download the scripts

  4. Use the following commands for installation and setup

     cd <Location of the script> 
    
     install-module -name Az.RecoveryServices -Repository PSGallery -AllowClobber -Force
    
  5. Connect to Azure using the "Connect-AzAccount" cmdlet.

  6. Run the scripts

View Archivable Points

Location

Download viewArchivableRPs

Purpose

This sample script is used to view all the archivable recovery points associated with a backup item between any time range.

Input Parameters

  1. Subscription
  2. ResourceGroupName
  3. VaultName
  4. ItemType โ€“ {AzureVM,MSSQL)
  5. StartDate = (Get-Date).AddDays(-x).ToUniversalTime()
  6. EndDate = (Get-Date).AddDays(-y).ToUniversalTime()
  7. VMName
  8. DBName(Only for SQL DB)

Where x and y are the time-range between which you want to move the recovery points.

Output

A list of archivable recovery point

Example Usage

$ArchivableRecoveryPoints = .\viewArchivableRPs.ps1 -Subscription xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx -ResourceGroupName "ResourceGroupName" -VaultName "VaultName" -ItemType "MSSQL/AzureVM" -VMName "VMName" -DBName "DBName" -StartDate (Get-Date).AddDays(-165).ToUniversalTime() -EndDate (Get-date).AddDays(0).ToUniversalTime()

Move all Archivable recovery point for a SQL Server in Azure VM

Location

Download moveArchivableRecoveryPointsForSQL

Purpose

This sample script moves all the archivable recovery point for a particular SQL Backup Item to archive.

Input Parameters

  1. Subscription
  2. ResourceGroupName
  3. VaultName
  4. VMName
  5. DBName
  6. StartDate (Get-Date).AddDays(-x).ToUniversalTime()
  7. EndDate (Get-date).AddDays(-y).ToUniversalTime()

Where x and y are the time-range between which you want to move the recovery points.

Output

A list of move jobs initiated for each recovery point being moved to archive.

Example Usage

$MoveJobsSQL = .\moveArchivableRecoveryPointsForSQL.ps1 -Subscription xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx -ResourceGroupName "ResourceGroupName" -VaultName "VaultName" -VMName "VMName" -DBName "DBName" -StartDate (Get-Date).AddDays(-165).ToUniversalTime() -EndDate (Get-date).AddDays(0).ToUniversalTime()

Move all Archivable recovery point for all the databases for a particular SQL Server in Azure VM

Location

Download moveArchivableRecoveryPointsForSQLServer

Purpose

This sample script moves all the archivable recovery point for all the databases for a SQLServer to archive.

Input Parameters

  1. Subscription
  2. ResourceGroupName
  3. VaultName
  4. ServerName
  5. StartDate (Get-Date).AddDays(-x).ToUniversalTime()
  6. EndDate (Get-date).AddDays(-y).ToUniversalTime()

Where x and y are the time-range between which you want to move the recovery points.

Output

A list of move jobs initiated for each recovery point being moved to archive.

Example Usage

$MoveJobsSQL = .\moveArchivableRecoveryPointsForSQLServer.ps1 -Subscription xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx -ResourceGroupName "ResourceGroupName" -VaultName "VaultName" -ServerName "ServerName" -StartDate (Get-Date).AddDays(-165).ToUniversalTime() -EndDate (Get-date).AddDays(0).ToUniversalTime()

Move all recommended recovery points to archive for a Virtual Machine workload

Location

Download moveRecommendedRPsForIaasVM

Purpose

Move all the recommended recovery points to archive for a particular Virtual Machine workload.

Input Parameters

  1. Subscription
  2. ResourceGroupName
  3. VaultName
  4. VMName

Output

A list of move jobs initiated for each recovery point being moved to archive

Example Usage

$MoveJobsIaasVM = .\moveRecommendedRPsForIaasVM.ps1 -Subscription xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx -ResourceGroupName "ResourceGroupName" -VaultName "VaultName" -VMName "VMName"

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

Please report issues if any script fails to complete its intended purpose. We actively try to fix the bugs and rectify them.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.

archivefeaturesupport's People

Contributors

debpriya1994 avatar hiaga avatar microsoftopensource avatar msftgits avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.