Comments on How do I migrate my main filesystem to a new drive?
Post
How do I migrate my main filesystem to a new drive?
I want to switch hard drives. How do I migrate my root FS from the drive it's on, to the new one, so that everything is exactly as it is?
I recommend that you minimize the amount of data you need on your computer, and use git for the few files that you still need. That way, you don't need to do this thing, which is painful.
Mind elaborating on how I am supposed to put everything on my main home computer into Git, and use that in my daily flow?
Andreas, this is a very common approach in Unix (it is trickier to do on Windows so it's less common there). If you search online for "dotfiles" you can find lots of information. You can also ask here (and use the dotfiles
tag).
It is a somewhat extensive topic, and it would difficult to cover in detail in a comment thread. But alx's recommendation of setting up dotfiles from the get go is a good one - I tend to rely on that also, barring special cases.
matthewsnyder Huh, seems to be a term used quite frequently, as opposed to on MacOS, where it’s merely a way to hide directories. Most of the mentions I found by a quick look, are about development environments, though, something quite different than a home computer for normal, casual use. I’m assuming there’s a more friendly system built on top of Git, then, since you can’t possibly be expected to manually do git commit
for every sort of data that might exist. Anyway, thanks for the confirmation. I might post a question. It might need a few duplicate signposts to be discoverable, though.
For an example, here's the git repository for my configuration files (aka, dotfiles): http://www.alejandro-colomar.es/src/alx/alx/config.git/
When I start using a new computer, the first thing I do is clone that repo, and then run make mbsync mutt bash git vim
and a few other targets.
Other than that, I have an encrypted flash drive, with sensitive dotfiles, in encrypted partitions, as documented in https://linux.codidact.com/posts/290202/290204#answer-290204
That's all I need in a computer. All I do normally is program, which is of course also in git, so I don't care if my computer burns tomorrow. At most, I'll have a dozen files that I need to backup apart from the configuration files.
Andreas - on Unix, it's a very common convention to start filenames with .
to indicate that they should be "hidden". Shells, file listers, file managers are all supposed to oblige by treating them as such. Mac follows this tradition.
Usually the things people want to hide are in fact the config directories (I find this dumb, but so it is). So "dotfile" first became slang for these "hidden" config files. Even though you might hide other files, usually it's the configs. Then someone realized that it's good to put these under git, and of course what else would you call the repo if not "dotfiles". Then it turned out you have to do some special tricks to make it work in git, so now "dotfiles" is also a name for how to do it.
Bit of terminology confusion, but at this point only one sense of "dotfiles" is useful and interesting, hence people don't specify.
I wish there had been a ./etc/ directory within the home dir that would have holded all user confis, but for historic reasons, they're all cluttering the home root dir, which is probably why they wanted them hidden. Bad organization of old Unix users, I guess.
I think ~/.config
is supposed to be that now.
This community is part of the Codidact network. We have other communities too — take a look!
You can also join us in chat!
Want to advertise this community? Use our templates!
Like what we're doing? Support us! Donate
1 comment thread