Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Generic User Avatar

XCOPY for backups


  • This topic is locked This topic is locked
64 replies to this topic

#16 Sneakycyber

Sneakycyber

    Network Engineer


  •  Avatar image
  • BC Advisor
  • 6,230 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Ohio
  • Local time:09:43 AM

Posted 21 February 2014 - 09:17 PM

Paid option Acronis True Image and Norton Ghost both have boot media that you can use to recovery a failed hard drive, they both offer automatic scheduling and incremental/differential options. Free alternatives, Acronis True Image western digital edition (provided you have a Western digital hard drive) or Easeus Tododo Backup free edition. The free versions do not offer scheduling or incremental/differential backup. The bennifit of the dedicated software is verification of the backup's and automation. For file recovery you can mount the backups and copy/past your files or recover the entire system or partition. Other software I have used is Nti Backup Easy Now (Included with some Toshiba External HDD). There are also Various external Hard drives and network Storage units that come with bundled software. The best back up is one you don't have to think about, and one you actually use. If Xcopy or robo copy works for you then its the perfect solution. Lastly you can have robo copy automatically run by creating a scheduled task in Windows and execute a batch file. You can also send an email when the process completes via command line/batch file. 


Chad Mockensturm 
Network Engineer
Certified CompTia Network +, A +

BC AdBot (Login to Remove)

 


#17 SleepyDude

SleepyDude

  •  Avatar image
  • Malware Response Team
  • 4,174 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Portugal
  • Local time:02:43 PM

Posted 22 February 2014 - 05:05 PM

Hi,
 
Adding my two cents...
 
Xcopy or Robocopy are ok for backup your working files and folders but not for the Operating System, programs settings etc. you need to use disk image software like Sneakycyber mentioned or use free alternatives like Macrium Reflect free
 
You got an error about NTUSER.dat because it's a system file locked by windows that need to be copied using tools that know how to copy locked files...

 

xcopy can't do exactly differential backups but it can copy only the newer files if you use /D, robocopy have allot more options in that area...

 

You should consider doing a full image backup of the installed system and xcopy, robocopy whatever for simple backup copies of your files and folder skipping the system files like NTUSER.dat and others.


• Please do not PM me asking for support. Post on the forums instead it will increases the chances of getting help for your problem by one of us.
• Posts in the Malware section that are not replied to within 4 days will be closed. PM me or a moderator to reactivate.
• Please post your final results, good or bad. We like to know! Thank you!

 
Proud graduate of GeekU and member of UNITE
___
Rui

 
 


#18 Magic Sam

Magic Sam
  • Topic Starter

  •  Avatar image
  • Members
  • 463 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Brigadoon (Co Durham, UK)
  • Local time:01:43 PM

Posted 22 February 2014 - 06:12 PM

Tks for the cents etc.

 

I should perhaps have said at the outset that I have used Macrium both free and paid for on my work and home PCs respectively to create ghost images.  It was never totally clear to me why to do non-ghost backups also, but since that seemed to be the prevailing wisdom ...  (If memory serves me correctly Macrium can do "simple" backups also?). Some query as to whether ghosting also helps, or not, if it is a matter of transferring files to a different PC with different "architecture"...?

 

If Xcopy /A or /M doesn't have the incremental or differential backup effect then that proves that I am incapable of understanding my DOS manual!

 

Can then Robocopy or some similar program achieve incremental / differential backups of my Documents & Settings folder including locked files - preferably at the click of a mouse but not necessarily on an automatic schedule??  Assuming that I have to download the Windows 2003 server update onto my home PC.

 

Tks


But there are also unknown unknowns- the ones we don't know we don't know


#19 Magic Sam

Magic Sam
  • Topic Starter

  •  Avatar image
  • Members
  • 463 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Brigadoon (Co Durham, UK)
  • Local time:01:43 PM

Posted 22 February 2014 - 08:13 PM

You got an error about NTUSER.dat because it's a system file locked by windows that need to be copied using tools that know how to copy locked files...

 

xcopy can't do exactly differential backups but it can copy only the newer files if you use /D, robocopy have allot more options in that area...

 

You should consider doing a full image backup of the installed system and xcopy, robocopy whatever for simple backup copies of your files and folder skipping the system files like NTUSER.dat and others.

 

It looks like there is an XCOPY /H switch that copies system and hidden files also which I suppose would include NTUSER?


But there are also unknown unknowns- the ones we don't know we don't know


#20 x64

x64

  •  Avatar image
  • Members
  • 352 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:London UK
  • Local time:02:43 PM

Posted 23 February 2014 - 02:31 AM

 

You got an error about NTUSER.dat because it's a system file locked by windows that need to be copied using tools that know how to copy locked files...

 

xcopy can't do exactly differential backups but it can copy only the newer files if you use /D, robocopy have allot more options in that area...

 

You should consider doing a full image backup of the installed system and xcopy, robocopy whatever for simple backup copies of your files and folder skipping the system files like NTUSER.dat and others.

 

It looks like there is an XCOPY /H switch that copies system and hidden files also which I suppose would include NTUSER?

 

That just allows xcopy to copy files that have the hidden and/or system file attributes set. It does not allow xcopy to copy locked files (which NTUSER always will be). It also runs in the user context(*), so may run into lack of permissions to backup some files.

 

Xcopy or Robocopy are not suitable for doing SYSTEM backups. They are fine for doing ad-hoc or specialised copies of data, which may be part of a data backup strategy (typically intermediate backups of a pool of important data between system backups, or archive copies of the same, or for transferring data). They cannot copy open files (for example the data files behind running databases).

 

x64

(*) Yes I know there are ways around the permissions thing... It still would not make these file copy tools suitable for backing up an entire, running system...



#21 Sneakycyber

Sneakycyber

    Network Engineer


  •  Avatar image
  • BC Advisor
  • 6,230 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Ohio
  • Local time:09:43 AM

Posted 23 February 2014 - 02:38 AM

"Ghost" backups or full system images are needed to recover an entire system including the operating system, programs, settings, and user data should a hard disk fail or serious file corruption occur. This usally requires allot of storage space depending on the ammount of data. This helps get the system up and running as if nothing ever happend. Individual File backups whether incremental, differential, or full require less space. This helps restore or recover to a new or exsisting system personal or critical data should the files be deleted, lost, or destroyed due to system failure or other means.

Edited by Sneakycyber, 23 February 2014 - 02:41 AM.

Chad Mockensturm 
Network Engineer
Certified CompTia Network +, A +

#22 Magic Sam

Magic Sam
  • Topic Starter

  •  Avatar image
  • Members
  • 463 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Brigadoon (Co Durham, UK)
  • Local time:01:43 PM

Posted 23 February 2014 - 07:33 AM

Part of my objective was to recreate my Documents and Settings on a different PC by transferring the data via a USB stick.  The first attempt failed due to NTUSER.dat.  The second attempt appears (appears) to have worked, but I can't now remember how I did it!! It was certainly not ghosted.

 

Regular backups via XCOPY or Robocopy apart, is there then a "proper" way of replicating system etc files from one PC onto another other than ghosting which I was told was not intended for this purpose?

 

[I think there is an XCOPY switch which excludes specified files which I might be able to apply to ntuser]


But there are also unknown unknowns- the ones we don't know we don't know


#23 Sneakycyber

Sneakycyber

    Network Engineer


  •  Avatar image
  • BC Advisor
  • 6,230 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Ohio
  • Local time:09:43 AM

Posted 23 February 2014 - 08:30 AM

Microsoft Breifcase
Chad Mockensturm 
Network Engineer
Certified CompTia Network +, A +

#24 Magic Sam

Magic Sam
  • Topic Starter

  •  Avatar image
  • Members
  • 463 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Brigadoon (Co Durham, UK)
  • Local time:01:43 PM

Posted 23 February 2014 - 08:57 AM

I have "discovered" the Briefcase option on my desktop, tks.

 

Question though:

 

If I have XP on this PC and want to replicate my Docs & Settings onto a different W7 PC - WITHOUT the need for the two to be in sync subsequently - is Briefcase or Breifcase the way to do it, or am I going to encounter exactly the same copying problems with NTUSER / system files that I have had by copying direct to a USB?


But there are also unknown unknowns- the ones we don't know we don't know


#25 SleepyDude

SleepyDude

  •  Avatar image
  • Malware Response Team
  • 4,174 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Portugal
  • Local time:02:43 PM

Posted 23 February 2014 - 02:40 PM



Part of my objective was to recreate my Documents and Settings on a different PC by transferring the data via a USB stick.  The first attempt failed due to NTUSER.dat.  The second attempt appears (appears) to have worked, but I can't now remember how I did it!! It was certainly not ghosted.

 

Regular backups via XCOPY or Robocopy apart, is there then a "proper" way of replicating system etc files from one PC onto another other than ghosting which I was told was not intended for this purpose?

 

[I think there is an XCOPY switch which excludes specified files which I might be able to apply to ntuser]

 

You may need to use a backup program like Cobian Backup it can copy locked files during backups if you intend to copy everything inside the user profile and not only documents, images, videos, etc.

 

Cobian Backup have several backup options from simple file copies, to zip files, incremental backups, etc.


• Please do not PM me asking for support. Post on the forums instead it will increases the chances of getting help for your problem by one of us.
• Posts in the Malware section that are not replied to within 4 days will be closed. PM me or a moderator to reactivate.
• Please post your final results, good or bad. We like to know! Thank you!

 
Proud graduate of GeekU and member of UNITE
___
Rui

 
 


#26 SleepyDude

SleepyDude

  •  Avatar image
  • Malware Response Team
  • 4,174 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Portugal
  • Local time:02:43 PM

Posted 23 February 2014 - 02:51 PM

Tks for the cents etc.
 
I should perhaps have said at the outset that I have used Macrium both free and paid for on my work and home PCs respectively to create ghost images.  It was never totally clear to me why to do non-ghost backups also, but since that seemed to be the prevailing wisdom ...  (If memory serves me correctly Macrium can do "simple" backups also?). Some query as to whether ghosting also helps, or not, if it is a matter of transferring files to a different PC with different "architecture"...?
 
If Xcopy /A or /M doesn't have the incremental or differential backup effect then that proves that I am incapable of understanding my DOS manual!

 
xcopy /M work like this:
 
- first you make sure all files you want to backup have the Archive attribute set by using the command:

attrib /S +a source_folder\*.*

- them you run a copy using xcopy with /M

xcopy /e /s /m source_folder\*.* destination_folder\

Every file successfully copied will have the Archive attribute unset on the source folder. If the copy stops for example because the destination drive is full you can run the same xcopy command for a different destination/media and only the files not already copied will be copied by xcopy.

 

Hope you understand now how you can use the Archive attribute and the /M parameter.


• Please do not PM me asking for support. Post on the forums instead it will increases the chances of getting help for your problem by one of us.
• Posts in the Malware section that are not replied to within 4 days will be closed. PM me or a moderator to reactivate.
• Please post your final results, good or bad. We like to know! Thank you!

 
Proud graduate of GeekU and member of UNITE
___
Rui

 
 


#27 Magic Sam

Magic Sam
  • Topic Starter

  •  Avatar image
  • Members
  • 463 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Brigadoon (Co Durham, UK)
  • Local time:01:43 PM

Posted 23 February 2014 - 03:01 PM

Great. I was not so far adrift but was unaware of the attrib command. I will try it.

 

Now if only this would work with system (ntuser) files also .....!


But there are also unknown unknowns- the ones we don't know we don't know


#28 SleepyDude

SleepyDude

  •  Avatar image
  • Malware Response Team
  • 4,174 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Portugal
  • Local time:02:43 PM

Posted 23 February 2014 - 04:03 PM

Now if only this would work with system (ntuser) files also .....!

 

No that will not work if the user if logged on the system because the file is locked, you need to use a program like Cobian Backup I post above or HoboCopy a command line tool.


• Please do not PM me asking for support. Post on the forums instead it will increases the chances of getting help for your problem by one of us.
• Posts in the Malware section that are not replied to within 4 days will be closed. PM me or a moderator to reactivate.
• Please post your final results, good or bad. We like to know! Thank you!

 
Proud graduate of GeekU and member of UNITE
___
Rui

 
 


#29 Crazy Cat

Crazy Cat

  •  Avatar image
  • Members
  • 808 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Lunatic Asylum
  • Local time:01:43 AM

Posted 23 February 2014 - 08:09 PM

@echo off
title Backing Up DATA

Set "sourceDir=C:\source"
Set "destinationFolder=D:\destination"
Set "_report=D:\destination\logxcopy.txt"

IF NOT EXIST "%sourceDir%" (echo.Could not find %sourceDir% &GoTo:done)

:: appending log
>>"%_report%" (
echo.%date% - %time%
echo.---------------------------------------------------
echo.
)

:: copy files
For /F "Delims=" %%! in ('Dir "%sourceDir%\" /b /s /a-d 2^>nul') do (
@echo.%%! &(
@xcopy "%%!" "%destinationFolder%\" /i /y /h /f /c >>"%_report%",2>&1)
)

:done
title, BackUp Done.
pause
exit

 

Two things are infinite: the universe and human stupidity; and I'm not sure about the universe. ― Albert Einstein ― Insanity is doing the same thing, over and over again, but expecting different results.

 

InternetDefenseLeague-footer-badge.png


#30 Magic Sam

Magic Sam
  • Topic Starter

  •  Avatar image
  • Members
  • 463 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Brigadoon (Co Durham, UK)
  • Local time:01:43 PM

Posted 24 February 2014 - 08:55 AM

 

Now if only this would work with system (ntuser) files also .....!

 

No that will not work if the user if logged on the system because the file is locked, you need to use a program like Cobian Backup I post above or HoboCopy a command line tool.

 

These should be great if I can get them to work.  I installed Cobian ("as an application" not as a "service") but can't get it to run, it seems that it thinks that another version is in progress.  With the Hobo download it appeared that other additional components had to be downloaded from somewhere but I found a Hobo GUI and on the surface it looks like it might work.  Nothing in life is simple

 

With the (archive) attribute command do I run it just once only at the beginning - not prior to using xcopy / M each time?

 

Re Crazy Cats' post - thanks, it looks very impressive indeed but I'm trying to figure out just what it does and does not do! [system files?]


But there are also unknown unknowns- the ones we don't know we don't know





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users