1
Around Suannan / Fresno : az400 - Eduard Kabrinskiy
« เมื่อ: พฤษภาคม 23, 2021, 05:44:31 pm »
Eduard Kabrinskiy - Azure devops backup - Kabrinskiy Eduard
<h1>Azure devops backup</h1>
<p>[youtube]</p>
Azure devops backup <a href="http://remmont.com">News update today</a> Azure devops backup
<h1>How to backup database in Azure devops pipeline</h1>
<p>A devops story of taking a backup before you release to production.</p>
<p><em>Published 16th January 2019 <br />Versions: OnPrem MS SQL Server 2005-2016 <br /></em></p>
<p>This blog post is part of a series of posts ?A devops story ? from Azure to on premise CI/CD? which will be published in future posts.</p>
<p><strong>NOTE! this is one way of doing backup in a devops context, it is not an Azure official best practice. This post is meant as an inspiration for your implementation.</strong> </p>
<p>Even if this example is based on an ?on premise? implementation, it could be implemented in a cloud scenario.</p>
<p><strong>Scenario: In a devops pipeline, before releasing your artifact/code to Staging and Production, you want to take a database backup.</strong></p>
<p><ul>
<li>You have a build in Azure Devops or Github</li>
<li>You have a Release with x tasks</li>
<li>You have a windows agent for on prem commands</li>
</ul>
</p>
<h2>Main Concept</h2>
<p>Before deploy, request an url on site (/DatabaseBackupBeforeRelease), that triggers a SQL stored proc in database, that in turn takes an instant backup file (.bak)</p>
<ol>
<li>Use command line task to trigger a power shell script</li>
<li>Power shell script to request an url</li>
<li>Http trigger that trigger the stored procedure</li>
</ol>
<h2>Azure Devops Release Tasks</h2>
<p style="clear: both"><img src="https://devblog.gosso.se/wp-content/uploads/2018/12/devops-backup-database.png" /></p>
<p>I?m using a the command line task to trigger the Power Shell script:</p>
<p style="clear: both"><img src="https://devblog.gosso.se/wp-content/uploads/2018/12/devops-backup-database-commandline.png" /></p>
<p>*<strong>Important</strong>* use <strong>Version 1</strong></p>
<h2>Power Shell script</h2>
<p>We are using a local PS script to request the database backup to the application. We do run this script localy because we wanted to secure the url by IP restrictions. It would be posible to run the PS script inline in an PS task in Azure devops.</p>
<h2>Azure devops backup</h2>
<h3>Azure devops backup</h3>
<p>[youtube]</p>
Azure devops backup <a href="http://remmont.com">Headlines</a> Azure devops backup
<h4>Azure devops backup</h4>
How to backup database in Azure devops pipeline A devops story of taking a backup before you release to production. Published 16th January 2019 Versions: OnPrem MS SQL Server 2005-2016
<h5>Azure devops backup</h5>
Azure devops backup <a href="http://remmont.com">Azure devops backup</a> Azure devops backup
SOURCE: <h6>Azure devops backup</h6> <a href="https://dev-ops.engineer/">Azure devops backup</a> Azure devops backup
#tags#[replace: -,-Azure devops backup] Azure devops backup#tags#
Кабринский Эдуард
online news
<h1>Azure devops backup</h1>
<p>[youtube]</p>
Azure devops backup <a href="http://remmont.com">News update today</a> Azure devops backup
<h1>How to backup database in Azure devops pipeline</h1>
<p>A devops story of taking a backup before you release to production.</p>
<p><em>Published 16th January 2019 <br />Versions: OnPrem MS SQL Server 2005-2016 <br /></em></p>
<p>This blog post is part of a series of posts ?A devops story ? from Azure to on premise CI/CD? which will be published in future posts.</p>
<p><strong>NOTE! this is one way of doing backup in a devops context, it is not an Azure official best practice. This post is meant as an inspiration for your implementation.</strong> </p>
<p>Even if this example is based on an ?on premise? implementation, it could be implemented in a cloud scenario.</p>
<p><strong>Scenario: In a devops pipeline, before releasing your artifact/code to Staging and Production, you want to take a database backup.</strong></p>
<p><ul>
<li>You have a build in Azure Devops or Github</li>
<li>You have a Release with x tasks</li>
<li>You have a windows agent for on prem commands</li>
</ul>
</p>
<h2>Main Concept</h2>
<p>Before deploy, request an url on site (/DatabaseBackupBeforeRelease), that triggers a SQL stored proc in database, that in turn takes an instant backup file (.bak)</p>
<ol>
<li>Use command line task to trigger a power shell script</li>
<li>Power shell script to request an url</li>
<li>Http trigger that trigger the stored procedure</li>
</ol>
<h2>Azure Devops Release Tasks</h2>
<p style="clear: both"><img src="https://devblog.gosso.se/wp-content/uploads/2018/12/devops-backup-database.png" /></p>
<p>I?m using a the command line task to trigger the Power Shell script:</p>
<p style="clear: both"><img src="https://devblog.gosso.se/wp-content/uploads/2018/12/devops-backup-database-commandline.png" /></p>
<p>*<strong>Important</strong>* use <strong>Version 1</strong></p>
<h2>Power Shell script</h2>
<p>We are using a local PS script to request the database backup to the application. We do run this script localy because we wanted to secure the url by IP restrictions. It would be posible to run the PS script inline in an PS task in Azure devops.</p>
<h2>Azure devops backup</h2>
<h3>Azure devops backup</h3>
<p>[youtube]</p>
Azure devops backup <a href="http://remmont.com">Headlines</a> Azure devops backup
<h4>Azure devops backup</h4>
How to backup database in Azure devops pipeline A devops story of taking a backup before you release to production. Published 16th January 2019 Versions: OnPrem MS SQL Server 2005-2016
<h5>Azure devops backup</h5>
Azure devops backup <a href="http://remmont.com">Azure devops backup</a> Azure devops backup
SOURCE: <h6>Azure devops backup</h6> <a href="https://dev-ops.engineer/">Azure devops backup</a> Azure devops backup
#tags#[replace: -,-Azure devops backup] Azure devops backup#tags#
Кабринский Эдуард
online news