leco Posted April 13, 2009 Posted April 13, 2009 I am currently sorting out the directory and file structure on the new W2008 64bit domain server. I want to move a rather large (and deep) directory up a level. What are the recommended ways of doing this? I have heard of Robocopy, but have not used it before and not sure if it works for 2008. Would I be able to copy the whole tree from one place to another on the same server? Does it retain things like time stamps and access and security information? I have read the Robocopy syntax but as I said being a newby on this I'd like some guidance please.
mb2k01 Posted April 13, 2009 Posted April 13, 2009 How large are you talking about? Are there likely to be locked files in the tree or is it largely data that no one will be accessing? If you're only talking about a few GB of data, and it was still Easter there (with no one else accessing files etc), then I would be inclined to just copy via explorer. If it's a bit messy and you would like an alternative app, I haven't used Robocopy (although i've seen it mentioned before with good feedback) but have used Beyond Compare. Permissions / security will depend on whether permissions are inheritted from the folder above and if you're moving it to the same volume etc. 1
AngryTechnician Posted April 13, 2009 Posted April 13, 2009 Robocopy is built in to Server 2008 and is in fact recommended over the now-legacy xcopy command. It would do exactly what you need, but it might not be necessary since it sounds like you are moving the folder to another location on the same drive (which is actually just a rename; no new copy of the data is needed), in which case you may be able to use the much simpler move command. As mb2k01 suggests, you will need full permissions for your account on all the the files, and for none of them to be locked in use, for that to work. If these conditions are not all true, then robocopy is definitely your friend. This is the syntax I would suggest: robocopy "source" "destination" /e /copyall /b /move 1
leco Posted April 13, 2009 Author Posted April 13, 2009 The tree is in the tens of gb region rather than hundreds, not sure if there are any locks - there shouldn't be but there again this is a central store. It's a place where users (staff only) put resources so that others can access them, which is I guess why it has grown so large. It would be going to the same volume and would need the same share permissions it has now. And yes they are inherited from the current share. I was holding off from a straight copy as I want to be able to do other things on the server (it being the hols) and I think it would take quite a long time. Beyond Compare? Will look that one up, thanks.
leco Posted April 13, 2009 Author Posted April 13, 2009 Robocopy is built in to Server 2008 and is in fact recommended over the now-legacy xcopy command. It would do exactly what you need, but it might not be necessary since it sounds like you are moving the folder to another location on the same drive (which is actually just a rename; no new copy of the data is needed), in which case you may be able to use the much simpler move command. As mb2k01 suggests, you will need full permissions for your account on all the the files, and for none of them to be locked in use, for that to work. If these conditions are not all true, then robocopy is definitely your friend. This is the syntax I would suggest: robocopy "source" "destination" /e /copyall /b /move As I don't think anyone will be there today, this is I think what I need, thanks. Is there a way of checking that everything has moved, apart from the obvious that any file/directory would still be visible in the old location? Do I need another switch to be able to monitor what's going on?
steve Posted April 13, 2009 Posted April 13, 2009 Robocopy has a huge number of switches you can use. I tend to use: robocopy.exe "source" "destination" /E /COPY:DAT /R:5 /W:5 /NDL /NP >"logfile.txt" Then delete manually after when I've checked the logfile. If you want something more graphical there's Robocopy GUI however that needs to be installed. 1
mb2k01 Posted April 13, 2009 Posted April 13, 2009 The tree is in the tens of gb region rather than hundreds.... ...I was holding off from a straight copy as I want to be able to do other things on the server (it being the hols) and I think it would take quite a long time If it's only xxGB and moving to somewhere else on the same physical disk, then it shouldn't take that long at all. As a rough guess i'd say about 5mins per 10GB? Sadly I'm still a server 2003 man, but if 2008 has robocopy built in and has the potential to provide a safer move anyway i'd plump for that. You could always test it out on a test directory first to make sure it does what you want (maybe test permissions that way too?) If it's a shared area maybe spend a bit of time checking out what the permissions are before you move (just in case!)
leco Posted April 13, 2009 Author Posted April 13, 2009 (edited) Thanks to everyone - move now completed, with a few scary moments in there:fear: I had to create the Directory first - didn't know that On the first run it skipped and failed on a couple of directories. One was a directory that I had forgotten about (special permissions) managed that one on the second pass. However, nearly gave myself a heart attack after the second copy as there only seemed to be those two new directories in the destination:eek: I thought it had deleted the others with the new move. But of course it hadn't, just me being thick. I still have permissions to sort on the new share, but I think I can manage to do that. I need caffeine after all that. Thanks guys, couldn't have done it without you. Edited April 13, 2009 by leco
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now