Link to home
Start Free TrialLog in
Avatar of gmbaxter
gmbaxterFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Data migration from HFS+ to NTFS

I'm currently looking at how to migrate a large amount of data from HFS+ volumes hosted on a Apple Xserve over to NTFS volumes on Server 2008 R2.

The data is files from user's home folders, and i was planning on updating their AD home folder location to create a blank home with the correct permissions, then strip permissions from the old location and transfer the files in.

I've tried passenger's folder migration utility which does seem to work with the destination share mounted with admin credentials, but around 25% of the files were not transferred on testing:

--------------------
Matched contents of
/Volumes/A\-D/tomove/normalsd1
to
/Volumes/A\-DHomes\$/normalsd1
Copying... Verifying... Failed: destination (9,419) and source (2,556) are different file counts
--------------------

Any suggestions?

Much appreciated,

Thanks.
ASKER CERTIFIED SOLUTION
Avatar of maximus5328
maximus5328
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of gmbaxter

ASKER

I want to strip all permissions before migrating and have the contents of the users home folder moved into a new blank home folder. Permission inheritance will then take care of correcting permissions, i just need a way of scripting / or a program to do this as i can't do it manually.

Thanks.
when you copy over SMB, permissions are not preserved
ok, so if i didn't create new home folders in the new location, then did cp -R the entire contents of the old share to the new SMB mounted share, how could i correct permissions at the new share.

i looked at cacls and icacls earlier, but couldn't get it to work.

it'd need to do:

echo y| icacls username domain\username modify
echo y| icacls username domain\admins full control

 
have you tried first:
icacls folder_name /reset /T
then:
icacls folder_name /grant username:M
How do I wildcard the user name? Eg %%I I think it was in cacls. Usernames are the same as the folder names.
first, confirm on a single folder that icacls command does what you want it to do.
next, to run it on all folders do the following:
cd into the directory containing folders you want to change
confirm that you are in the correct place by running
dir /ad/b

Open in new window

you should see a list of folders you are about to change one per line
run the following
for /f "delims=" %i in ('dir /ad/b') do icacls %i /reset /T

Open in new window

repeat with the second icacls command
for /f "delims=" %i in ('dir /ad/b') do icacls %i /grant %i:M

Open in new window

icacls %i /grant %i:M

This grants special permission to the folder only, no subfolders of files.

I used: icacls testuser /grant testuser:(OI)M
which did work - is this correct?

However, puting this in a for loop didn't work. Here is my syntax:

E:\A-DHomes$>for /f "delims=" %i in ('dir E:\A-DHomes$\') do icacls %i /grant %i:(OI)M
tried without the dir bit too but that didn't work.

but this errors out. Any ideas?
Error:

      E:\A-DHomes$>icacls  Volume in drive E is Data /grant  Volume in drive E is Data
      :(OI)M
      Invalid parameter "in"
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
don't know about trailing spaces
I'm going to transfer via smb starting tomorrow afternoon. Fingers crossed!
SMB transfer was only viable option really.

icacls loop sorted out the permissions.