---
name: "NetApp::Snapshot"
section: "3pm"
platform: "linux"
package: "libnetapp-perl"
version: "500.002-3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/NetApp::Snapshot"
---

# NetApp::Snapshot(3pm)

## NAME

NetApp::Snapshot -- OO class for creating and managing snapshots

## SYNOPSIS

```
    use NetApp::Filer;
    use NetApp::Snapshot;
    my $filer   = NetApp::Filer->new( .... );
```

## DESCRIPTION

This class encapsulates a single NetApp snapshot, and provides methods for querying information about the snapshot, as well as methods for managing it.

## METHODS

### get\_parent

Returns the NetApp::Aggregate or NetApp::Volume object for the aggregate or volume for which object is a snapshot.

### get\_name

Returns a string representing the name of the snapshot.

### get\_date

Returns the date the snapshot was created.

### get\_used

Returns the percentage of space used by snapshot.

### get\_total

Returns the percentage of total space used by the snapshot.

### get\_snapshot\_deltas

Returns an array of NetApp::Snapshot:Delta objects, each representing a single delta for this snapshot.

### get\_reclaimable

Returns the amount of reclaimable space, if the snapshot is deleted. Note that experimentally, this command has a lot of failure scenarios, most of which are reasonable (there are a lot of cases where you can't query this data).  Therefore, unlike most of the methods in this API, it doesn't raise a fatal exception if it can't query the information, it simply generates warnings.

### rename( $newname )

Renames the snapshot to the specified name.

### restore( %args )

This method is an interface to the "snap restore" command.  The argument syntax is:

```
    $snapshot->restore(
        type            => 'vol' | 'file', # Defaults to vol
        from_path       => $from_path,
        to_path         => $to_path,
    );
```

The 'type' argument maps to the -t CLI argument, and the 'to\_path' argument maps to the -r CLI argument.  Refer to the **na\_snap**(1) man page, and the "snap restore" documentation for further information.
