Options

Take a database backup using Red Gate SQL Backup

david.conlindavid.conlin Posts: 53
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.
& "$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:
backup-variables.jpg
David Conlin
Software Developer
Deployment Manager
Sign In or Register to comment.