- Community Home
- >
- Storage
- >
- HPE Nimble Storage
- >
- Array Setup and Networking
- >
- Re: Need Command Line to delete Volume Collection ...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-10-2015 07:30 AM
тАО06-10-2015 07:30 AM
I am using Volume collections for our Oracle Volumes and performing snapshots using the CLi to do Begin/End Backup Mode.
The naming of the snapshots is dynamic to include date/time info. I need a way to delete old snapshots via command line.
I would like to keep a max of 15 snapshots, I take snapshots every 15 mins.
Regards
Juan C. Irizarry
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-11-2015 06:21 AM
тАО06-11-2015 06:21 AM
Re: Need Command Line to delete Volume Collection Snapshots based on date or age of the snapshot.
Juan,
The "CLI Reference Guide" can be found on InfoSight. Once you login to InfoSight, click on the download icon in the top right portion of the page. Under the "Nimble OS" tab, select your software version and then select the "CLI Reference Guide" below. In this document, you will find the commands needed to manage your array. The information you are looking for will probably be in Chapter 36 (~page 259.)
Regards,
Robert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-18-2015 07:46 AM
тАО06-18-2015 07:46 AM
SolutionIf your snapshots follow a specific naming scheme you could use the snapshot collection list to find the ones you want to remove. For example the following line will find all the snapshots that are in the VMware volume collection that have the keyword "hourly" in the name. It then reverse sorts the snapshots based on the date in the name from newest to oldest and only shows the ones after the first 15 lines. Then the tr and cut commands show just the snapshot name.
Nimble OS $ snapcoll --list --volcoll VMware | grep hourly | sort -r -k2 | tail -n +15 | tr -s " " | cut -d " " -f 2
VMware-hourly-2015-06-17::19:00:00.000
VMware-hourly-2015-06-17::18:00:00.000
VMware-hourly-2015-06-17::17:00:00.000
This can then be used in a for loop to remove those snapshots.
for x in `snapcoll --list --volcoll VMware | grep hourly | sort -r -k2 | tail -n +15 | tr -s " " | cut -d " " -f 2`; do snapcoll --delete $x --volcoll VMware; done
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-18-2015 08:16 AM
тАО06-18-2015 08:16 AM
Re: Need Command Line to delete Volume Collection Snapshots based on date or age of the snapshot.
thanks a lot buddy.