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.
LVL 11
gmbaxterAsked:
Who is Participating?
 
maximus5328Commented:
I would share folders on XServe via SMB then copy over the network.
0
 
gmbaxterAuthor Commented:
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.
0
 
maximus5328Commented:
when you copy over SMB, permissions are not preserved
0
Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

 
gmbaxterAuthor Commented:
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

 
0
 
maximus5328Commented:
have you tried first:
icacls folder_name /reset /T
then:
icacls folder_name /grant username:M
0
 
gmbaxterAuthor Commented:
How do I wildcard the user name? Eg %%I I think it was in cacls. Usernames are the same as the folder names.
0
 
maximus5328Commented:
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

0
 
gmbaxterAuthor Commented:
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?
0
 
gmbaxterAuthor Commented:
Error:

      E:\A-DHomes$>icacls  Volume in drive E is Data /grant  Volume in drive E is Data
      :(OI)M
      Invalid parameter "in"
0
 
gmbaxterAuthor Commented:
This did the trick:

E:\>cd A-DHomes$

E:\A-DHomes$>for /d %i in (*) do icacls %i /grant %i:(OI)(CI)M


Last semi-related question is, how to recursively strip trailing spaces from files and folders, as this causes issues with the macs not being able to open the files.

Thanks.
0
 
maximus5328Commented:
don't know about trailing spaces
0
 
gmbaxterAuthor Commented:
I'm going to transfer via smb starting tomorrow afternoon. Fingers crossed!
0
 
gmbaxterAuthor Commented:
SMB transfer was only viable option really.

icacls loop sorted out the permissions.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.