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
Solved

Robocopy not retaining deleted files that have been previously backed up

Posted on 2007-03-25
3
598 Views
Last Modified: 2012-06-21
We currently use Robocopy twice daily to backup client files and these backups are called on reguarly to restore files when mistakes are made in them.
After a scare, we decided to run a test to see what would happen if a file that had previously been backed up was deleted.  What we found was that the file in question was also missing from the backup.  

So the question is:  Is this normal?  How can we recover deleted files? Is there something wrong in our batch.  I've copied & pasted the batch file below.

rem ****************************************************
rem * SYNC DATA                                        *
rem ****************************************************

c:
cd \batch
del sync.log

robocopy \\server1\c$\data e:\data /e /zb /copy:DATS /purge /r:1 /w:0 /ndl /nfl /tee /log+:sync.log

c:\Windows\system32\vssadmin.exe Create Shadow /AutoRetry=15 /For=E:

rem 7zan.exe a -pgroup -tzip sync.zip sync.log
7zan.exe a -tzip sync.zip sync.log

blat sync.zip -s "Robocopy results" -t email.address@ourdomain.co.nz -uuencode

**********************************************************************************************

Any advice is greatly appreciated.
0
Comment
Question by:bosshognz
3 Comments
 
LVL 14

Accepted Solution

by:
Burns2007 earned 500 total points
ID: 18790582
/PURGE :: delete dest files/dirs that no longer exist in source.
This means that if you delete the file from the source, the next time robocopy runs it will delete it from the copy directory as well...

You should however be able to restore the file from the shadow copy, by going to the parent folder and looking at the previous version of that.

Say the file was deleted from f:\data\robocopy\a\b\file.txt, if you go to the previous version of f:\data\robocopy\a..and then browse to \b\ you' should be able to see the old version of file.txt

Can you look at it this way from the shadow copies or is it still missing?
0
 
LVL 9

Expert Comment

by:robjeeves
ID: 18790589
G'day

You need to get rid of the /purge switch mate. That will remove files from destination that don't exist in the source. DANGER :)
Rob
0
 

Author Comment

by:bosshognz
ID: 18790739
Thanks Burns - I did find the folder in the parent folder in a previous version prior to deleting it.  Will keep the /purge in as it keeps it tidy.  Excellent!
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SolarWind and DNS Server 12 86
Vmware backup to External Hard drive 6 157
synology Replace Drives to Expand Storage Capacity 8 64
Unable to print after system state restore 32 35
Storage devices are generally used to save the data or sometime transfer the data from one computer system to another system. However, sometimes user accidentally erased their important data from the Storage devices. Users have to know how data reco…
In this article we will learn how to backup a VMware farm using Nakivo Backup & Replication. In this tutorial we will install the software on a Windows 2012 R2 Server.
To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…
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…

809 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