NetApp::Snapshot(3pm)

πŸ“¦
version 500.002 Β· 2 versions
  • 500.002 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 500.002 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– 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