ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Windows servers- move files from old to new

    IT Discussion
    3
    15
    1.2k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • L
      LJ
      last edited by

      We currently use a DellT110 running a windows server 2008R2 domain that acts as a staff file server. Now we have a Dell t330 running Hyper-V 2016 with two VMs running Windows Server 2016. All three have been joined to our existing domain. One will be our file server. Next step: move and/or copy the files to the new file server and hopefully carry over home directories and shared directories and associated permissions etc. We have less than 100 GB files. 6 Users.

      Need recomendations. Considering DFS and Robocopy (https://community.spiceworks.com/topic/1966255-using-windows-dfs-to-migrate-file-share). Looks complicated.
      Many of you have done this countless times. Suggestions?

      1 Reply Last reply Reply Quote 0
      • pmonchoP
        pmoncho
        last edited by pmoncho

        Here is the script I with Robocopy for one server about 4 months ago.

        SET SORC=YourSourceDrive:\
        SET DEST=YourDestDrive:\
        SET LOG=SomeDrive:\robo.log
        
        ROBOCOPY %SORC% %DEST% /COPYALL /SEC /E /R:1 /W:1 /Z /MT:6 /NP /LOG:%LOG%
        @if errorlevel 16 echo ***ERROR*** & goto END
        @if errorlevel 8 echo **FAILED COPY*** & goto END
        @if errorlevel 1 echo --Copy Successful-- & goto END
        @if errorlevel 0 echo --Copy Successful-- & goto END
        goto END
        
        :END
        
        pause
        
        1 Reply Last reply Reply Quote 0
        • L
          LJ
          last edited by

          Thanks! My first question. I assume this runs on the server with the existing set of files.
          2nd question: With as few users as I have do you recommend just manually editing the login script to change the home directory and shared files? Is there a easier/better way?

          pmonchoP 1 Reply Last reply Reply Quote 0
          • L
            LJ
            last edited by

            another question: What needs to be done on the destination file server before the script is run?

            1 Reply Last reply Reply Quote 0
            • L
              LJ
              last edited by

              I'm looking up robocopy switches right now but at this point I'm not sure what all of the above does.

              pmonchoP 1 Reply Last reply Reply Quote 0
              • pmonchoP
                pmoncho @LJ
                last edited by

                @lj said in Windows servers- move files from old to new:

                Thanks! My first question. I assume this runs on the server with the existing set of files.
                2nd question: With as few users as I have do you recommend just manually editing the login script to change the home directory and shared files? Is there a easier/better way?

                1. I did it from the source server just to reduce any possible mistakes (Don't need those 🙂 )

                2. I use GPO's to set the users home dir and shared file folders. A login script will work too.

                You can run the script to copy over all the files first, check out the file perms to make sure they all are the same. You may have to set the Share permissions (there was a post here that talked about copying the Share permissions from the registry a while ago).

                1 Reply Last reply Reply Quote 0
                • L
                  LJ
                  last edited by

                  Thanks again. Can you give me some details about "I use GPO's to set the users home dir and shared file folders"? That's another area I need help with.

                  pmonchoP 1 Reply Last reply Reply Quote 0
                  • pmonchoP
                    pmoncho @LJ
                    last edited by

                    @lj said in Windows servers- move files from old to new:

                    I'm looking up robocopy switches right now but at this point I'm not sure what all of the above does.

                    It will copy ALL files, system and hidden, along with all subfolders (including empties) and the permissions. It will also be multi-threaded to move a little faster.

                    L 1 Reply Last reply Reply Quote 0
                    • L
                      LJ
                      last edited by

                      I'll try it late this afternoon or tomorrow. Have to leave this location in a few minutes. Thanks again. In the meanwhile if you get a chance post the GPO info.

                      1 Reply Last reply Reply Quote 0
                      • pmonchoP
                        pmoncho @LJ
                        last edited by

                        @lj said in Windows servers- move files from old to new:

                        Thanks again. Can you give me some details about "I use GPO's to set the users home dir and shared file folders"? That's another area I need help with.

                        If homedir means redirected folders then I would use MS documentation

                        For shared folders, I put a shortcut on their desktop to the share they need using a Group Policy Preferences. Also, my users are in groups so I assign GPO's and GPP's to groups not specific or all users.

                        1 Reply Last reply Reply Quote 1
                        • L
                          LJ @pmoncho
                          last edited by

                          @pmoncho
                          This is what I have from the MS site.
                          /copyall Copies all file information
                          /SEC Copies files with security
                          /E Copies subdirectories includes empty directories
                          /R:1 Specifies the number of retries on failed copies (1 in this example)
                          /W:1 Specifies the wait time between retries, in seconds (1 in this example)
                          /Z Copies files in restartable mode
                          /MT:6 Creates multi-threaded copies with N threads (6 in this case)
                          /NP Specifies that the progress of the copying operation (the number of files or directories copied so far) will not be displayed
                          /log Writes the status output to the log file (overwrites the existing log file).

                          Since this is copying and NOT moving or mirroring I can't go wrong. Right? Ha!

                          I am going to set it up as a scheduled task to run late one night.First I have to read about the share and file permissions.

                          SET SORC=YourSourceDrive:
                          SET DEST=YourDestDrive:
                          SET LOG=SomeDrive:\robo.log
                          should Source, destination and log all be drive letters and folders? If the share is setup on the destination folder with permissions for all domain users (intially) I guess robocopy doesn't have to know anything about shares? Thanks again.

                          pmonchoP 1 Reply Last reply Reply Quote 0
                          • pmonchoP
                            pmoncho @LJ
                            last edited by

                            @lj said in Windows servers- move files from old to new:

                            @pmoncho
                            This is what I have from the MS site.
                            /copyall Copies all file information
                            /SEC Copies files with security
                            /E Copies subdirectories includes empty directories
                            /R:1 Specifies the number of retries on failed copies (1 in this example)
                            /W:1 Specifies the wait time between retries, in seconds (1 in this example)
                            /Z Copies files in restartable mode
                            /MT:6 Creates multi-threaded copies with N threads (6 in this case)
                            /NP Specifies that the progress of the copying operation (the number of files or directories copied so far) will not be displayed
                            /log Writes the status output to the log file (overwrites the existing log file).

                            Since this is copying and NOT moving or mirroring I can't go wrong. Right? Ha!

                            I am going to set it up as a scheduled task to run late one night.First I have to read about the share and file permissions.

                            SET SORC=YourSourceDrive:
                            SET DEST=YourDestDrive:
                            SET LOG=SomeDrive:\robo.log
                            should Source, destination and log all be drive letters and folders? If the share is setup on the destination folder with permissions for all domain users (intially) I guess robocopy doesn't have to know anything about shares? Thanks again.

                            If at all possible, I am a copy and delete kinda guy (with backups on top of that) 🙂

                            This gives you the ability to make sure all is well before actually moving the data. There is also a /MIR switch which creates a mirror. Check that out too.

                            I used this script to move data from E to Z and back to E drives but you can use share paths too.

                            robocopy \\Yoursource\Path \\YourDest\Path
                            

                            Setup your share permissions and the robocopy script will take care of the NTFS permissions. If you want them the same.

                            1 Reply Last reply Reply Quote 0
                            • zachary715Z
                              zachary715
                              last edited by

                              This is how I did it the last time we migrated our file server a few years back. If I'm not mistaken, we did this the first time and let everything copy over while live, and then we ran it again later after we shut down the shares to ensure any changes that were made or new files, attributes, etc got copied over. The second time, it recognizes if the file is already there and just skips over it so it's much simpler. Then you just recreate the shares on the destination and you're done.

                              robopy source destination /E /COPYALL /DCOPY:T /R:3 /W:10 >C:\Robocopy.log
                              
                              /E = copy subdirectories, including empty ones
                              
                              /COPYALL = copies Data, Attributes, Timestamps, Security, Owner info, and Auditing Info
                              
                              /DCOPY:T = copies directory timestamps (COPYALL only does file timestamps)
                              
                              /R:3 = retry 3 times (default is 1 million)
                              
                              /W:10 = wait 10 seconds before trying again (default is 30 seconds)
                              
                              /MT:n = enables multi-threaded option which is supposed to speed up process. Default is 8. Can be between 1-128.
                              
                              https://techjourney.net/robocopy-syntax-command-line-switches-and-examples/
                              
                              1 Reply Last reply Reply Quote 1
                              • L
                                LJ
                                last edited by

                                Thanks everyone. I ran a script basically the same as the one pmoncho posted as the first reply. After doing that I then used this from Spiceworks https://community.spiceworks.com/topic/1992814-gpo-to-automatically-create-a-mapped-folder-for-new-users-which-created-from-tem
                                Create a GPO.

                                User Configuration>Preferences>Drive Map

                                To use the user's name in path, use %LogonUser%

                                i.e. \fileserver01\user_shares%LogonUser%_Share

                                While in the path box, if you press F3, a box will pop up showing you all your variable options

                                Image: https://content.spiceworksstatic.com/service.community/p/post_images/0000246600/59131727/attached_image/Netmap.png
                                After setting that up the domain users have the two new shares showing up (home folder and Shared ) and their file permissions etc seem to be just right and sending them where they need to go to use their files. I have told them not to use the use recent files from their apps but to search open from the new shares. I am a little scared about getting rid of the files from the old server. Should I just change the permission on the older files to denied or read only? Anyone already figured this out?

                                zachary715Z 1 Reply Last reply Reply Quote 0
                                • zachary715Z
                                  zachary715 @LJ
                                  last edited by

                                  Just disable the share or turn off the old server. Take a full backup of it to keep and move on.

                                  1 Reply Last reply Reply Quote 1
                                  • 1 / 1
                                  • First post
                                    Last post