Windows Equivalent of Linux /home Folder on Separate Partition/Drive?
January 25, 2016 7:05 AM   Subscribe

I know Linux, I don't know Windows. On Linux, I routinely create a separate /home partition on its own drive.

My backup is done via a shell script that runs daily to tar and gzip specific folders in /home to an external drive. There's one archive per day, and the script maintains the 30 most recent archives.

The script also deposits the most recent archive to my Dropbox directory, deleting the previous day's archive.

Linux is so simple to reinstall that I do not bother with any kind of complete system backup/restoral scheme.

How can I create the equivalent of this in a new Win10 install? ("New" as in "has not happened yet")
posted by justcorbly to Computers & Internet (13 answers total) 1 user marked this as a favorite
 
I'd go with something like SyncBackSE, assuming you don't want a cloud-based solution (e.g. Backblaze). SyncBackSE will do all of the above, although you'll need to learn how to use the 'variables' feature to put a date into the filename of your archives. I've been using SyncBackSE for a number of years now, and I'm really happy with it.
posted by pipeski at 7:11 AM on January 25, 2016


You can do this in Windows 7 for the "named locations" like My Documents:
Redirect a folder to a new location
I don't know if Windows 10 has the same thing.

You also sometimes need to do this (one-time) on an application-by-application basis; for example you can tell Steam to store your game library in a different location.

And you can choose to install an application in a location other than the default "C:\Program Files\..."

This is what I do, and I've pretty much got a complete separation of OS vs Data.
(In my case it's to separate what goes on the SSD vs the HDD, but similar to your idea)

It's definitely not as straightforward as maintaining a /home partition, but it's something.
posted by jozxyqk at 7:22 AM on January 25, 2016 [1 favorite]


Response by poster: @pipeski: How will SyncBackSE enable the equivalent of creating a separate /home partition on a separate drive? In Linux, this is done by creating the partitions before, or during, the OS installation.

In Linux/Unix, each user has a directory in /home, which is a directory that *may* be mounted on its own partition. I put my /home directory on its own partition on its own drive. When a reinstall is needed, I preserve everything in that /home partition my simply telling the installer's partitioner to include it without formatting it. I'm assuming there's a Windows equivalent.
posted by justcorbly at 7:26 AM on January 25, 2016 [1 favorite]


Response by poster: I think I should add that /home in Linux houses user-specific files/data and application configuration files, but not, typically, applications.
posted by justcorbly at 7:33 AM on January 25, 2016


Right.. just pointing out that you can house different things in different places, but you have to do the legwork for each individual choice as a setup task.
posted by jozxyqk at 7:34 AM on January 25, 2016 [1 favorite]


rdiff-backup seems to work on both linux and windows. you might find you can use it to make a solution that is consistent across platforms.
posted by andrewcooke at 7:50 AM on January 25, 2016


Response by poster: Does Windows have a direct equivalent of /home that I can put on its own partition on a separate drive during the install and that can survive a Windows restoral/reinstallation intact?
posted by justcorbly at 8:07 AM on January 25, 2016


Does Windows have a direct equivalent of /home that I can put on its own partition on a separate drive during the install and that can survive a Windows restoral/reinstallation intact?

No.
posted by koolkat at 8:09 AM on January 25, 2016 [2 favorites]


You can save your documents and other files ("My Documents") on a separate partition, which will survive a reinstall/restore, but you'll lose all the config files, etc.
posted by notyou at 8:46 AM on January 25, 2016


If you decide to move the user directories to another drive you will also need to modify the registry. Linking the user directory is not enough in this case.

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList]
"ProfilesDirectory"
posted by nostrada at 10:19 AM on January 25, 2016


Best answer: Does Windows have a direct equivalent of /home that I can put on its own partition on a separate drive during the install and that can survive a Windows restoral/reinstallation intact?

The C:\users\yourusername is roughly equivalent to this. Here's some basic info. Note that Microsoft does not recommend moving this directory as it's likely to cause problems. I would back it up rather than move it.

There are various kinds of reinstalls for Windows 10. One wipes your system drive, including your user directory if it's on that drive. Another is effectively a repair install, where your data is maintained. Windows Entropy is much, much less of an issue than it used to be. I don't imagine you'll have unrepairable installs very often, if that's your concern.

Be aware that Linux is much more modular than Windows. Windows applications put hooks all over your system drive, so you can't necessarily expect that a newly installed copy of Windows with the same apps and same user directory will result in exact the same setup.

Some apps store preferences in the Windows Registry, in the c:\Program Data\YourApplication folder or in either c:\Program Files\YourApplication or in the c:\Program Files (x86)\YourApplication folder.

Generally, backing up your user profile will get you most of the way back to where you need to be, but it's not 100%. You can generally account for this on an app-by-app basis by modifying your script, but you'll have to research each app individually.

Just to be clear, data generally goes into the \users\documents or \users\pictures, \users\music directories automatically, so you're covered there.

Also note that the data directories mentioned above can be safely moved to where you want them. It's the preferences directories that are part of the entire user profile that can be problematic to move.
posted by cnc at 11:11 AM on January 25, 2016 [1 favorite]


Does Windows have a direct equivalent of /home that I can put on its own partition on a separate drive during the install and that can survive a Windows restoral/reinstallation intact?

Short answer: no.

That's of course a lie, but I have many years of Windows system administration experience to tell me it might as well be true.

On Windows XP, the rough default equivalent of /home was C:\Documents and Settings. Post-Vista, it's C:\Users and there is a hidden NTFS junction, with Traverse but not Read permissions set, from C:\Documents and Settings to C:\Users.

There is no longer any supported method for moving a single user profile (the folder that normally resides at C:\Users\%USERNAME%, roughly equivalent to ~ or /home/$USER) to somewhere else in an existing Windows installation; there has never been a supported method for moving the profile root (normally at C:\Users, roughly /home). You can do either by editing Registry settings, but things will break. You can also do the latter during installation, but only by fartarsing about with unattended settings in automated installation tools; there's no option provided for that in the standard installer's GUI. Honestly, you do not want to go down that rabbit hole.

There is still some support for redirecting individual Documents, Pictures, Music etc. folders to locations other than the default C:\Users\%USERNAME%\Documents, C:\Users\%USERNAME%\Pictures and so forth. You have to do that for each special folder for each user, one at a time. And of course it will eventually cause you more pain as something somewhere fails to respect your non-default folder locations (possibly aided and abetted by the forest of backward-compatibility Documents and Settings junctions that Windows will not update as you do these redirections) quite apart from the fact that setting them up was painful in and of itself.

NTFS allows you to mount a separate filesystem over any existing but empty directory, either instead of or as well as giving that filesystem its own drive letter. So in theory you could use that mechanism to achieve the same thing you do by making /home its own filesystem on Unix.

But Windows is not Unix, and not even much like Unix; it heavily penalizes creative system administration. The further you stray from the recommended default locations for things, the more grief you will cause for yourself; mounting filesystems on top of directories, in the Windows worldview, counts as an obscure operation and therefore fairly extreme straying. Lots of Windows mechanisms rely on being able to rename files into place, often at boot time. Renaming is an operation that requires the original and final locations to be inside the same filesystem. If you set things up so that this can't safely be assumed true on the basis of the drive letters at the front of the pathnames, Shit Will Break. Yes, this is appalling. True all the same.

Like you, I understand the value of having separate filesystems for / and /home, and for a long time I used to hack my way through thickets of ridiculous issues in order to set Windows boxes up that way as well, both for me and for customers. Eventually I got sick of dealing with all the ensuing nonsense. Nowadays I just suck it up like a good little Microsoft customer and do what Microsoft tells me I should, which is to put the entirety of every Windows installation on a single partition and leave it there.

I recommend that you abandon all hope of using sane partitioning to achieve the possibility of a clean Windows reinstallation that preserves user-specific settings. Windows simply makes doing that harder than it's worth. Do your Windows installation the simplest possible way, work out a backup strategy for your users' stuff that would let you restore it all onto any new Windows installation, and call that Near Enough.

If you want the bulk of your users' documents, pictures, music, videos, downloads and so forth to end up on some other drive than your system drive (perhaps because your system drive is a fast but relatively small SSD) then the Windows Way to achieve that is by using the Libraries feature. On Windows 10, you have to turn it on first.
posted by flabdablet at 10:39 PM on January 25, 2016 [1 favorite]


Study up on Windows 10 "Libraries".
posted by nogero at 11:22 AM on February 28, 2016


« Older I loved Myst/Riven. What books would I love?   |   How do I identify a cabinet hinge to order... Newer »
This thread is closed to new comments.