You are not logged in.

#1 2024-02-01 18:02:02

Dr_hawes
Member
Registered: 2023-08-24
Posts: 10

Copy home folder on to SD card/flash drive

So I want to reinstall Arch on my laptop and was wondering if there is a way to copy the home folder to put on an SD card or flash drive to save all the files. I don't think I am going to copy the home folder back on to the fresh install of Arch. Is it as simple as dragging and dropping the folder on to the drive or do I have to change some things first?

Offline

#2 2024-02-01 18:41:59

d.ALT
Member
Registered: 2019-05-10
Posts: 958

Re: Copy home folder on to SD card/flash drive

Dr_hawes wrote:

or do I have to change some things first?

Well... In this case I think just a $ cp -ar $HOME /MOUNTPOINT/TO/SD_CARD would suffice. I have a pretty simple-stupid $HOME layout so I've never encounter any sort of weird behaviors at all (be aware of some symlinks, maybe, eg.: Steam and wine's prefixes)


<49,17,III,I>    Fama di loro il mondo esser non lassa;
<50,17,III,I>    misericordia e giustizia li sdegna:
<51,17,III,I>    non ragioniam di lor, ma guarda e passa.

Offline

#3 2024-02-01 18:47:54

jonno2002
Member
Registered: 2016-11-21
Posts: 848

Re: Copy home folder on to SD card/flash drive

why do you want to re-install ?

Offline

#4 2024-02-01 19:58:56

Dr_hawes
Member
Registered: 2023-08-24
Posts: 10

Re: Copy home folder on to SD card/flash drive

To clear up space because I'm to lazy to just do it manually. Plus installing Arch or any OS is fun. Might also try a different DE.

Offline

#5 2024-02-01 20:58:25

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,257

Re: Copy home folder on to SD card/flash drive

If the SD card is FAT32 you're gonna trash your ownership and permissions.
If you don't have access to external storage w/ a usable FS, create a (compressed or not) tarball and copy that.

Offline

#6 2024-02-02 07:32:58

d.ALT
Member
Registered: 2019-05-10
Posts: 958

Re: Copy home folder on to SD card/flash drive

seth wrote:

If the SD card is FAT32 you're gonna trash your ownership and permissions.

Wouldn't a copy-back into the new $HOME take care of re-creating proper dmask= fmask= combo? O.o


<49,17,III,I>    Fama di loro il mondo esser non lassa;
<50,17,III,I>    misericordia e giustizia li sdegna:
<51,17,III,I>    non ragioniam di lor, ma guarda e passa.

Offline

#7 2024-02-02 08:31:34

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,257

Re: Copy home folder on to SD card/flash drive

You're not gonna be able to restore whether a file was executable, read-only, foreign owned, … after you flattened that by copying it onto fat32 - the information is lost.
Another issue w/ fat32 can be the limited set of valid filename characters.

fat32 is no suitable backup FS (so I was poiting that out because for "SD card" it also a common choice/pre-formatted)

Offline

#8 2024-02-02 08:34:18

dogknowsnx
Guest

Re: Copy home folder on to SD card/flash drive

If you enjoy reinstalling so much, you may want to consider putting your /home on a separate partition...

#9 2024-02-02 09:41:31

d.ALT
Member
Registered: 2019-05-10
Posts: 958

Re: Copy home folder on to SD card/flash drive

seth wrote:

after you flattened that by copying it onto fat32 - the information is lost

Gotcha


<49,17,III,I>    Fama di loro il mondo esser non lassa;
<50,17,III,I>    misericordia e giustizia li sdegna:
<51,17,III,I>    non ragioniam di lor, ma guarda e passa.

Offline

#10 2024-02-02 09:44:00

d.ALT
Member
Registered: 2019-05-10
Posts: 958

Re: Copy home folder on to SD card/flash drive

dogknowsnx wrote:

/home on a separate partition...

Or a BTRFS subvolume per-se wink


<49,17,III,I>    Fama di loro il mondo esser non lassa;
<50,17,III,I>    misericordia e giustizia li sdegna:
<51,17,III,I>    non ragioniam di lor, ma guarda e passa.

Offline

#11 2024-02-02 14:59:41

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,612

Re: Copy home folder on to SD card/flash drive

Or, good old-fashioned tar.  It does not matter if the underlying file system is from the last millennium (even though tar is).

https://wiki.archlinux.org/title/Archiv … ompression


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#12 2024-02-02 15:06:29

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,257

Offline

#13 2024-02-02 15:51:22

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,612

Re: Copy home folder on to SD card/flash drive

My bad, missed line two.  More coffee for me.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

Board footer

Powered by FluxBB