Solved

Copy Command is Deleting Files

Posted on 2013-01-07
8
354 Views
Last Modified: 2013-01-08
I am performing a SQL backup and copy between servers using bat files and Task Scheduler.
I create the backup files, then copy them from one server to another.  The copy command copies all existing files; I use clear commands to remove older files.
The backup is working properly, but the copy command is deleting existing files selectively on the receiving server.  For example, a file from1/1/2013 is there on 1/2, but missing on 1/7. Other files from the same day remain.
I have disabled the clear commands, so how is the copy command deleting files?
Backup-a.xlsx
0
Comment
Question by:fhcdaver
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 33

Assisted Solution

by:paulmacd
paulmacd earned 500 total points
ID: 38752649
And no human has access to the place where the files are being copied?  No other process deletes files from there?  

I'd turn on auditing and see who's doing what.
0
 

Author Comment

by:fhcdaver
ID: 38752793
I'm confident no person is doing it, and don't see any other processes.  

Is it possible that intermittent transmission errors in the midst of the copy/overwrite of existing files are deleting existing files without successfully replacing them?
0
 
LVL 51

Expert Comment

by:Bill Prew
ID: 38753281
When the batch file runs that does the copy, does it ever report any errors from the copy command?  If not I'd be surprised if it was deleting the files.

You might want to add a DIR of the destination folder at the start and end of the BAT file to try and see if the files go missing as a result of it running.

~bp
0
 
LVL 33

Accepted Solution

by:
paulmacd earned 500 total points
ID: 38754687
"Is it possible that intermittent transmission errors in the midst of the copy/overwrite of existing files are deleting existing files without successfully replacing them?"
I don't see how.  Moreover, if you're sure the files exist at some point, then are deleted, I fail to see how the copy command could be responsible for that.  

Is there a separate clean-up process?  Are you unwilling or unable to audit file access/permission use to see when these files are being deleted?
0
Highfive Gives IT Their Time Back

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 24

Expert Comment

by:lionelmm
ID: 38754715
What are the names of these files, naming rules--is it possible old and new files have the same names and so when copied replace an existing?
0
 

Author Closing Comment

by:fhcdaver
ID: 38755201
I will try the auditing.
0
 
LVL 51

Expert Comment

by:Bill Prew
ID: 38755386
So, just curious, what was the source of the disappearing files, and how did you resolve it?

~bp
0
 

Author Comment

by:fhcdaver
ID: 38756904
I have not figured out the problem, so we are going to monitor the situation and see what happens.  if we discover the cause, I will post it.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

One of my most closely kept secrets is revealed in this discussion How to output text on the same line This question was recently posted in EE by Simon336697 (http://www.experts-exchange.com/Programming/Languages/Scripting/Shell/Batch/Q_2459…
YESTERDAY YESTERDAY.BAT is inspired by a previous article I wrote entitled: TOMORROW.BAT (http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/MS_DOS/A_4196-Advanced-Batch-File-Programming-TOMORROW-BAT.html). The crux of this batch f…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

708 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

11 Experts available now in Live!

Get 1:1 Help Now