IBM::StorageSystem::Snapshot - Class for operations with a IBM StorageSystem snapshot objects
Version 0.01
IBM::StorageSystem::Snapshot is a class for operations with a IBM StorageSystem snapshot objects.
use IBM::StorageSystem; my $ibm = IBM::StorageSystem->new( user => 'admin', host => 'my-v7000', key_path => '/path/to/my/.ssh/private_key' ) or die "Couldn't create object! $!\n"; # Print a list of all snapshots tabularly ordered by file system and fileset, # including the age of each snapshot in days. use Date::Calc qw(Today Delta_Days); my ( $y, $m, $d ) = Today; foreach my $filesystem ( $ibm->get_filesystems ) { print "Filesystem: ". $filesystem->device_name ."\n"; foreach my $fileset ( $filesystem->get_filesets ) { print "\tFileset : ". $fileset->name ."\n"; foreach my $snapshot ( $fileset->get_snapshots ) { my $dd = Delta_Days( ( split /-/, ( split / /, $snapshot->creation )[0], 3 ), $y, $m, $d ); print "\t\tSnapshot ID: ". $snapshot->id ." is $dd days old\n" } } } # Prints something like: # Filesystem: fs1 # Fileset : root # Fileset : share-dlf # Snapshot ID: 2790 is 0 days old # Snapshot ID: 2742 is 0 days old # Snapshot ID: 2693 is 1 days old # Snapshot ID: 2645 is 1 days old # Snapshot ID: 2597 is 1 days old # Snapshot ID: 2550 is 1 days old # Snapshot ID: 2456 is 2 days old # Snapshot ID: 2409 is 2 days old # Snapshot ID: 2362 is 2 days old # Snapshot ID: 2314 is 3 days old # ... etc.
Returns the name of the filesystem on which the snapshot resides (use in combination with the fileset method).
Returns the name of the fileset to which the snapshot applies - this will be null for filesystem level snapshots.
Returns the snapshot unique ID.
Returns the name of the rule which generated the snapshot.
Returns the status of the snapshot - either valid or invalid.
Returns the creation time of the snapshot in the format 'YYYY-MM-DD HH:MM:SS'.
Returns the snapshot metadata storage usage in KB.
Returns the snapshot data storage usage in KB.
Returns the snapshot integer ID - note that this may not be unique on the target system.
Returns a timestamp in the format 'YYYY-MM-DD HH:MM:SS' at which the snapshot CTDB data was last verified.
Luke Poskitt, <ltp at cpan.org>
<ltp at cpan.org>
Please report any bugs or feature requests to bug-ibm-v7000-snapshot at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=IBM-StorageSystem-Snapshot. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-ibm-v7000-snapshot at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc IBM::StorageSystem::Snapshot
You can also look for information at:
RT: CPAN's request tracker (report bugs here)
http://rt.cpan.org/NoAuth/Bugs.html?Dist=IBM-StorageSystem-Snapshot
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/IBM-StorageSystem-Snapshot
CPAN Ratings
http://cpanratings.perl.org/d/IBM-StorageSystem-Snapshot
Search CPAN
http://search.cpan.org/dist/IBM-StorageSystem-Snapshot/
Copyright 2013 Luke Poskitt.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
To install IBM::StorageSystem, copy and paste the appropriate command in to your terminal.
cpanm
cpanm IBM::StorageSystem
CPAN shell
perl -MCPAN -e shell install IBM::StorageSystem
For more information on module installation, please visit the detailed CPAN module installation guide.