Solved

120,000+ files vanished

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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Join & Write a Comment

Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
In this article, I will show you HOW TO: Perform a Physical to Virtual (P2V) Conversion the easy way from a computer backup (image).
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…
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …

762 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

22 Experts available now in Live!

Get 1:1 Help Now