Skip to content

Commit 3a6219b

Browse files
authored
Add details of EXTERNAL_CMD_TIMEOUT_SECS, fix for Acrolinx
1 parent 1ab9994 commit 3a6219b

File tree

1 file changed

+30
-30
lines changed

1 file changed

+30
-30
lines changed

articles/azure-netapp-files/azacsnap-tips.md

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -16,27 +16,27 @@ This article provides tips and tricks that might be helpful when you use AzAcSna
1616

1717
## Global override settings to control azacsnap behavior
1818

19-
AzAcSnap 8 introduced a new global settings file (`.azacsnaprc`) which must be located in the same (current working) directory as azacsnap is executed in. The filename is `.azacsnaprc` and by using the dot '.' character as the start of the filename makes it hidden to standard directory listings. The file allows global settings controlling the behavior of AzAcSnap to be set. The format is one entry per line with a supported customizing variable and a new overriding value.
19+
AzAcSnap 8 introduced a new global settings file (`.azacsnaprc`) which must be located in the same (current working) directory as azacsnap is executed in. The filename is `.azacsnaprc` and by using the dot '.' character as the start of the filename makes it hidden to standard directory listings. The file allows global settings controlling the behavior of AzAcSnap to be set. The format is one entry per line with a supported customizing variable and a new overriding value.
2020

2121
Settings, which can be controlled by adding/editing the global override settings file or by setting them as environment variables are:
2222

23-
- **AZURE_MANAGEMENT_ENDPOINT** to customize the location of the Azure Management Endpoint which AzAcSnap will make Azure REST API calls to was introduced in AzAcSnap 9a. Values should be URL paths and the default value = 'https://management.azure.com'. For example, to configure AzAcSnap to ensure all management calls go to the Azure Management Endpoint for US Govt Cloud (ref: [Azure Government Guidance for developers](/azure/azure-government/compare-azure-government-global-azure#guidance-for-developers)) add the following to the `.azacsnaprc` file:
23+
- **AZURE_MANAGEMENT_ENDPOINT** to customize the location of the Azure Management Endpoint which AzAcSnap make Azure REST API calls to was introduced in AzAcSnap 9a. Values should be URL paths and the default value = 'https://management.azure.com'. For example, to configure AzAcSnap to ensure all management calls go to the Azure Management Endpoint for US Government Cloud (ref: [Azure Government Guidance for developers](/azure/azure-government/compare-azure-government-global-azure#guidance-for-developers)) add the following to the `.azacsnaprc` file:
2424
- `AZURE_MANAGEMENT_ENDPOINT=https://management.usgovcloudapi.net`
25-
- **EXTERNAL_CMD_TIMEOUT_SECS** customizes the timeout for external shell commands. Values should be integers and the default value = 300. For example, to set the external command timeout to 10 minutes (600 seconds) add the following to the `.azacsnaprc` file:
25+
- **EXTERNAL_CMD_TIMEOUT_SECS** customizes the timeout for external shell commands. Values should be integers and the default value = 300. For example, to set the external command timeout to 10 minutes (600 seconds) add the following to the `.azacsnaprc` file:
2626
- `EXTERNAL_CMD_TIMEOUT_SECS=600`
2727

2828
> [!NOTE]
2929
> As of AzAcSnap 11, the `EXTERNAL_CMD_TIMEOUT_SECS` only applies to Db2 database commands.
3030
31-
- **MAINLOG_LOCATION** which customizes the location of the "main-log" output file, which is called `azacsnap.log` and was introduced in AzAcSnap 8. Values should be absolute paths and the default value = '.' (which is the current working directory). For example, to ensure the "main-log" output file goes to the `/home/azacsnap/bin/logs` add the following to the `.azacsnaprc` file:
31+
- **MAINLOG_LOCATION** which customizes the location of the "main-log" output file, which is called `azacsnap.log` and was introduced in AzAcSnap 8. Values should be absolute paths and the default value = '.' (which is the current working directory). For example, to ensure the "main-log" output file goes to the `/home/azacsnap/bin/logs` add the following to the `.azacsnaprc` file:
3232
- `MAINLOG_LOCATION=/home/azacsnap/bin/logs`
3333

3434
> [!NOTE]
35-
> As of AzAcSnap 9a all these values can be set as command-line environment variables as well, or instead of, the `.azacsnaprc` file. For example, on Linux the `AZURE_MANAGEMENT_ENDPOINT` can be set with `export AZURE_MANAGEMENT_ENDPOINT=https://management.usgovcloudapi.net` before running AzAcSnap.
35+
> As of AzAcSnap 9a all these values can be set as command-line environment variables as well, or instead of, the `.azacsnaprc` file. For example, on Linux the `AZURE_MANAGEMENT_ENDPOINT` can be set with `export AZURE_MANAGEMENT_ENDPOINT=https://management.usgovcloudapi.net` before running AzAcSnap.
3636
3737
## Main-log parsing
3838

39-
AzAcSnap 8 introduced a new "main-log" to provide simpler parsing of runs of AzAcSnap. The inspiration for this file is the SAP HANA backup catalog, which shows when AzAcSnap was started, how long it took, and what the snapshot name is. With AzAcSnap, this idea has been taken further to include information for each of the AzAcSnap commands, specifically the `-c` options, and the file has the following headers:
39+
AzAcSnap 8 introduced a new "main-log" to provide simpler parsing of runs of AzAcSnap. The inspiration for this file is the SAP HANA backup catalog, which shows when AzAcSnap was started, how long it took, and what the snapshot name is. With AzAcSnap, this idea is taken further to include information for each of the AzAcSnap commands, specifically the `-c` options, and the file has the following headers:
4040

4141
```output
4242
DATE_TIME,OPERATION_NAME,STATUS,SID,DATABASE_TYPE,DURATION,SNAPSHOT_NAME,AZACSNAP_VERSION,AZACSNAP_CONFIG_FILE,VOLUME
@@ -53,7 +53,7 @@ When AzAcSnap is run it appends to the log the appropriate information depending
5353
2023-03-29T16:13:33.1806098+13:00,details,SUCCESS,PR1,Hana,0:00:03.1380686,,8,PR1.json,(data)HANADATA_P;(data)HANASHARED_P;(data)VGvol01;(other)HANALOGBACKUP_P;
5454
```
5555

56-
This format makes the file parse-able with the Linux commands `watch`, `grep`, `head`, `tail`, and `column` to get continuous updates of AzAcSnap backups. An example combination of these commands in single shell script to monitor AzAcSnap is as follows:
56+
This format makes the file parse-able with the Linux commands `watch`, `grep`, `head`, `tail`, and `column` to get continuous updates of AzAcSnap backups. An example combination of these commands in single shell script to monitor AzAcSnap is as follows:
5757

5858
```bash
5959
#!/bin/bash
@@ -138,9 +138,9 @@ DATE_TIME OPERATION_NAME STATUS DATABASE_TYPE SID DUR
138138

139139
## Limit service principal permissions
140140

141-
It may be necessary to limit the scope of the AzAcSnap service principal. Review the [Azure RBAC documentation](../role-based-access-control/index.yml) for more details on fine-grained access management of Azure resources.
141+
It may be necessary to limit the scope of the AzAcSnap service principal. Review the [Azure Role Based Access Control documentation](../role-based-access-control/index.yml) for more details on fine-grained access management of Azure resources.
142142

143-
The following is an example role definition with the minimum required actions needed for AzAcSnap to function.
143+
The following Azure CLI example provides a role definition with the minimum required actions needed for AzAcSnap to function.
144144

145145
```azurecli
146146
az role definition create --role-definition '{ \
@@ -159,7 +159,7 @@ az role definition create --role-definition '{ \
159159
}'
160160
```
161161

162-
For restore options to work successfully, the AzAcSnap service principal also needs to be able to create volumes. In this case, the role definition needs an extra "Actions" clause added, therefore the complete service principal should look like the following example.
162+
For restore options to work successfully, the AzAcSnap service principal also needs to be able to create volumes. In this case, the role definition needs an extra "Actions" clause added, therefore the complete service principal should look like the following example.
163163

164164
```azurecli
165165
az role definition create --role-definition '{ \
@@ -182,7 +182,7 @@ az role definition create --role-definition '{ \
182182

183183
## Take snapshots manually
184184

185-
Before executing any backup commands (`azacsnap -c backup`), check the configuration by running the test commands and verify they get executed successfully. Correct execution of these tests proved `azacsnap` can communicate with the installed SAP HANA database and the underlying storage system of the SAP HANA on **Azure Large Instance** or **Azure NetApp Files** system.
185+
Before executing any backup commands (`azacsnap -c backup`), check the configuration by running the test commands and verify they get executed successfully. Correct execution of these tests proved `azacsnap` can communicate with the installed SAP HANA database and the underlying storage system of the SAP HANA on **Azure Large Instance** or **Azure NetApp Files** system.
186186

187187
- `azacsnap -c test --test hana`
188188
- `azacsnap -c test --test storage`
@@ -211,15 +211,15 @@ MAILTO=""
211211
@daily (. /home/azacsnap/.profile ; cd /home/azacsnap/bin ; azacsnap -c backup --volume other --prefix DailyBootVol --retention=7 --configfile boot-vol.json)
212212
```
213213

214-
Explanation of the above crontab.
214+
Explanation of the example crontab output.
215215

216-
- `MAILTO=""`: by having an empty value this prevents cron from automatically trying to email the local Linux user when executing the crontab entry.
216+
- `MAILTO=""`: by having an empty value for MAILTO cron will not try to email the local Linux user when executing the crontab entry.
217217
- Shorthand versions of timing for crontab entries are self-explanatory:
218218
- `@monthly` = Run once a month, that is, "0 0 1 * *".
219219
- `@weekly` = Run once a week, that is, "0 0 * * 0".
220220
- `@daily` = Run once a day, that is, "0 0 * * *".
221221
- `@hourly` = Run once an hour, that is, "0 * * * *".
222-
- The first five columns are used to designate times, refer to the following column examples:
222+
- The first five columns are used to designate times. Refer to the following column examples:
223223
- `0,15,30,45`: Every 15 minutes
224224
- `0-23`: Every hour
225225
- `*` : Every day
@@ -242,7 +242,7 @@ generated successfully.
242242

243243
AzAcSnap writes output of its operation to log files to assist with debugging and to validate correct operation. These log files continue to grow unless actively managed. Fortunately UNIX based systems have a tool to manage and archive log files called logrotate.
244244

245-
The following output provides an example configuration for logrotate. This configuration keeps a maximum of 31 logs (approximately one month), and when the log files are larger than 10k it rotates them by renaming with a number added to the filename and compresses them.
245+
The following output provides an example configuration for logrotate. This configuration keeps a maximum of 31 logs, approximately one month. When the log files are larger than 10k it rotates them by renaming with a number added to the filename and compresses them.
246246

247247
```output
248248
# azacsnap logrotate configuration file
@@ -254,7 +254,7 @@ compress
254254
}
255255
```
256256

257-
After the `logrotate.conf` file has been created, the `logrotate` command should be run regularly to archive AzAcSnap log files accordingly. Automating the `logrotate` command can be done using cron. The following output is one line of the azacsnap user's crontab, this example runs logrotate daily using the configuration file `~/logrotate.conf`.
257+
After the `logrotate.conf` file is created, the `logrotate` command should be run regularly to archive AzAcSnap log files accordingly. Automating the `logrotate` command can be done using cron. The following output is one line of the azacsnap user's crontab, this example runs logrotate daily using the configuration file `~/logrotate.conf`.
258258

259259
```output
260260
@daily /usr/sbin/logrotate -s ~/logrotate.state ~/logrotate.conf >> ~/logrotate.log
@@ -292,7 +292,7 @@ The following conditions should be monitored to ensure a healthy system:
292292
1. Consistency of the snapshots by restoring them to another system periodically.
293293

294294
> [!NOTE]
295-
> To list snapshot details, execute the command `azacsnap -c details`.
295+
> To list snapshot details, execute the command `azacsnap -c details`.
296296
297297
## Delete a snapshot
298298

@@ -303,7 +303,7 @@ To delete a snapshot, use the command `azacsnap -c delete`. It's not possible to
303303
304304
## Restore a snapshot
305305

306-
A storage volume snapshot can be restored to a new volume (`-c restore --restore snaptovol`). For Azure Large Instance, the volume can be reverted to a snapshot (`-c restore --restore revertvolume`).
306+
A storage volume snapshot can be restored to a new volume (`-c restore --restore snaptovol`). For Azure Large Instance, the volume can be reverted to a snapshot (`-c restore --restore revertvolume`).
307307

308308
> [!NOTE]
309309
> There is **NO** database recovery command provided.
@@ -313,16 +313,16 @@ copy is made (`cp /hana/data/H80/mnt00001/.snapshot/hana_hourly.2020-06-17T11304
313313

314314
For Azure Large Instance, you could contact the Microsoft operations team by opening a service request to restore a desired snapshot from the existing available snapshots. You can open a service request via the [Azure portal](https://portal.azure.com).
315315

316-
If you decide to perform the disaster recovery failover, the `azacsnap -c restore --restore revertvolume` command at the DR site automatically makes available the most recent (`/hana/data` and `/hana/logbackups`) volume snapshots to allow for an SAP HANA recovery. Use this command with caution as it breaks replication between production and DR sites.
316+
If you decide to perform the disaster recovery failover, the `azacsnap -c restore --restore revertvolume` command at the Disaster Recovery (DR) site automatically makes available the most recent (`/hana/data` and `/hana/logbackups`) volume snapshots to allow for an SAP HANA recovery. Use this command with caution as it breaks replication between production and DR sites.
317317

318318
## Set up snapshots for 'boot' volumes only
319319

320320
> [!IMPORTANT]
321321
> This operation applies only to Azure Large Instance.
322322
323-
In some cases, customers already have tools to protect SAP HANA and only want to configure 'boot' volume snapshots. In this case, only the following steps need to be completed.
323+
In some cases, customers already have tools to protect SAP HANA and only want to configure 'boot' volume snapshots. In this case, only the following steps need to be completed.
324324

325-
1. Complete steps 1-4 of the pre-requisites for installation.
325+
1. Complete steps 1-4 of the prerequisites for installation.
326326
1. Enable communication with storage.
327327
1. Download and run the installer to install the snapshot tools.
328328
1. Complete setup of snapshot tools.
@@ -340,7 +340,7 @@ In some cases, customers already have tools to protect SAP HANA and only want to
340340
3 entries were displayed.
341341
```
342342
> [!NOTE]
343-
> In this example, this host is part of a 3 node Scale-Out system and all 3 boot volumes can be seen from this host. This means all 3 boot volumes can be snapshot from this host, and all 3 should be added to the configuration file in the next step.
343+
> In this example, this host is part of a three node Scale-Out system and all 3 boot volumes can be seen from this host. This setup means all three boot volumes can be snapshot from this host, and all three should be added to the configuration file in the next step.
344344

345345
1. Create a new configuration file as follows. The boot volume details must be in the OtherVolume stanza:
346346
```bash
@@ -376,7 +376,7 @@ In some cases, customers already have tools to protect SAP HANA and only want to
376376
377377
Editing configuration complete, writing output to 'BootVolume.json'.
378378
```
379-
1. Check the config file, refer to the following example:
379+
1. Check the config file. Refer to the following example:
380380
381381
Use `cat` command to display the contents of the configuration file:
382382
@@ -435,7 +435,7 @@ In some cases, customers already have tools to protect SAP HANA and only want to
435435
azacsnap -c backup --volume other --prefix TestBootVolume --retention 1 --configfile BootVolume.json
436436
```
437437
438-
1. Check it's listed, note the addition of the `--snapshotfilter` option to limit the snapshot list returned.
438+
1. Check the snapshot has been created by listing the snapshots using the `-c details` option. Note the addition of the `--snapshotfilter` option to limit the snapshot list returned.
439439
440440
```bash
441441
azacsnap -c details --snapshotfilter TestBootVolume --configfile BootVolume.json
@@ -461,8 +461,8 @@ In some cases, customers already have tools to protect SAP HANA and only want to
461461
## Restore a 'boot' snapshot
462462
463463
> [!IMPORTANT]
464-
> This operation is for Azure Large Instance ony.
465-
> The Server will be restored to the point when the Snapshot was taken.
464+
> This operation is for Azure Large Instance only.
465+
> The Server gets restored to the point when the Snapshot was taken.
466466
467467
A 'boot' snapshot can be recovered as follows:
468468
@@ -479,18 +479,18 @@ No other steps to be performed after the restore.
479479
Key attributes of storage volume snapshots:
480480
481481
- **Location of snapshots**: Snapshots can be found in a virtual directory (`.snapshot`) within the
482-
volume. See the following examples for **Azure Large Instance**:
482+
volume. See the following examples for **Azure Large Instance** (ALI):
483483
- Database: `/hana/data/<SID>/mnt00001/.snapshot`
484484
- Shared: `/hana/shared/<SID>/.snapshot`
485485
- Logs: `/hana/logbackups/<SID>/.snapshot`
486-
- Boot: boot snapshots for HLI are **not visible** from OS level, but can be listed using `azacsnap -c details`.
486+
- Boot: boot snapshots for ALI are **not visible** from OS level, but can be listed using `azacsnap -c details`.
487487
488488
> [!NOTE]
489-
> `.snapshot` is a read-only hidden *virtual* folder providing read-only access to the snapshots.
489+
> `.snapshot` is a read-only hidden *virtual* folder providing read-only access to the snapshots.
490490
491491
- **Max snapshot:** The hardware can sustain up to 250 snapshots per volume. The snapshot
492492
command keeps a maximum number of snapshots for the prefix based on the retention
493-
set on the command line. Any more snapshots, beyond the retention number with the same prefix, are deleted.
493+
set on the command line. Any more snapshots, beyond the retention number with the same prefix, are deleted.
494494
- **Snapshot name:** The snapshot name includes the prefix label provided by the customer.
495495
- **Size of the snapshot:** Depends upon the size/changes on the database level.
496496
- **Log file location:** Log files generated by the commands are output into folders as

0 commit comments

Comments
 (0)