Red Gate forums :: View topic - Take a database backup using Red Gate SQL Backup
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation

Deployment Manager PowerShell Scripts forum

Take a database backup using Red Gate SQL Backup

Search in Deployment Manager PowerShell Scripts forum
Post new topic   Reply to topic
Jump to:  
Author Message
david.conlin



Joined: 04 May 2012
Posts: 50

PostPosted: Mon Sep 02, 2013 4:38 pm    Post subject: Take a database backup using Red Gate SQL Backup Reply with quote

A lot of people want to back up their database before they deploy to it.

One way to do this using Red Gate's SQL backup tool is to package up the script below and to deploy it as a step before doing a database deployment.

Code:
& "$SqlBackupLocation\$ServerInstanceName\SQLBackupC.exe" -SQL "BACKUP DATABASE `"$RedGateDatabaseName`" TO DISK = '$BackupLocation\<auto>' WITH PASSWORD = '$Password'"


You'll need to configure the following variables in Deployment Manager for this step:

SqlBackupLocation: The place you installed SQL Backup to.

ServerInstanceName: The name of the SQL Server, as it's saved on your SQL Backup configuration

RedGateDatabaseName: The name of the database to be backed up

BackupLocation: Where to put the backup

Password: The password to encrypt the backup with.

For example:

_________________
David Conlin
Software Developer
Deployment Manager
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group