This post is more than 5 years old
5 Practitioner
•
274.2K Posts
0
3460
Isilon REST API - Reverting a Snapshot
The administration guide states that Isilon supports reverting of the snapshot and extracting a single file out of a snapshot. But, I couldn’t find a REST API for that in the platform API Guide.
1. How to revert a snapshot of a folder through REST API? Also, what is the CLI equivalent of that?
2. Is there an API to extract a single file from a snapshot?
bhalilov1
114 Posts
0
May 28th, 2013 07:00
1. The current version of API does not have revert snapshot.
the cli is
create protection domain for the path you plan to revert snapshots to
# isi job start DomainMark --domroot=/ifs/test --domtype=snaprevert
Added job [3653]
wait until domain mark job is completed :
# isi domain list
Root Path | Type
-----------+-------------------------------
/ifs/test1 | SyncIQ,Writable
/ifs/test | Writable,SnapRevert,Incomplete
nyst0087-2# isi domain list
Root Path | Type
-----------+--------------------
/ifs/test1 | SyncIQ,Writable
/ifs/test | Writable,SnapRevert
create snapshot schedule using the path above :
#isi snapshot schedules create test /ifs/test test_%Y-%m-%d-_%H-%M --schedule="Every day"
To revert :
find snapshot ID you want to revert to
#isi snapshot list
run snaprevert job
#isi job start snaprevert --snapid 1459
ntomar12
6 Posts
0
June 16th, 2020 23:00
@bhalilov1 @Anonymous
Is there any REST API available to restore/revert a snapshot
in any SDK
I am using isi_sdk_8_2_2
DELL-Sam L
Moderator
Moderator
•
7.1K Posts
0
June 17th, 2020 15:00
Hello ntomar12,
Looking at the latest API reference guide I am not seeing that as an option. https://dell.to/3d6nA7O
Please let us know if you have any other questions.
Peter_Sero
1.2K Posts
0
June 18th, 2020 08:00
@ntomar12
Looks I have better news...
In the solution above you can see that reverting a snapshot is done through a JobEngine job, which is launched with a "isi job" subcommand rather than an "isi snapshot" subcommand.
The starting point in the SDK would therefore be JobJobCreateParams.
I tested it -- not using the SDK, but accessing the API directly -- by POSTing to
https://ISILON:8080/platform/1/job/jobs
with JSON data something like
{"type": "Snaprevert", "snaprevert_params": {"snapid": 888}}
and that worked perfectly.
hth
-- Peter
ntomar12
6 Posts
0
June 25th, 2020 03:00
Hi @DELL-Sam L I have setup simulator for oneFs version 8.2.1.0
when I am performing Restore I am getting bellow error
{ 'JE/Errors':'[ 20-06-25 15:36:13 SnapRevert[119] Node 1 (1) task 2-1: Error locating ready snapshot revert or synciq domain for snapshot ]', 'JE/Time working':'61', 'JE/Time elapsed':'61', 'JE/Error Count':'1', 'Snapshot ID':'4', 'JE/Group at phase end':'[ \'<1,6> :{ 1-3:0-19, smb: 1-3, nfs: 1-3, all_enabled_protocols: 1-3, isi_cbind_d: 1-3, lsass: 1-3 }\' ]'
do you have any idea?
Peter_Sero
1.2K Posts
0
June 29th, 2020 05:00
Have you created the revert domain as shown in the solution, BEFORE taking the snaphot?
-- Peter
ntomar12
6 Posts
0
July 13th, 2020 05:00
@Peter_Sero after creating domain mark it works
ntomar12
6 Posts
0
July 13th, 2020 05:00
@Peter_Sero Thanks it is working
I have one query related to job API
when we pool on job_id to get the status of job.
If job API fails it doesn't give a proper error
is there any way to get the error message?
{'control_state': None,
'create_time': 1594644009,
'current_phase': 1,
'description': '',
'end_time': 1594644074,
'human_desc': '',
'id': 18,
'impact': 'Low',
'participants': [1, 2, 3, 4],
'paths': None,
'policy': 'LOW',
'priority': 5,
'progress': 'Started',
'retries_remaining': 0,
'running_time': 64,
'start_time': 1594644010,
'state': 'failed',
'total_phases': 1,
'type': 'SnapRevert',
'waiting_on': None,
'waiting_reason': None}
tenortim
36 Posts
0
July 23rd, 2020 12:00
Of note, although there isn't a single API endpoint for this set of commands, they can all be automated via the API.
If you want to automate CLI commands, a helpful headstart is to run them with "isi --debug" which will show the REST request and response.