automatic OLVM VMs snapshots removal after XY number of days
OLVM version: 4.3.10.4-1.0.26.el7
Dear OLVM gurus!
I would like to put a script in place for handling OLVM VMs snapshots, as our OffShore team usually forgets to remove snapshots. Asked ChatGPT and MS Coopilot for some hints, but their suggestions is not working. Anybody out there handled similar task?
This is what ChatGPT recomends, but of course, I don't see snapshot directory
#!/bin/bash
- Define the path to the OLVM snapshots directory
- SNAPSHOT_DIR="/path/to/ovlm/snapshots"
- Calculate the timestamp for one week ago
- ONE_WEEK_AGO=$(date -d "1 week ago" +%s)
- Loop through snapshots in the directory