Solved

120,000+ files vanished

Posted on 2013-12-31
3
279 Views
Last Modified: 2013-12-31
I left a Powershell 4 script running overnight. It had 9,000+ files created (from copy-item).
I came in this morning and the program had stopped with an error, but the console output told me there should be over 121,000 files in the new location, but there were only 649!!!

This is a Hyper-V generation 2 virtual machine running Windows 2012R2 and the SQL 2012. There is no DELETE\REMOVE anything in my Powershell script, only create-item for a folder if it does not exist and copy-item to move files from numerous places to one folder.

I was not able to find anything about missing files in Google with 2012R2.
I'm running it again and will find out if it happens in 2 days. The VM guest shows 53GB free and is a dynamic disk.
The VM is exported each night for backup.

Any ideas?
thanks!
0
Comment
Question by:johnj_01201
  • 2
3 Comments
 
LVL 18

Expert Comment

by:Jeremy Weisinger
ID: 39748258
Can you post the script?
What is the reported size of the disk?
How much space is used in the directory?
Can you run something like WinDirStat and verify that the files are not actually there?
0
 
LVL 1

Author Comment

by:johnj_01201
ID: 39748289
Can't post the script, it is almost 1,000 lines long now.
The files are gone, as in permanently deleted somehow.
Recycle Bin was empty and the disk free and used space showed as if the files were not there. There should only be about 10GB free when the program completes.
It is running again and I'll let you know how it turns out this time.
0
 
LVL 18

Accepted Solution

by:
Jeremy Weisinger earned 500 total points
ID: 39748304
Sounds good. If it's still a mystery then you might want to turn on file access auditing while troubleshooting the issue to see exactly what and when the files are deleted.
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

If your vDisk VHD file gets deleted from the image store accidentally or on purpose, you won't be able to remove the vDisk from the PVS console. There is a known workaround that is solid.
This article will help you understand what HashTables are and how to use them in PowerShell.
This tutorial will walk an individual through the process of configuring basic necessities in order to use the 2010 version of Data Protection Manager. These include storage, agents, and protection jobs. Launch Data Protection Manager from the deskt…
This tutorial will walk an individual through the process of installing the necessary services and then configuring a Windows Server 2012 system as an iSCSI target. To install the necessary roles, go to Server Manager, and select Add Roles and Featu…

776 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