The following example demonstrates how to display disk usage for all volumes.
You can find the PHP file Disk_usage_for_all_volumes.php at the following locations:
- for Windows: <installdir>\apisamples
- for Linux: <installdir>/apisamples
For more information about using the Server Backup Manager API, see Access example API functions.
This PHP script finds all volumes available to the logged-in user, and then displays the following information for each volume:
- Volume ID
- Quota Type
- Soft Quota
- Hard Quota
- On Disk Size (in bytes)
- Size Of Deltas (in bytes)
- Total Delta Size (in bytes)
If the limits are exceeded, SBM displays the following messages:
- "Soft Quota has exceeded the limit"
- "Hard Quota has exceeded the limit"
This script allows you to:
- Find all volumes.
- Display information for each volume
Below, you can find the steps to take in the program user interface in order to perform the same actions as the script. We also provide you with screen-shots illustrating the scripts for every step.
Log in to the Backup Manager user interface using your username and password.
1. In the Main menu, click Volumes.
2. The Volumes list provides information about Volumes in grid format.
- Name - Name used to identify the Volume in the system. For example, to assign a Volume to the Disk Safe, you need to select a Volume name from the drop-down menu.
- Description - Additional information describing the Volume. The Description is displayed in the Volumes list.
- Volume Path - Absolute path to the directory where the Volume is located. Example: c:\main_volume, /volume1.
- Quota Type - Quotas are set to limit the disk usage of the Volume. It can be "On Disk Size" or "Size of Deltas in Disk Safe." See a detailed description in Creating Volumes.
- Soft Quota - Value in bytes, KB, MB, GB, or TB representing the threshold at which users are informed that they are close to reaching their effective data usage limit.
- Hard Quota - Value in bytes, KB, MB, GB, or TB representing the maximum amount of resources allowed to be occupied by data.
- On Disk Size - Value in bytes showing the amount of disk space occupied by the Volume.
- Deltas - Value in bytes representing the amount of data that has changed since the last backup run.
The "Details" pane provides detailed information about the Volume selected in the list.