Solved

120,000+ files vanished

Posted on 2013-12-31
3
278 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

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Question has a verified solution.

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

This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
In this article, I am going to show you how to simulate a multi-site Lab environment on a single Hyper-V host. I use this method successfully in my own lab to simulate three fully routed global AD Sites on a Windows 10 Hyper-V host.
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…
How to install and configure Citrix XenApp 6.5 - Part 1. In this video tutorial we have explained step by step installation of Citrix XenApp 6.5 Server on Windows Server 2008 R2 is explained in this video. We have explained the difference between…

896 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

15 Experts available now in Live!

Get 1:1 Help Now