ONTAP Discussions

How to restore a directory from snapshot

ACHOU_SIMG

ONTAP 9.1RC1

 

Hi,

 

Is there a way to easily restore a directory in a volume from snapshots without involving clients (e.g. cp)? The volume is exported via NFS only and the directory contains many subdirectories and files. It looks like snapshot restore-file only applies to single file. Its man page says:

 

The command fails if you try to restore directories (and their contents).

 

Thanks,

1 ACCEPTED SOLUTION

robinpeter

Directry level restore is not possible form snapshots.

 

the easiest way is browse though the snapshot, find the directory you want.

copy and paste-replace or copy as paste-new-dir-name.

 

If the copy operation going to take a while, ill recommend you rename the snapshots

In Ontap 7-Mode snapshots are named hourly.0 or daily.0

if the copy operation going to take more than hour, before it complete your hourly.0 could 

renamed to hourly.1 by ontap, and your copy operation will fail. To avoid that rename the snapshot to something thats not use by ontap.

 

robin.

 

 

View solution in original post

1 REPLY 1

robinpeter

Directry level restore is not possible form snapshots.

 

the easiest way is browse though the snapshot, find the directory you want.

copy and paste-replace or copy as paste-new-dir-name.

 

If the copy operation going to take a while, ill recommend you rename the snapshots

In Ontap 7-Mode snapshots are named hourly.0 or daily.0

if the copy operation going to take more than hour, before it complete your hourly.0 could 

renamed to hourly.1 by ontap, and your copy operation will fail. To avoid that rename the snapshot to something thats not use by ontap.

 

robin.

 

 

View solution in original post

Announcements
NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner
Public