diff --git a/README.md b/README.md index 9adcc3f..54e09ee 100644 --- a/README.md +++ b/README.md @@ -360,6 +360,9 @@ the databases)**. ##### Azure +Visit https://portal.azure.com/ All the resources we used are defined in a +`rapid-prereview` resource group. + 1. Install Azure CLI (see https://docs.microsoft.com/en-us/cli/azure/?view=azure-cli-latest) 2. Run `az login` to login to the CLI @@ -386,10 +389,8 @@ Some basic info about the service health can be found at https://rapid-prereview Backups are stored in a blob storage container on azure. -- Install AzCopy see - https://docs.microsoft.com/en-us/azure/storage/common/storage-use-azcopy-v10 - (on a mac you can put the binary in `/usr/local/bin` so it's available in the - PATH. -- run `azcopy login` to authenticate -- run `npm run backup` **Be aware that this will source the production +1. Install Azure CLI (see + https://docs.microsoft.com/en-us/cli/azure/?view=azure-cli-latest) +2. Run `az login` to login to the CLI +3. Run `npm run backup` **Be aware that this will source the production environment variables.** diff --git a/backup.sh b/backup.sh index cb04c61..b6de948 100755 --- a/backup.sh +++ b/backup.sh @@ -2,7 +2,14 @@ COUCH_URL=${COUCH_PROTOCOL}//${COUCH_USERNAME}:${COUCH_PASSWORD}@${COUCH_HOST}:${COUCH_PORT} -## TODO pipe to azcopy npx couchbackup --url ${COUCH_URL} --db rapid-prereview-index | gzip > rapid-prereview-index.txt.gz npx couchbackup --url ${COUCH_URL} --db rapid-prereview-docs | gzip > rapid-prereview-docs.txt.gz npx couchbackup --url ${COUCH_URL} --db rapid-prereview-users | gzip > rapid-prereview-users.txt.gz + +az storage blob upload --account-name rapidprereviewprivate --container-name "rapid-prereview-backups" --name "rapid-prereview-index.txt.gz" --file "rapid-prereview-index.txt.gz" +az storage blob upload --account-name rapidprereviewprivate --container-name "rapid-prereview-backups" --name "rapid-prereview-docs.txt.gz" --file "rapid-prereview-docs.txt.gz" +az storage blob upload --account-name rapidprereviewprivate --container-name "rapid-prereview-backups" --name "rapid-prereview-users.txt.gz" --file "rapid-prereview-users.txt.gz" + +rm rapid-prereview-index.txt.gz +rm rapid-prereview-docs.txt.gz +rm rapid-prereview-users.txt.gz