Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 244595

Re: ESXi 5.1 (914609) not manageable anymore

$
0
0

I found the bug.

 

cd /vmfs/volumes/datastore2/BACKUP
find . -mindepth 1 -mtime +20 -exec rm  -f {} \;

 

this was the major fault. I didn't make sure I was really in this directory.

So i had the chance to delete every single file from the root directory, which was older than 20 days.

Luckly root user is not real root at all and the machine came back after a cold restart.

 

 

This is now the script which "should" work

 

#variables
set d1=/vmfs/volumes/datastore1/BACKUP
set d2=/vmfs/volumes/datastore2/BACKUP
#delete backups older than 20 days
test -d "$d2" || mkdir -p "$d2"
cd "$d2" && find . -mindepth 1 -mtime +20 -exec rm  -f {} \;
#change to original dir
cd "$d1"&& find . \( ! -name "*_1-flat.vmdk" \) | cpio -padvm "$d2/../"

 

If someone is interessted in the logs just leave me a message!

 

Thank you all for your effort!


Viewing all articles
Browse latest Browse all 244595

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>