[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 411
  • Last Modified:

XCopy question for moving a file share and permissions to a new partition on the same server

I have Windows 2000 server that has a 60gb file share that needs to be moved to a new larger partition on the same server.  I'm looking for opinions on what the best tool would be to copy this data to the new partition while keeping the file permissions intact.  If XCOPY is the answer can you provide me with the syntax including appropriate switches to do this copy (including the switch to keep going if it encounters a file it cannot copy etc...)?

Will the modifiec/accessed date change of all the files/folders change if using XCOPY?  I've briefly looked into Scriptlogic's SecureCopy but don't think it's worth the $1000 for this one time data move.

Thanks.
0
knutsonit
Asked:
knutsonit
1 Solution
 
dotENGCommented:
Two gtages

Assumed D: - Source
              E: - Target

1. Mark all files as Archive bit on
ATTRIB +A d:\*.* /S
+A - Set Archive bit for file to ON
/S - Go through subdirectories.

2. Copy files from source to target
XCOPY d:\*.* e:\ /S/E/C/H/M/K/O
 /S           Copies directories and subdirectories except empty ones.
 /E           Copies directories and subdirectories, including empty ones.
              Same as /S /E. May be used to modify /T.
 /V           Verifies each new file.
 /C           Continues copying even if errors occur.
 /Q           Does not display file names while copying.
 /H           Copies hidden and system files also.
 /K           Copies attributes. Normal Xcopy will reset read-only attributes.
 /O           Copies file ownership and ACL information.
 /X           Copies file audit settings (implies /O).

If power fails or copy stops, run step 2 again.
0
 
chris_bolCommented:
I would use robocopy, this has a switch for maintaining permissions and can continue even if it encounters a problem (should you want it to)
0
 
knutsonitAuthor Commented:
Assume I want to only a directory (and everything in it) called D:\Projects to a new partition E:; would I need to first create a directory called "Projects" on E: for the destination placeholder? or is there a way using xcopy to have the copy job create the "Projects" directory.  The "projects" directory is the parent directory that many of the child directories have permissions progated to them.  I hope I'm making sense.  

Also what purpose does turning the archive bit on for all of the files have in the example?

Thanks again.
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
dotENGCommented:
Better create the directory.
 use full path to make sure you know what is been copied.
XCOPY d:\Projects\*.* e:\Projects\ /S/E/C/H/M/K/O
0
 
dotENGCommented:
After the file has been copied, xcopy turns the archive bit off (the /M) and if in some situation the copy stops, you can continue since /M copies only Archive bit on.
0
 
dotENGCommented:
Another thing about the Archive bit is that if somehow a file has changed while the copy takes place, when you run the xcopy the second time (you should, it collects changes in long copy), it will collect the files that change.
The OS turns Archive bit on if the file has changed (saved again).
0
 
knutsonitAuthor Commented:
Is there a logfile created to see which files may not have copied over correctly?
0
 
rpartingtonCommented:
Have a look at
http://www.tgrmn.com/

Its evaluation version should get you on your way.
Yo can either create the target directory yourself and set the permissions to flow down over then start the transfer of data across from the source.
Or you can just tell Vice Versa to create the target folder exactly the same as the source folder and leave it to it.
Nice GUI interface.

http://www.tgrmn.com
0
 
dotENGCommented:
You will have a log file if you run:
XCOPY d:\Projects\*.* e:\Projects\ /S/E/C/H/M/K/O >> c:\copylog.txt
0
 
Dark_KingCommented:
Like chris_bol says you can use ROBOCOPY, it can copy or move and have log to file.

ROBOCOPY source_folder destination_folder /S /COPYALL /MOVE /LOG:MyLogfile.txt

"/COPYALL" is the copyflags to copy Data, Attributes, Timestamps, NTFS_Security_ACLs, Owner info and aUditing info.


Tou can read on ROBOCOPY here http://www.ss64.com/nt/robocopy.html

You can find the old verion here http://www.dynawell.com/support/ResKit/winnt.asp
but you can download XP's Admin Pack here http://www.dynawell.com/support/ResKit/winxp.asp

The NT 4 and Windows 2000 resource kits include Robocopy 1.95 but I recommend you download the XP version
which fixes a number of bugs - it runs fine on NT/2K
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now