Link to home
Start Free TrialLog in
Avatar of Dan Sheridan
Dan SheridanFlag for United States of America

asked on

How can you clean up daily VMWare vSphere snapshots automatically?

I am using VMWare vSphere 6.7 and it is doing daily snapshots.  After 30 days if no one has cleaned up these daily snaps, it stops taking new snaps.  I have not seen a setting for cleaning up daily auto snaps to either a schedule or to number or snapshots.

Does anyone know how to schedule snapshots?

Avatar of Seth Simmons
Seth Simmons
Flag of United States of America image

you can run a script to cleanup; probably tweaking the script a bit if you like or as-is running weekly or daily in task scheduler
would need powercli installed

Creating, Listing and Removing VM Snapshots with PowerCLi and PowerShell

https://captainvops.com/2017/01/30/creating-listing-and-removing-vm-snapshots-with-powercli-and-powershell/
Avatar of Dan Sheridan

ASKER

One step closer.  How do you tell it to run this daily or weekly and tell it to remove older than 8 days old?
not sure if there is a way to automatically do it by age but if you run it, say every sunday, it will delete all of the snapshots which would be from the previous 7 days

you would run it as a schedule task
Per our customer requirements, I need to keep 8 days of snaps, so I cannot delete all
Please note snapshots are not backups, and VMs are not designed to run on snapshots for longer than 72 hours.

Performance can also be affected, along with other related issues. (corruption!), storage space issues.

Do you not backup the VM every day for a restore ?

I would advise your Customer of these issues.
We are doing hourly backups and also daily VMWare snaps.  I will talk with the customer.
ASKER CERTIFIED SOLUTION
Avatar of Hello There
Hello There

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial