Highlighted
Not applicable

Isilon REST API - Reverting a Snapshot

Jump to solution

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?


0 Kudos
1 Solution

Accepted Solutions
Highlighted
3 Argentum

Re: Isilon REST API - Reverting a Snapshot

Jump to solution

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

View solution in original post

0 Kudos
9 Replies
Highlighted
3 Argentum

Re: Isilon REST API - Reverting a Snapshot

Jump to solution

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

View solution in original post

0 Kudos
Highlighted
2 Bronze

Re: Isilon REST API - Reverting a Snapshot

Jump to solution

@bhalilov1  @smithamave 
Is there any REST API available to restore/revert a snapshot
in any SDK 
I am using isi_sdk_8_2_2

0 Kudos
Highlighted
Moderator
Moderator

Re: Isilon REST API - Reverting a Snapshot

Jump to solution

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.

DELL-Sam L
Dell | Social Outreach Services - Enterprise
Download the Dell Quick Resource Locator app today to access PowerEdge support content on your mobile device! (iOS, Android, Windows)

0 Kudos
Highlighted
2 Bronze

iRe: Isilon REST API - Reverting a Snapshot

Jump to solution

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?

 

0 Kudos
Highlighted
4 Beryllium

Re: iRe: Isilon REST API - Reverting a Snapshot

Jump to solution

Have you created the revert domain as shown in the solution, BEFORE taking the snaphot?

-- Peter

 

 

0 Kudos
Highlighted
2 Bronze

Re: iRe: Isilon REST API - Reverting a Snapshot

Jump to solution

@Peter_Sero  after creating domain mark it works 

0 Kudos
Highlighted
4 Beryllium

Re: Isilon REST API - Reverting a Snapshot

Jump to solution

@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

0 Kudos
Highlighted
2 Bronze

Re: Isilon REST API - Reverting a Snapshot

Jump to solution

@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}

 

 

0 Kudos
Highlighted
2 Iron

Re: Isilon REST API - Reverting a Snapshot

Jump to solution

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.

0 Kudos