Skip to content

Commit

Permalink
DTSPO-23529 - Document Update (#388)
Browse files Browse the repository at this point in the history
* added documentation

* added image

* added images

* updated test

* changed mounting schedule text
  • Loading branch information
cpareek authored Jan 27, 2025
1 parent d1d4b65 commit 369ef56
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 1 deletion.
44 changes: 43 additions & 1 deletion source/Services/atlassian.html.md.erb
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,48 @@ Your account then should sync with Jira and Confluence and you can then able to

**5.** Change colours of the environment to differentiate between Live and Staging

### Creating Manual Backups

When we are cutting over to the new production environment, we need to take manual backups of the VMs. We have used the following script to take the manual backups:

```bash
VaultName="BK-PRD-ATL-INT-01"
ResourceGroup="RG-PRD-ATL-INT-01"
Subscription="79898897-729c-41a0-a5ca-53c764839d95"

RetainUntil=$(date -v+3d '+%d-%m-%Y')

az account set --subscription $Subscription

# List of VM names
VMNames=(
"PRDATL01ACNF02.cp.cjs.hmcts.net"
"PRDATL01ACNF04.cp.cjs.hmcts.net"
"PRDATL01ACRD01.cp.cjs.hmcts.net"
"PRDATL01AJRA01.cp.cjs.hmcts.net"
"PRDATL01AJRA02.cp.cjs.hmcts.net"
"PRDATL01AJRA03.cp.cjs.hmcts.net"
"PRDATL01DGST01.cp.cjs.hmcts.net"
"PRDATL01DGST02.cp.cjs.hmcts.net"
"PRDATL01DGST03.cp.cjs.hmcts.net"
)

# Loop through each VM name and execute the backup command
for VMName in "${VMNames[@]}"; do
ContainerName=$(az backup container list --resource-group $ResourceGroup --vault-name $VaultName --backup-management-type AzureIaasVM --query "[?properties.friendlyName=='$VMName'].{Name:name}" -o tsv)
az backup protection backup-now --container-name $ContainerName --item-name $VMName --resource-group $ResourceGroup --retain-until $RetainUntil --vault-name $VaultName --backup-management-type AzureIaasVM
done

```

Above script will take the backup of the VMs and will retain them for 3 days.

Below is the time it has taken to take the backups last time when we did it:
<img src=images/AtlassianVMBackup.png width="600">

Once the VMs are backed up, we are then able to use the latest backup to restore the VMs to the new production environment.

<img src=images/AtlassianVMBackupRestore.png width="600">

## Troubleshooting

Expand All @@ -193,6 +235,6 @@ e.g `jira_shared` should be mounted here `/var/atlassian/application-data/jira/

Please use `mount -a` command to mount them correctly.

There was problem where the share was not mounted correctly after auto shutdown, we have got cronjob on the staging VMs to run the mounting script everyday at 8am.
There was problem where the share was not mounted correctly after auto shutdown, we have got cronjob on the staging VMs to run the mounting every hour, the script checks if the Share is mounted or not and if not, it will attempt to mount it.


Binary file added source/Services/images/AtlassianVMBackup.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 369ef56

Please sign in to comment.