Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

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?

+4
−0

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?

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.
Why should this post be closed?

1 comment thread

Try to not store too much and too spread on a system (9 comments)
Try to not store too much and too spread on a system
alx‭ wrote 7 months ago

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.

Andreas witnessed the end of the world today‭ wrote 5 months ago · edited 4 months ago

Mind elaborating on how I am supposed to put everything on my main home computer into Git, and use that in my daily flow?

matthewsnyder‭ wrote 5 months ago

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.

Andreas witnessed the end of the world today‭ wrote 5 months ago · edited 5 months ago

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.

alx‭ wrote 4 months ago

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.

matthewsnyder‭ wrote 4 months ago

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.

alx‭ wrote 4 months ago · edited 4 months ago

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.

matthewsnyder‭ wrote 4 months ago · edited 4 months ago

I think ~/.config is supposed to be that now.

alx‭ wrote 4 months ago

Yup; that seems to be it now. :)