The following example demonstrates how to create a volume, a Power-User account assigned to this volume, and a server assigned to this user. In this case, Power-Users are allowed to create Sub-Users.
A PHP file called Volumes_With_Limits_Power_User_With_Sub_User_Allowed.php can be found here:
- for Windows: <installdir>\apisamples
- for Linux: <installdir>/apisamples
Read more in Access example API functions.
The PHP script creates objects with the defined options in the system and prints the following messages on the screen:
- "Successfully created volume" or "Failed to create volume"
- "Successfully created power user" or "Failed to create power user"
- "Successfully created agent" or "Failed to create agent"
The following steps can be accomplished by using this script:
- Create a Volume.
- Create a Power User with attributes. Assign the Volume to the newly created Power User.
- Create a Server. Make the newly created Power User its owner.
Below, you can find the steps to perform these actions using the program user interface. Screen shots are provided to illustrate the scripts for each step.
Log in to the Backup Manager user interface using your username and password.
1. In the Main menu, click Volumes.
2. Then click "Create New Volume" in the Volumes menu, located in the top left area of the interface.
3. Define the following Identification options:
- Name - Volume 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 - New or existing folder. The assigned Disk Safes will be placed in this folder.
4. Define the "Replication Limit" as "Hourly," and specify the "Soft Quota" and "Hard Quota." Set the "Allow File Excludes" option to "True" and click "Save."
5. Click "OK" in the "Warning" window to create a directory.
6. Click "OK" in the "Success" window to complete the process.
1. In the Main menu, click Users.
2. In the "Users" menu, click on "Create New User."
3. Define the new User properties in this window:
- Username - Enter User login name.
- Password - Enter a password for the User account.
- Confirm Password - Reenter the same password for the User account.
- Email Address - Enter email address of the User.
- User Type - Choose the type of User: Power-User. The Power-User has the option to assign Sub-Users.
Select the following check-boxes:
- User can create and administrate sub-users
- Restrict maximum sub-user count (Set to "2").
- User can create and administrate servers
- Restrict maximum server count (Set to "2").
4. Add the previously created Volume in the "Volumes" tab.
5. Click "Create"
6. Click "OK" in the "Success" window.
1. In the Main menu, click Servers.
2. Then click "Add Server" in the Agents menu, located in the top left area of the interface.
3. The "Add Server" window will appear. You will need to define the following options:
- Server Name - Enter a name for the Server. It will be displayed in the "Servers" List. In this case, it is "agentDescription."
- Host Name/IP - Enter the Host Name or IP address of the Server. In this case, it is 127.0.0.1.
- Port Number - Define a Port to connect to the Server, if different from the default value (1167).
To assign an Server owner, choose the previously created Power User from the drop-down list and set permissions to "Full Control".
4. Click "Create".
5. Click "OK" in the "Success" window.