blob: 7f2b4f6a37199b08123c11732b8723073f852858 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
---
tags:
- work
- provisioning
---
Sections marked with '!' are not found in Tevins confluence doc
## Create the tenant (customer)
CustomerManager::create($username);
**Create tenant**:
- parent_id : parent tenant (find with api client id) (ParentFinder)
- kind : customer
- name: username
**Bind application**:
- Tenant uuid
- BACKUP_UUID = '6e6d758d-8e74-3ae3-ac84-50eb0dff12eb'
**Enable services** !
- Sets "offering items" (OfferingItemName)
**Activate customer**:
- Get pricing
- Update pricing mode to 'production'
## Create the user (credentials)
CustomerManager::createUser(tenant, email, first_name, last_name)
**Create user**:
- tenant id
- login : tenant username
- contact info
**Update user policies**:
- tenant id
- trustee type: 'user'
- trustee id: user_id
- role id: 'backup_user'
## Activate user
**Set password**:
- user id
- password
**Accept ToS** !
- tenant uuid
**Add backup plans** !
- backup plan (AddPlans.php#53, see models/Backup.php) (see template)
- interval : 24 hrs (1 per day)
- post data command `{"command": "\/usr\/lib\/Acronis\/BackupAndRecovery\/webcppostcapture", "commandArguments": "{RESOURCE_ID}", "continueOnCommandError": false, "waitCommandComplete": true, "workingDirectory": ""}`
- pre data command `{"command": "\/usr\/lib\/Acronis\/BackupAndRecovery\/webcpprecapture", "commandArguments": "{RESOURCE_ID}", "continueOnCommandError": false, "waitCommandComplete": true, "workingDirectory": ""}`
Make sure to store the ID!
## Schedule backups
This can only finish successfully after Puppet has installed the Acronis Agent and that agent registered itself with Acronis.
**Poll for a machine id** (that way we know the agent is registered) (CustomerManager.php#375)
- BackupConsole::getResources
- Filter on type == 'machine'
- getId
We want 1 (our) backup plan active so therefore we:
**Revoke all plans** (CustomerManager.php#354)
- BackupConsole::getBackupPlans
- foreach BackupConsole::revokeBackupPlan
**Add resources to plan** (CustomerManager.php#289)
- impersonate/authenticate
- apply backup plan:
- plan id
- machine id
|