Moving Users home directories and keep the permissions
We are looking at moving pupils home directories to another set of hard drives on our Windows 2000 Server. I know that if you just copy or move them to another place then the permissions get screwed.
Is there a way to copy all the user directories and keep all the permissions!
Thanks
Re: Moving Users home directories and keep the permissions
using Xcopy on the command line...
Do an xcopy /? for all the options - there's loads of flags you can add, but the most important one in this case is /O (copies file ownership and ACL information)
Re: Moving Users home directories and keep the permissions
Robocopy is another alternative.
Or you could use NTBackup.
Re: Moving Users home directories and keep the permissions
Quote:
Originally Posted by Geoff
Robocopy is another alternative.
Or you could use NTBackup.
Robocopy is my favorite I have used it many times for such tasks. I also use it as part of my backups. Just make sure you set the file retry to a sensible limit :D
Re: Moving Users home directories and keep the permissions
xcopy <SOURCE_FILEPATH> <DESTINATION_FILEPATH> /e /c /h /o /i /y
The only problem I've found with this is that it screws up Disk Quotas.
Quotas work on the Ownership of the file, but the Administrator will own all the moved files so Disk Quota will show them as using lots of space and the users using none, until they create new files which they will then own.
Re: Moving Users home directories and keep the permissions
Quote:
Originally Posted by mrforgetful
xcopy <SOURCE_FILEPATH> <DESTINATION_FILEPATH> /e /c /h /o /i /y
The only problem I've found with this is that it screws up Disk Quotas.
Quotas work on the Ownership of the file, but the Administrator will own all the moved files so Disk Quota will show them as using lots of space and the users using none, until they create new files which they will then own.
I have a script to sort that using the windows version of chown if you like :D
Re: Moving Users home directories and keep the permissions
Ooo really?
Yeh that'd be a great help, at the moment students have a 100Mb limit but some home folders are nearly twice that size.
What exactly does this script do?
How long does it take?
Anything else I should know?
And thankyou.
1 Attachment(s)
Re: Moving Users home directories and keep the permissions
This should be the one
Code:
rem sets permission on all files according to home directory name
for /D %%i in (*) do (
chown -r %%i "%%i\*.*"
)
pause
You run it at the same level as your home folders so if you have your year groups in seperate folders you need to run it in each. Of course do a test in a safe location first so you can get the hang of it. It doesnt take very long to run depending on how much data there is. There are also less hoops to jump through than using subinacl and tools like that. Its just simple and works
The official site seems to be filtered by my RBC for some reason so heres the program.
Oh and I forgot to add if you use RObocopy in the future it will preserve the file ownership.
Re: Moving Users home directories and keep the permissions
Quote:
Originally Posted by ChrisH
Oh and I forgot to add if you use RObocopy in the future it will preserve the file ownership.
...even to a different HDD, wipe the server and cleanly install, then put the home directories back?
If so, thats good :) I need to do the above, tho its all backed up using robocopy and script which i've created from a simple script [thx mark ;)].
I use that for backing up the pupil/staff home dirs...
sorry - i digress :)
Nath
Re: Moving Users home directories and keep the permissions
Have you tried Microsoft File Server Migration Toolkit?
I've used it to migrate shares from Windows 2000 to 2003 but you might be able to use it to migrate between 2000 servers.
FSMT