Link to home
Start Free TrialLog in
Avatar of Majicthise
Majicthise

asked on

Migrating shares to new server

I've a windows server VM on esx with a couple of drives. One for OS and one for a file share with fairly convoluted permissions. The VM server has to go but the shares have to stay.

Can I fire up a new VM with a single disk then bring it online and then turn off old VM, and attach the disk that hosts the VM to the new server (yes I understand its in another folder and probably not best practise) while maintaining the share permissions?

If not what's the best way to migrate shares to a new host VM?

Many thanks
Avatar of arnold
arnold
Flag of United States of America image

Which os?
How are the shares accessed. Server based shares or domain based shares?
There are vbs/powershell scripts that deal with share definition/copy.
Dfs-R is a tool that can be used to get data from old server to new server while maintaining it synchronized.
You could, but the share information is local to the OS while permission/structure is on the disk.

IMHO, use vbs/powershell scripts that enumerate shares on the current host, create those shares with appropriate where they will be on the new host, then use dfs-R to get data from folder on current host, to the newhost destination folder.

If using domain based share, the transition between targets, is transparent to the user, by when ready, flip which target is preferred, or the old server is least preferred.
Avatar of Majicthise
Majicthise

ASKER

Thanks


Its to mIgrate from Server 2008 to an existing 2012 server

These are server based shares but I could replicate via DFS-R I guess.

Only downside is 2 copies needed initially.


I have used it for 1 file share as it's small but was hoping not to have to use it for the larger share.


You got any links to the scripts to check it out anyway?

Can I fire up a new VM with a single disk then bring it online and then turn off old VM, and attach the disk that hosts the VM to the new server (yes I understand its in another folder and probably not best practise) while maintaining the share permissions?

If not what's the best way to migrate shares to a new host VM?

Yes, it's easy to do, and you can also export the registry of the old VM, import into a new OS, and you are all done.

The NTFS ACL permissions will still exist on the NTFS volume, the SHARE info is in the OLD OS!

So Export and Import and you are all done.

All that may be different is if you give the VM a new name.....or IP Address etc

if you keep the same machine name and IP Address, you are all done.
Please clarify two copies?
The option is one you restore data on the 2012 from backup , pre-stage
The other, is let DFS-R when configured, limit its bandwidth, and let it take as long as it needs, depending on the amount of data in place, it will not take that much time. to get the existing data if the data in large volume changes, that is something else.

https://gallery.technet.microsoft.com/scriptcenter/Migrate-Share-Permissions-eb9e9ec4

There are similar scripts that migrate printers if needed.

you can use the windows backup to backup the existing data on the 2008 if not regularly backed ...

.As per this article - Maybe a little old, - Windows 2003 server!


It does say if I have existing shares they will be over-written,  

So  could I export the reg key from the new machine.

Import the key from the old machine and then manually add the share info from the new registry key.



Please clarify.

The point is the share is defined on the os, while the data includes security.

This was a quick grab to illustrate what is available.
It does say if I have existing shares they will be over-written,  

So  could I export the reg key from the new machine.

Import the key from the old machine and then manually add the share info from the new registry key.

Correct.

it also does depends on how many shares you have if you only have 1 or 2, it's easier to just setup shares again!

and in-place upgrade is even quicker.....
As per "this" article seems to be a corrupt URL but presumably it is how to export and import ..\LanmanServer\Shares ?

It will overwrite the current shares but if it's a new server there won't be anything but the default shares anyway.
I have an article on migrating file servers - see this: https://www.experts-exchange.com/articles/29316/File-Server-Migration-Methods.html

The File Server Migration Service David mentioned is not included in my article but a perfectly valid option *IF* you have access to a Windows Server 2019 system.
Does this "File Server Migration Service" allow for fork-lifting the [virtual] disks from one server to another and just deal with share permissions or does it insist on copying the entire contents from one server to another?
it copies shares.
Thanks everyone.
I have as yet to do this but will bear it all in mind when I do.
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.