Solved

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

Posted on 2014-09-23
14
645 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 3
  • 3
  • +1
14 Comments
 
LVL 54

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
Guide to Performance: Optimization & Monitoring

Nowadays, monitoring is a mixture of tools, systems, and codes—making it a very complex process. And with this complexity, comes variables for failure. Get DZone’s new Guide to Performance to learn how to proactively find these variables and solve them before a disruption occurs.

 
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 81

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
 
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 81

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 81

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Sync home folder not working- urgent 13 57
Urgent domain controller problems 8 94
Windows 10 updates being installed on Windows 7?? 20 77
Can't Login to Laptop 18 46
Learn about cloud computing and its benefits for small business owners.
The recent Microsoft changes on update philosophy for Windows pre-10 and their impact on existing WSUS implementations.
This Micro Tutorial will teach you the basics of configuring your computer to improve its speed. It will also teach you how to disable programs that are running in the background simultaneously. This will be demonstrated using Windows 7 operating…
This Micro Tutorial will give you a introduction in two parts how to utilize Windows Live Movie Maker to its maximum capability. This will be demonstrated using Windows Live Movie Maker on Windows 7 operating system.

739 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