NAME

IBM::StorageSystem::Snapshot - Class for operations with a IBM StorageSystem snapshot objects

VERSION

Version 0.01

SYNOPSIS

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.

METHODS

device_name

Returns the name of the filesystem on which the snapshot resides (use in combination with the fileset method).

fileset_name

Returns the name of the fileset to which the snapshot applies - this will be null for filesystem level snapshots.

snapshot_id

Returns the snapshot unique ID.

rule_name

Returns the name of the rule which generated the snapshot.

status

Returns the status of the snapshot - either valid or invalid.

creation

Returns the creation time of the snapshot in the format 'YYYY-MM-DD HH:MM:SS'.

used_metadata

Returns the snapshot metadata storage usage in KB.

used_data

Returns the snapshot data storage usage in KB.

id

Returns the snapshot integer ID - note that this may not be unique on the target system.

timestamp

Returns a timestamp in the format 'YYYY-MM-DD HH:MM:SS' at which the snapshot CTDB data was last verified.

AUTHOR

Luke Poskitt, <ltp at cpan.org>

BUGS

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.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc IBM::StorageSystem::Snapshot

You can also look for information at:

ACKNOWLEDGEMENTS

LICENSE AND COPYRIGHT

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.