Skip to content

Instantly share code, notes, and snippets.

@jhauge
Created May 7, 2014 11:14
Show Gist options
  • Save jhauge/683555734fb1d16183bd to your computer and use it in GitHub Desktop.
Save jhauge/683555734fb1d16183bd to your computer and use it in GitHub Desktop.
Backup umbraco.io db
# Backup your umbraco.io db to local machine with this powershell script
# based on a connection string looking like this
# server=xxxxxx.database.windows.net,1433;database=xxxxxx;user id=xxxxxx;password=xxxxxx
#
$dbserver = 'xxxxxx.database.windows.net,1433'
$dbname = 'xxxxxx'
$username = 'xxxxxx'
$password = 'xxxxxx!'
$timestamp = Get-Date -Format 'yyyyMMddTHHmmss'
& sqlpackage /a:export /ssn:"$dbserver" /sdn:"$dbname" /su:"$username" /sp:"$password" /tf:"xxxprojectnamexxx-$timestamp.bacpac"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment