7 8
9
10 11
debug backup restore
on 2:33 PM Jul 5 2024
8
9
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
name: Restore (full)
args:
-
name: backup.blob
label: Backup to restore
input_type: text
python_type: str
placeholder: Enter blob id
meta:
seals:
- urn/seal/user/svnplace/Backup - Full
- "{repo.seal.api_id}"
allow_write: false
role:
policies:
- urn/api/policy/svnplace/Allow Everything
parents:
- urn/api/role/{user.username}/
- urn/api/role/svnplace/Backup Restorer
jobs:
setup:
steps:
-
name: Setup
python: |
blob = '{escape(backup.blob)}'
print(f'Restoring backup {{blob} to {repo.urn}')
from datetime import datetime, timezone
import os
import subprocess
from api_api import API
api = API('https://svnplace.com/api', ['~/.svnplace/config'])
root = api.repos.create_reporepository(
repo='{repo.urn}',
kind='BackupRestoration',
name='Restore$'+datetime.now(timezone.utc).strftime('%Y%m%d_%H%M.%f'),
process='urn/process/process/svnplace/processes/8/repo_from_backup.yaml',
input={{'blob': blob},
)
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
name: Restore (full)
args:
-
name: backup.blob
label: Backup to restore
input_type: text
python_type: str
placeholder: Enter blob id
meta:
seals:
- urn/seal/user/svnplace/Backup - Full
- "{repo.seal.api_id}"
allow_write: false
role:
policies:
- urn/api/policy/svnplace/Allow Everything
parents:
- urn/api/role/{user.username}/
- urn/api/role/svnplace/Backup Restorer
jobs:
setup:
steps:
-
name: Setup
python: |
blob = '{escape(backup.blob)}'
print(f'Restoring backup {{blob} to {repo.urn}')
from datetime import datetime, timezone
import os
import subprocess
from api_api import API
api = API('https://svnplace.com/api', ['~/.svnplace/config'])
root = api.repos.create_reporepository(
repo='{repo.urn}',
kind='BackupRestoration',
name='Restore$'+datetime.now(timezone.utc).strftime('%Y%m%d_%H%M.%f'),
process='urn/process/process/svnplace/processes/9/repo_from_backup.yaml',
input={{'blob': blob},
)