Hi there, I want to do a reinstall and keep my files from my home directory safe and carry them over to the new install. I think I know roughly to do but there are some points I am uncertain of and would really appreciate any guidance / advice. Thanks in advance and please let me know if I should provide more information of my system.
Some info regarding the system
My lsblk looks like this:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 1 0B 0 disk
nvme0n1 259:0 0 931.5G 0 disk
├─nvme0n1p1 259:1 0 512M 0 part /boot/efi
├─nvme0n1p2 259:2 0 922.2G 0 part /var/cache
└─nvme0n1p3 259:3 0 8.8G 0 part [SWAP]
nvme1n1 259:4 0 238.5G 0 disk
My first drive is partitioned with BTRFS.
The second drive “nvme1n1” is currently empty since I just zero’d it using dd if=/dev/zero of=/dev/nvme1n1. I’m pretty sure I’ll have to do some formatting to the first before doing what I describe below, but am not sure what needs to be done.
I want to do the following:
Copy current /home to second “Back-up” drive using the following command (i am uncertain of the destination directory currently shown as “/dev/nvme1n1” sudo rsync -a --info=progress2 --exclude=".local" --exclude=".config" --exclude=".cache" /home/ /dev/nvme1n1
Reinstall EOS on my main drive.
Copy my /home directory back onto my main drive with: sudo rsync -a --info=progress2 /dev/nvme1n1/ /home/
The result I hope to obtain is for my current home directory to be safe on the new install while maintaining the default configs from the new install.
I apologize for the extremely basic request but I want to be sure what I’m doing is correct to avoid losing all my important files in my /home
Unless you have other need for it…get the second drive setup and get your /home data on it. Then, when you reinstall, during setup have it mount your second drive as /home, leaving the first drive for /. This way your home drive is on a second drive which has all kinds of benefits (like not having to move it around when you reinstall)
Thanks for the response, how would I go about doing this? I’m currently on btrfs but not sure if it’s the right filesystem for me. Does filesystem even matter for this?
I’m assuming I would just do as @ivanhoe said in the start of his response to copy the /home across, but what do I do after that to mount the /home? Does it happen during the install process or do I do it post install?
Sorry for all the questions and thanks again for the response.