+ Post New Thread
Results 1 to 10 of 10
Windows Server 2008 R2 Thread, Data migration in Technical; Hi all,hope someone can help with this. Sure it can be done..... I am migrating users home directory contents from ...
  1. #1

    Join Date
    Jun 2010
    Location
    Cardiff
    Posts
    78
    Thank Post
    35
    Thanked 3 Times in 3 Posts
    Rep Power
    9

    Data migration

    Hi all,hope someone can help with this. Sure it can be done.....

    I am migrating users home directory contents from Z:\student data\yr11\%username% to h:\student data\yr11\%username%$\

    instead of going into the origional location and copying stuff to the new root folder (2000+ folders) is there a way of doing this via a utill or script?

    Basically i want all data from within the origional folder into the new withour copying the origional root folder.

    hope this makes sence and im not trying to re-invent the wheel !

    Many thanks in advance

  2. #2
    kearton's Avatar
    Join Date
    May 2007
    Location
    Yorkshire, via NZ ;)
    Posts
    857
    Thank Post
    149
    Thanked 94 Times in 82 Posts
    Rep Power
    43
    It's possible I completely misunderstand what you want (and this may be exactly what you are trying NOT to do?) but Robocopy is my weapon of choice when it comes to copying or moving large amounts of data.

    Put a list of usernames (1 per line) in a file called users.txt then use something like:

    FOR /f %i IN (users.txt) DO robocopy "Z:\student data\yr11\%i" "h:\student data\yr11\%i" /e /copyall (/move?) (/log:c:\usercopy.txt?)

    Usual disclaimers.... Do this at your own risk.... Robocopy will happily DELETE things too if you tell it to... I ALWAYS test these scripts with a few test folders first.

  3. Thanks to kearton from:

    richbrowncardiff (4th August 2012)

  4. #3

    SYNACK's Avatar
    Join Date
    Oct 2007
    Posts
    11,081
    Thank Post
    853
    Thanked 2,677 Times in 2,271 Posts
    Blog Entries
    9
    Rep Power
    769
    Another vote for robocopy, it is a command line app but will keep security acls on the files and is probably the fastest method avalible. I have used it many, many times for that kind of thing.

  5. #4
    pritchardavid's Avatar
    Join Date
    Sep 2009
    Location
    South Ockendon, Thurrock, United Kingdom
    Posts
    932
    Thank Post
    18
    Thanked 64 Times in 58 Posts
    Rep Power
    25
    Another way of doing this, this is the way i do this sort of stuff


    1- Create a folder, best to name it the name you want for the share.
    2- Set the correct share permissions (groups recommended) and also NTFS permissions.
    3- Copy all the users folders to the folder you just setup.
    4- Then in Active Directory highlight all your users for this folder change and then right hand click and properties, tick the box for the home drive, choose the drive letter and then type in your share path and then %username% so yours will be \\student data\yr11\%username%\
    This will change all the users folders to the correct permissions for each user.

    For this to work through you need your current users folders named with their username

    I have used this method a few times, works great!
    Last edited by pritchardavid; 3rd August 2012 at 11:15 PM.

  6. Thanks to pritchardavid from:

    richbrowncardiff (4th August 2012)

  7. #5

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    15,843
    Thank Post
    876
    Thanked 1,679 Times in 1,459 Posts
    Blog Entries
    12
    Rep Power
    444
    Quote Originally Posted by pritchardavid View Post
    Another way of doing this, this is the way i do this sort of stuff


    1- Create a folder, best to name it the name you want for the share.
    2- Set the correct share permissions (groups recommended) and also NTFS permissions.
    3- Copy all the users folders to the folder you just setup.
    4- Then in Active Directory highlight all your users for this folder change and then right hand click and properties, tick the box for the home drive, choose the drive letter and then type in your share path and then %username% so yours will be \\student data\yr11\%username%\
    This will change all the users folders to the correct permissions for each user.

    For this to work through you need your current users folders named with their username

    I have used this method a few times, works great!
    Are you sure step 4 works? With server 2008 R2 i wont work if the folder already exists.

  8. #6

    Join Date
    Jun 2010
    Location
    Cardiff
    Posts
    78
    Thank Post
    35
    Thanked 3 Times in 3 Posts
    Rep Power
    9
    Thanks all.

    Im looking at the robocopy (gui) route which works as i need (x:\location\yr11/username) > (y:\location\yr11\username$) **contents of original username copied into username$**

    I just need to get the process a little more automated due to the number of users involved.

    regarding getting the usernames.txt together do you know of a way of getting this or do i need to manually create the list ?

    Many thanks and sorry to sound dumb i used to do this kind of stuff all the time but spend my life in group policy and AD now!

  9. #7
    kearton's Avatar
    Join Date
    May 2007
    Location
    Yorkshire, via NZ ;)
    Posts
    857
    Thank Post
    149
    Thanked 94 Times in 82 Posts
    Rep Power
    43
    Quote Originally Posted by richbrowncardiff View Post
    regarding getting the usernames.txt together do you know of a way of getting this or do i need to manually create the list ?
    Open a Command Prompt at x:\location\yr11 and do a "DIR >c:\usernames.txt"
    Then open the file in Excel as Fixed Width and strip off the first 36 characters.
    Then Sort it alphabetically and clean up the handful of extra lines (bytes free, .., etc) that remain.

  10. Thanks to kearton from:

    richbrowncardiff (4th August 2012)

  11. #8
    DMcCoy's Avatar
    Join Date
    Oct 2005
    Location
    Isle of Wight
    Posts
    3,434
    Thank Post
    10
    Thanked 489 Times in 429 Posts
    Rep Power
    111
    Quote Originally Posted by kearton View Post
    Open a Command Prompt at x:\location\yr11 and do a "DIR >c:\usernames.txt"
    Then open the file in Excel as Fixed Width and strip off the first 36 characters.
    Then Sort it alphabetically and clean up the handful of extra lines (bytes free, .., etc) that remain.
    or dir /b

  12. 2 Thanks to DMcCoy:

    kearton (4th August 2012), richbrowncardiff (4th August 2012)

  13. #9
    kearton's Avatar
    Join Date
    May 2007
    Location
    Yorkshire, via NZ ;)
    Posts
    857
    Thank Post
    149
    Thanked 94 Times in 82 Posts
    Rep Power
    43
    Quote Originally Posted by DMcCoy View Post
    or dir /b
    Yep. That's much easier (Duh me!)

  14. #10
    pritchardavid's Avatar
    Join Date
    Sep 2009
    Location
    South Ockendon, Thurrock, United Kingdom
    Posts
    932
    Thank Post
    18
    Thanked 64 Times in 58 Posts
    Rep Power
    25
    Quote Originally Posted by FN-GM View Post
    Are you sure step 4 works? With server 2008 R2 i wont work if the folder already exists.
    Yes it sure does work

    It does come up with an error when you apply it but it does apply the correct permissons

SHARE:
+ Post New Thread

Similar Threads

  1. FRONTER Data Migration - Summer Holidays work - London
    By Will_Townsend in forum Educational IT Jobs
    Replies: 5
    Last Post: 21st September 2011, 12:48 PM
  2. New domain data migration
    By gshaw in forum Windows
    Replies: 6
    Last Post: 6th December 2010, 08:41 AM
  3. Server Upgrade Data migration
    By duxbuz in forum How do you do....it?
    Replies: 12
    Last Post: 26th February 2010, 10:01 AM
  4. Folder redirection after data migration
    By adamf in forum Windows Server 2000/2003
    Replies: 0
    Last Post: 3rd March 2009, 09:06 AM
  5. Data migration into Facility
    By hmd01 in forum MIS Systems
    Replies: 2
    Last Post: 10th December 2007, 05:02 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •