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

#1 Magic Sam

Magic Sam

  •  Avatar image
  • Members
  • 463 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Brigadoon (Co Durham, UK)
  • Local time:04:54 AM

Posted 17 February 2014 - 05:06 PM

- I want to use XCOPY to back up my docs & settings and program exe file folders to a flash drive, and repeat on an incremental / differential (I can never remember the difference) basis.  Do I use the /M ("turns off the archive attribute") or the /A ("leaves the archive attribute unchanged") parameter?

 

- I am still using XP.  Will DOS still work in more recent OS's?

 

- I tried to achieve the above by copying and pasting within Windows Explorer but the system baulked repeatedly at pasting NTUSER.dat and the attempt failed.  To get round this I had to get into Safe Mode as Administrator, quite a hassle.  I'd be interested to see if XCOPY hits the same problem.

 

-  It is correct that non-DOS incremental / differential copying and pasting is not possible, other than by using a dedicated program for this (which according to my computer shop is not ideal for transferring files to a new, dual boot XP / W7 PC)?

 

Tks for answers to any or all of the above.


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


BC AdBot (Login to Remove)

 


#2 JohnnyJammer

JohnnyJammer

  •  Avatar image
  • Members
  • 1,268 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:QLD Australia
  • Local time:02:54 PM

Posted 19 February 2014 - 07:22 PM

Dont worry about the archive bit if you are just copying files. A full backup will reset the archive bit but this command will allow you to copy everything you need
XCOPY /e /q /y "FolderFrom" "FolderTo"
Not sure why you are using this as a backup method.

#3 x64

x64

  •  Avatar image
  • Members
  • 352 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:London UK
  • Local time:05:54 AM

Posted 20 February 2014 - 01:59 AM

Yes, the command line tools still work in new OSs.

 

Of particular interest to you should be a command called "Robocopy". Robocopy is a sort on Xcopy on steroids. Robocopy is installed as standard on newer OSs (It started life as a Windows resource kit tool, but made it into Windows proper in Vista/ Windows server 2008)

 

Robocopy is great for bulk file moves. It can be set to ignore errors during copies, retry failing file copies before moving on etc. There are loads of switches for manipulating the copy and selecting the files to copy. Open a command prompt and type ROBOCOPY /? to list them all...

 

Enjoy!.

 

x64



#4 Magic Sam

Magic Sam
  • Topic Starter

  •  Avatar image
  • Members
  • 463 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Brigadoon (Co Durham, UK)
  • Local time:04:54 AM

Posted 20 February 2014 - 04:11 PM

Dont worry about the archive bit if you are just copying files. A full backup will reset the archive bit but this command will allow you to copy everything you need

XCOPY /e /q /y "FolderFrom" "FolderTo"
Not sure why you are using this as a backup method.

 

I suppose the answer is "why not?" !! My computer local shop reckoned that it was easier to restore files that had simply been copied and pasted rather than those that had been done via some proprietary program.  If creating a DOS XCOPY batch file does the same thing at the click of a mouse, why use anything else?  All the more so if - if - DOS can get round the problems of copying ntuser.dat.

 

My old DOS manual, which I have always regarded as applicable to XP, lists /E and / Y but not the /Q parameters under XCOPY. Has /Q replaced the /M or /A that used to set the archive attribute (and for all I know still does) to make follow-up backups quicker (= incremental or differential)?

 

I'll have to investigate Robocopy - never heard of it.  I wonder if it works within XP?!


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


#5 daveydoom

daveydoom

  •  Avatar image
  • Security Colleague
  • 146 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Ontario, Canada
  • Local time:12:54 AM

Posted 20 February 2014 - 04:17 PM

 

I'll have to investigate Robocopy - never heard of it.  I wonder if it works within XP?!

 

Yes it does :)  .  I used it up until about a year ago with XP at work and then I swapped out the XP machine for a Windows 7 PC and I continue to use ROBOCOPY for our daily backup routine.   It works great.


"A computer beat me in chess, but it was no match when it came to kickboxing"
-Emo Philips

Member of UNITE, Unified Network of Instructors and Trusted Eliminators


#6 Magic Sam

Magic Sam
  • Topic Starter

  •  Avatar image
  • Members
  • 463 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Brigadoon (Co Durham, UK)
  • Local time:04:54 AM

Posted 20 February 2014 - 04:49 PM

>> " 'robocopy' is not recognized as an internal or external command, operable program or batch file"

:-(

My DOS is 5.1.2600

 

Back to XCOPY?


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


#7 Roodo

Roodo

  •  Avatar image
  • Members
  • 760 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:10:54 PM

Posted 20 February 2014 - 05:04 PM

Robocopy needs to be downloaded for xp.



#8 x64

x64

  •  Avatar image
  • Members
  • 352 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:London UK
  • Local time:05:54 AM

Posted 20 February 2014 - 05:20 PM

Sorry Misread the original post for the OS. Robocopy does work in XP - goto download.microsoft.com and download the Windows server 2003 resource kit - I believe that is the official source for the XP generation's version.



#9 JohnnyJammer

JohnnyJammer

  •  Avatar image
  • Members
  • 1,268 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:QLD Australia
  • Local time:02:54 PM

Posted 21 February 2014 - 01:11 AM

Well if you want a one click solution then i would have to say that SyncToy from Microsoft is the best, create the 2 pair structure and then create a scheduled task to run every night, thats what i do for certain files from server to USB storage device.

Edited by JohnnyJammer, 21 February 2014 - 01:11 AM.


#10 Magic Sam

Magic Sam
  • Topic Starter

  •  Avatar image
  • Members
  • 463 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Brigadoon (Co Durham, UK)
  • Local time:04:54 AM

Posted 21 February 2014 - 08:12 AM

I wonder if when it is a relatively simple, not too intensive backup situation it doesn't really matter what program you use, they [Robocopy, SyncToy, Xcopy ..] all do the same thing?  

Though it would be useful to know if the /A or /M switch achieves the incremental or differential effect as I asked at the start.

And if in the event of hard drive failure it is as easy to restore the back-up-ed files to a different PC with each of the programs.


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


#11 Magic Sam

Magic Sam
  • Topic Starter

  •  Avatar image
  • Members
  • 463 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Brigadoon (Co Durham, UK)
  • Local time:04:54 AM

Posted 21 February 2014 - 02:38 PM

Sorry Misread the original post for the OS. Robocopy does work in XP - goto download.microsoft.com and download the Windows server 2003 resource kit - I believe that is the official source for the XP generation's version.

Would this be appropriate for my non-server-networked home PC??


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


#12 daveydoom

daveydoom

  •  Avatar image
  • Security Colleague
  • 146 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Ontario, Canada
  • Local time:12:54 AM

Posted 21 February 2014 - 04:35 PM

 

Sorry Misread the original post for the OS. Robocopy does work in XP - goto download.microsoft.com and download the Windows server 2003 resource kit - I believe that is the official source for the XP generation's version.

Would this be appropriate for my non-server-networked home PC??

 

Yes :)  . 


"A computer beat me in chess, but it was no match when it came to kickboxing"
-Emo Philips

Member of UNITE, Unified Network of Instructors and Trusted Eliminators


#13 daveydoom

daveydoom

  •  Avatar image
  • Security Colleague
  • 146 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Ontario, Canada
  • Local time:12:54 AM

Posted 21 February 2014 - 04:36 PM

And if in the event of hard drive failure it is as easy to restore the back-up-ed files to a different PC with each of the programs.

Yes it is :)  .  Copying/transferring raw data in this way works fine in either direction :)  .


"A computer beat me in chess, but it was no match when it came to kickboxing"
-Emo Philips

Member of UNITE, Unified Network of Instructors and Trusted Eliminators


#14 Sneakycyber

Sneakycyber

    Network Engineer


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

Posted 21 February 2014 - 07:51 PM

 Robocopy is use when deploying new servers to copy data files all the time. That being said there are other free alternatives that do backups autonomously as mentioned although not asked by the Op. 


Chad Mockensturm 
Network Engineer
Certified CompTia Network +, A +

#15 Magic Sam

Magic Sam
  • Topic Starter

  •  Avatar image
  • Members
  • 463 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Brigadoon (Co Durham, UK)
  • Local time:04:54 AM

Posted 21 February 2014 - 08:04 PM

Well that is not really my situation, which was the reason behind my previous query.  

Do the other "free alternatives" have any advantages over XCOPY? Automatic scheduling would not be a high priority. But Incremental / differential would be desirable.

And in the event of hard disc melt-down does the "alternative" program have to be installed somewhere in order to restore the backed-up files, or can one just copy and paste?


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