Solved

Windows 7 backup and restore -  try to delete the *.vhd file

Posted on 2014-09-23
14
573 Views
Last Modified: 2014-10-06
I am having a bit of an issue with Windows 7 Back and restore routine.  Quite frankly I am stuck using this piece of trash.  Here's what I did:  I needed to backup a user folder to a network share daily.  Unfortunately, I also choose, as part of the backup, to create a WindowsImageBackup (system image) of the Win7 PC (I think), which I wish I never did.  Anyway, when the backup is finished it now consumes almost 30gb of disk space on my server (SBS 2003).  I am fighting for disk space on this server. There is a *.vhd file that is 27gb on the network share, and when I try to delete it I get the standard "error deleting File or Folder"..."Access is denied...make sure disk is not full and that the file is not currently in use."

I have tried to delete the Backup&Restore job, which I assume, would release the file so that I can delete it...no go...I can't see find out how to delete this job.   Can you help me.  Thank you in advance for you help....any suggestion would be most helpful.
0
Comment
Question by:infosys3
  • 7
  • 3
  • 3
  • +1
14 Comments
 
LVL 53

Expert Comment

by:McKnife
ID: 40340164
Hi.

First of all: an idle job at a client will not constantly keep a file opened.
Please use the command
net file
at the server to see what files are open. You could also use
net file |findstr vhd
to find it faster - if it is opened... I don't think so.
If it is not open, and you have all access rights (I think you will be able to ensure that), then it can only be file system corruption. So use check disk on the drive after hours, like
chkdsk d: /r
0
 
LVL 50

Expert Comment

by:jcimarron
ID: 40340246
infosys3 --
"There is a *.vhd file that is 27gb on the network share"
The .vhd file IS your image backup.
If you have to use the image backup, Backup and Restore will automatically use this file.

If you want to read it (not necessary--more for curiosity ) or extract one or more individual backed up files, you have use this procedure
http://tweaks.com/windows/39389/how-to-mount-a-vhd-file-in-windows-7/
http://www.vistaclues.com/open-a-vhd-file-in-windows-7/

If you really do not want the .vhd file, you will wipe it the next time you format the drive containing it.
0
 

Author Comment

by:infosys3
ID: 40340362
Thanks for the quick replies... See below:
McKnife:  I did  net file and the "vhd" was not in the list...I will have to run a chkdsk after hours and we will see what that does.

jcimarron:  I really don't want to read it or extract it or do anything with it except delete it.  FYI:  perhaps I was not clear enough, but the file in question is on a SBS 2003 server and I have no intention of formating the RAID.

In summary...this VHD file was created by a Windows 7 Backup & Restore system image and is stored on a server in a shared drive.   I am down to 17gb of available disk space on the server and this one file contains 25gb.   To your knowledge is there any other way to delete this VHD file.   Many thanks.
0
 
LVL 50

Expert Comment

by:jcimarron
ID: 40340445
infosys3--
Here is how you should be able to delete the .vhd file
http://www.sevenforums.com/tutorials/567-virtual-hard-disk-unattach-delete-vhd.html
Note especially item #6 so you do not also delete other items on the system drive.
0
 

Author Comment

by:infosys3
ID: 40340479
jcimarrion:
I am not on site now, but I will be on-site tomorrow and I will follow your suggestions.   Thanks,
0
 
LVL 50

Expert Comment

by:jcimarron
ID: 40340489
infosys3--
"Note especially item #6 so you do not also delete other items on the system drive. "
That sentence should be deleted from my post above.

Line #7 is what you want to do.

Good luck!!
0
 
LVL 78

Expert Comment

by:David Johnson, CD, MVP
ID: 40340873
jcmarron: Your instructions are only valid for a mounted VHD

asker: what you need to do is take ownership of the file (takeown /f directory /r /d n (elevated command prompt) now you can change the security permissions and then DELETE the file.
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 50

Expert Comment

by:jcimarron
ID: 40341980
David Johnson, CD, MVP--
So if necessary, infosys3 could mount (attach) the .vhd file first if not already done.
There is a link in the reference I posted which leads to
http://www.sevenforums.com/tutorials/566-virtual-hard-disk-create-attach-vhd.html
0
 
LVL 78

Expert Comment

by:David Johnson, CD, MVP
ID: 40343006
yes you could if you wanted mount a vhd file.. that is not the issue here.. he want's to delete it entirely.
0
 
LVL 50

Expert Comment

by:jcimarron
ID: 40344314
David Johnson, CD, MVP--
You pointed out that the instructions for deleting the .vhd file in
http://www.sevenforums.com/tutorials/567-virtual-hard-disk-unattach-delete-vhd.html
may apply only to a mounted .vhd file.  So mounting that .vhd file first might be the way to then delete it.  It takes about five seconds to mount a .vhd file.
0
 
LVL 78

Assisted Solution

by:David Johnson, CD, MVP
David Johnson, CD, MVP earned 100 total points
ID: 40344372
a vhd file is simply a FILE  files exist in folders and have ntfs file permissions. If security restrictions do not allow you to delete it from the command prompt or via explorer then no other method will change this.
0
 
LVL 50

Accepted Solution

by:
jcimarron earned 400 total points
ID: 40344400
infosys3----
You now have at least two suggestions.  There would be no harm in trying either.
0
 

Author Closing Comment

by:infosys3
ID: 40363775
Thank you gentlemen for your speedy reply...I have been on jury duty for the past 10 days and when I finally got back to the server the file was deleted.  So I assume when I killed the Win7 backup/restore job (that performed the image) it also released the vhd file, but not immediately...probably hours later.
Again, thanks for your assistance, I appreciate it.  Bruce
0
 
LVL 50

Expert Comment

by:jcimarron
ID: 40364001
infosys3--
That sounds right.  Thanks for telling us the outcome.
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Setting up a Microsoft WSUS update system is free relatively speaking if you have hard disk space and processor capacity.   However, WSUS can be a blessing and a curse. For example, there is nothing worse than approving updates and they just have…
OfficeMate Freezes on login or does not load after login credentials are input.
In this Micro Tutorial viewers will learn how to use Boot Corrector from Paragon Rescue Kit Free to identify and fix the boot problems of Windows 7/8/2012R2 etc. As an example is used Windows 2012R2 which lost its active partition flag (often happen…
This Micro Tutorial will give you a basic overview of Windows Live Photo Gallery and show you various editing filters and touches to photos you can apply. This will be demonstrated using Windows Live Photo Gallery on Windows 7 operating system.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now