Mapping Network Locations as Local Drives and Folders
Just to be clear, we’re this is NOT the same as mapped network drives! Why would you need to do this? Whats the point?
From time to time you may run across a software product that does not for whatever reason, work with network drives or shares. One such product comes to mind is Crashplan. It will only back up local resources.
So lets say you have a Windows system, and a NAS, you got lots of data on your NAS. How do you back it all up?
The answer is we have to trick windows in to treating a remote resource like a local ‘physical’ resource. To do this we can use the MKLINK command.
Making a link
The MKLINK command is by far the simplest simply open a command prompt, and enter the following:
mklink /D <PATH WHERE I WANT TO HAVE MY LINK> \\some\network\share
mklink /D C:\MyNasFolder \\mynetwork\share
Now when you access C:\MyNasFolder, it will look and act like a regular local folder. Which means you can not have Crashplan (or any other program that doesn’t like shares) access the files as if they were local resources.
Mapping vs Mounting are similar but different. The end goal is the same in that it gives you a local resource that points to a remote resource, but the mechanism that it uses is different. Mounting, link in *NIX systems makes remote resources appear as local resources.
So there you have it. A local folder, that CrashPlan can see in your windows system, backing up an otherwise unreachable resource to CrashPlan.
So this is a work around to limitations imposed by external systems. Lucky for us we can do this. But you should not use the mklink for all your needs, there are reasons these tools exist and you should read up on the proper use case or you could cause damage to your data.
Ben has been building VoIP solutions for over 15 years, has over 25 years of Linux administration experience, and enjoys problem-solving. When he is not coding something in Python, or tinkering with some project, you can often find him wandering through the forests and parks of the Pacific Northwest enjoying waterfalls, trails, and animals.