NetApp::Snapshot(3pm)
π NAME π
NetApp::Snapshot β it's an OO class bestie, and it's here to create and manage snapshots β¨
π SYNOPSIS π
use NetApp::Filer;
use NetApp::Snapshot;
my $filer = NetApp::Filer->new( .... );
πΈ DESCRIPTION πΈ
Okay so picture this: this class wraps up one single NetApp snapshot and just holds it, like a lil emotional support snapshot π«Ά. It's giving you methods to query stuff about the snapshot, plus methods to manage it. Both. It's a multitasker. Main character energy fr fr π
β¨ METHODS β¨
get_parent
Returns the NetApp::Aggregate or NetApp::Volume object for the aggregate or volume that this object is a snapshot of. Like, who's your parent? Found them π
get_name
Returns a string that's the name of the snapshot. Just the name. That's it, that's the method π
get_date
Returns the date the snapshot was created. Birthday info, basically π
get_used
Returns the percentage of space used by snapshot. Note: percentage of space used, not total. Don't mix them up bestie π
get_total
Returns the percentage of total space used by the snapshot. Yes this is a different number than get_used. Yes you need both. Slay π
get_snapshot_deltas
Returns an array of NetApp::Snapshot:Delta objects β each one representing a single delta for this snapshot. A whole lil squad of deltas π
get_reclaimable
Returns the amount of reclaimable space, assuming the snapshot gets deleted. ποΈ
Heads up though β experimentally, this one has a LOT of failure scenarios, and honestly most of them are reasonable (there are a lot of cases where you literally can't query this data). So, unlike most of the methods in this API, it does not raise a fatal exception when it can't query the info. It just generates warnings instead. No drama, just warnings π
rename( $newname )
Renames the snapshot to the name you specify. Glow-up, but for a snapshot β¨
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,
);
So the 'type' argument maps to the -t CLI argument, and the 'to_path' argument maps to the -r CLI argument. Go read the na_snap(1) man page and the "snap restore" documentation for the full tea β
That's the whole page bestie, no cap, every single method accounted for π«Ά This was NetApp::Snapshot(3pm), from the User Contributed Perl Documentation, running on perl v5.36.0, dated 2022-11-19. Stan a well-documented snapshot class πβ¨π
π¦ where this page comes from
- debian bookworm: libnetapp-perl 500.002-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libnetapp-perl 500.002-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libnetapp-perl 500.002-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libnetapp-perl 500.002-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libnetapp-perl 500.002-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms