Copy @home, installed packges (flatpak pacman aur) from old install

I did a fresh install of garuda linux on a new disk but I want to transfer my @home volume from my old disk. As well as installed packages (pacman, aur, flatpak)

I at first tried to just do a cp -r but the problem is I have some files under my old home that our not owned by my user such as waydroid files.

So I think it would be better to just clone the whole @home from my old disk to the new one.

I found this https://blogs.oracle.com/linux/post/btrfs-sendreceive-helps-to-move-and-backup-your-data

and this Copying a BTRFS volume to another disk, the easy way 🌐:aligrant.com

but I couldn’t get it to work. the furthest I got was the second step of sending the snapshot of the @home volume to my new disk but it just hangs there and then eventualy black screens

[root@Garuda-Linux zany130]# sudo btrfs send /mnt/broken/folder_0 | btrfs receive /mnt/old/
At subvol /mnt/broken/folder_0
At subvol folder_0

from what I have been reading I can’t just dd either as that would clone my whole btrfs partition not just the @home volume. I don’t want to do this because the root volume of my btrfs partition is messed up and unboottable so I would just end up with the same broken install on my new disk

garuda-inxi
System:
Kernel: 6.6.9-zen1-1-zen arch: x86_64 bits: 64 compiler: gcc v: 13.2.1
clocksource: tsc available: hpet,acpi_pm
parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
root=UUID=8a69f047-feee-46cf-81a1-d299eb173883 rw rootflags=subvol=@
quiet loglevel=3 ibt=off
Desktop: KDE Plasma v: 5.27.10 tk: Qt v: 5.15.11 wm: kwin_x11 vt: 2
dm: SDDM Distro: Garuda Linux base: Arch Linux
Machine:
Type: Desktop Mobo: ASRock model: X470 Taichi serial: <superuser required>
UEFI: American Megatrends v: P5.10 date: 10/20/2022
Battery:
Device-1: hidpp_battery_0 model: Logitech Wireless Mouse MX Master 3
serial: <filter> charge: 100% (should be ignored) rechargeable: yes
status: discharging
CPU:
Info: model: AMD Ryzen 5 5600X bits: 64 type: MT MCP arch: Zen 3+ gen: 4
level: v3 note: check built: 2022 process: TSMC n6 (7nm) family: 0x19 (25)
model-id: 0x21 (33) stepping: 2 microcode: 0xA20120A
Topology: cpus: 1x cores: 6 tpc: 2 threads: 12 smt: enabled cache:
L1: 384 KiB desc: d-6x32 KiB; i-6x32 KiB L2: 3 MiB desc: 6x512 KiB
L3: 32 MiB desc: 1x32 MiB
Speed (MHz): avg: 3734 high: 4226 min/max: 2200/4686 boost: enabled
scaling: driver: acpi-cpufreq governor: performance cores: 1: 3717 2: 3700
3: 3590 4: 3700 5: 3700 6: 3660 7: 3700 8: 3700 9: 4226 10: 3700 11: 3718
12: 3700 bogomips: 88806
Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
Vulnerabilities: <filter>
Graphics:
Device-1: AMD Navi 22 [Radeon RX 6700/6700 XT/6750 XT / 6800M/6850M XT]
vendor: Gigabyte driver: amdgpu v: kernel arch: RDNA-2 code: Navi-2x
process: TSMC n7 (7nm) built: 2020-22 pcie: gen: 4 speed: 16 GT/s
lanes: 16 ports: active: DP-1,HDMI-A-2 empty: DP-2,HDMI-A-1
bus-ID: 10:00.0 chip-ID: 1002:73df class-ID: 0300
Display: x11 server: X.Org v: 21.1.10 with: Xwayland v: 23.2.3
compositor: kwin_x11 driver: X: loaded: amdgpu unloaded: modesetting,radeon
alternate: fbdev,vesa dri: radeonsi gpu: amdgpu display-ID: :0 screens: 1
Screen-1: 0 s-res: 4096x1424 s-dpi: 96 s-size: 1080x375mm (42.52x14.76")
s-diag: 1143mm (45.01")
Monitor-1: DP-1 mapped: DisplayPort-0 pos: primary,bottom-r
model: LG (GoldStar) HDR WFHD serial: <filter> built: 2021 res: 2560x1080
dpi: 81 gamma: 1.2 size: 798x334mm (31.42x13.15") diag: 869mm (34.2")
modes: max: 2560x1080 min: 640x480
Monitor-2: HDMI-A-2 mapped: HDMI-A-1 pos: top-left
model: LG (GoldStar) FULL HD serial: <filter> built: 2023 res: 1920x1080
hz: 75 dpi: 102 gamma: 1.2 size: 480x270mm (18.9x10.63")
diag: 551mm (21.7") ratio: 16:9 modes: max: 1920x1080 min: 720x400
API: EGL v: 1.5 hw: drv: amd radeonsi platforms: device: 0 drv: radeonsi
device: 1 drv: swrast surfaceless: drv: radeonsi x11: drv: radeonsi
inactive: gbm,wayland
API: OpenGL v: 4.6 compat-v: 4.5 vendor: amd mesa v: 23.3.2-arch1.2
glx-v: 1.4 direct-render: yes renderer: AMD Radeon RX 6700 XT (radeonsi
navi22 LLVM 16.0.6 DRM 3.54 6.6.9-zen1-1-zen) device-ID: 1002:73df
memory: 11.72 GiB unified: no
API: Vulkan v: 1.3.274 layers: 13 device: 0 type: discrete-gpu name: AMD
Radeon RX 6700 XT (RADV NAVI22) driver: mesa radv v: 23.3.2-arch1.2
device-ID: 1002:73df surfaces: xcb,xlib device: 1 type: cpu name: llvmpipe
(LLVM 16.0.6 256 bits) driver: mesa llvmpipe v: 23.3.2-arch1.2 (LLVM
16.0.6) device-ID: 10005:0000 surfaces: xcb,xlib
Audio:
Device-1: AMD Navi 21/23 HDMI/DP Audio driver: snd_hda_intel v: kernel pcie:
gen: 4 speed: 16 GT/s lanes: 16 bus-ID: 10:00.1 chip-ID: 1002:ab28
class-ID: 0403
Device-2: Sony INZONE H9 / H7
driver: cdc_acm,hid-generic,snd-usb-audio,usbhid type: USB rev: 2.0
speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 5-3:3 chip-ID: 054c:0e53
class-ID: 0a00
API: ALSA v: k6.6.9-zen1-1-zen status: kernel-api with: aoss
type: oss-emulator tools: N/A
Server-1: PipeWire v: 1.0.0 status: active with: 1: pipewire-pulse
status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
4: pw-jack type: plugin tools: pactl,pw-cat,pw-cli,wpctl
Network:
Device-1: Intel Dual Band Wireless-AC 3168NGW [Stone Peak] driver: iwlwifi
v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 1 bus-ID: 08:00.0
chip-ID: 8086:24fb class-ID: 0280
IF: wlp8s0 state: down mac: <filter>
Device-2: Intel I211 Gigabit Network vendor: ASRock driver: igb v: kernel
pcie: gen: 1 speed: 2.5 GT/s lanes: 1 port: d000 bus-ID: 0a:00.0
chip-ID: 8086:1539 class-ID: 0200
IF: enp10s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
Bluetooth:
Device-1: Edimax Bluetooth Adapter driver: btusb v: 0.8 type: USB rev: 1.1
speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 1-5:2 chip-ID: 7392:c611
class-ID: e001 serial: <filter>
Report: btmgmt ID: hci0 rfk-id: 1 state: up address: <filter> bt-v: 5.1
lmp-v: 10 status: discoverable: no pairing: no class-ID: 7c0104
Drives:
Local Storage: total: 3.64 TiB used: 1.08 TiB (29.6%)
SMART Message: Unable to run smartctl. Root privileges required.
ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Western Digital
model: WD BLACK SN770 1TB size: 931.51 GiB block-size: physical: 512 B
logical: 512 B speed: 63.2 Gb/s lanes: 4 tech: SSD serial: <filter>
fw-rev: 731100WD temp: 47.9 C scheme: GPT
ID-2: /dev/nvme1n1 maj-min: 259:3 vendor: Samsung model: SSD 980 1TB
size: 931.51 GiB block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s
lanes: 4 tech: SSD serial: <filter> fw-rev: 3B4QFXO7 temp: 34.9 C
scheme: GPT
ID-3: /dev/sda maj-min: 8:0 vendor: Seagate model: ST2000DX002-2DV164
size: 1.82 TiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s
tech: HDD rpm: 7200 serial: <filter> fw-rev: CC41 scheme: GPT
Partition:
ID-1: / raw-size: 931.22 GiB size: 931.22 GiB (100.00%)
used: 236.4 GiB (25.4%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
used: 584 KiB (0.2%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
ID-3: /home raw-size: 931.22 GiB size: 931.22 GiB (100.00%)
used: 236.4 GiB (25.4%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
ID-4: /var/log raw-size: 931.22 GiB size: 931.22 GiB (100.00%)
used: 236.4 GiB (25.4%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
ID-5: /var/tmp raw-size: 931.22 GiB size: 931.22 GiB (100.00%)
used: 236.4 GiB (25.4%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
Swap:
Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default) zswap: no
ID-1: swap-1 type: zram size: 31.26 GiB used: 62 MiB (0.2%) priority: 100
comp: zstd avail: lzo,lzo-rle,lz4,lz4hc,842 max-streams: 12 dev: /dev/zram0
Sensors:
System Temperatures: cpu: 46.4 C mobo: 26.5 C gpu: amdgpu temp: 39.0 C
mem: 36.0 C
Fan Speeds (rpm): cpu: 1299 fan-3: 1328 fan-4: 1485 fan-5: 1234
gpu: amdgpu fan: 0
Info:
Processes: 363 Uptime: 4m wakeups: 0 Memory: total: 32 GiB
available: 31.26 GiB used: 2.53 GiB (8.1%) Init: systemd v: 255
default: graphical tool: systemctl Compilers: gcc: 13.2.1 clang: 16.0.6
Packages: pm: pacman pkgs: 2028 libs: 575 tools: octopi,paru Shell: fish
v: 3.7.0 running-in: konsole inxi: 3.3.31
Garuda (2.6.22-1):
System install date:     2024-01-05
Last full system update: 2024-01-05
Is partially upgraded:   Yes
Relevant software:       snapper NetworkManager dracut
Windows dual boot:       No/Undetected
Failed units:

EDIT:

hmm my issue seems to be that im running out of space on my new disk when sending the snapshot to my new disk… Don’t know why I should have enough free space on my new disk

What about sudo install /mnt/oldhome/* /mnt/newhome/* -g $YOURGROUP -o $YOURUSER -m 755

I recently learned about all these arguments which make install all the more useful :slight_smile:

3 Likes

You are correct about dd, don’t do that.
In all cases (cp -r, btrfs send/receive, rsync) if the new user/group are different you would have to fix that afterwards.
I have no idea why send/receive did not work though, from what I remember that’s the way to go (and faster than the alternatives).
I think, comparing to the instructions in the first link, in sudo btrfs send /mnt/broken/folder_0 | btrfs receive /mnt/old/, the broken is the old and the old is the new? Or is that a typo, or is that you’re trying to send it to the wrong place?
I was also thinking out of space. Can you post the partition table and volumes list from both source and destination?

3 Likes

yeah not really discriptive with the names lol. /mnt/broken/ is where I am mounting my old broken install.

/mnt/old/ is where I am sending the readonly snapshot of /mnt/broken/@home to

here is a lsblk showing that

lsblk -f
NAME        FSTYPE FSVER LABEL    UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
sda
└─sda2      ext4   1.0   GAMES    d6a92575-7181-4506-80d1-84a9594f90e8
sr0
zram0                                                                                 [SWAP]
nvme0n1
├─nvme0n1p1 vfat   FAT32          79CD-8D09                             298.8M     0% /boot/efi
└─nvme0n1p2 btrfs                 8a69f047-feee-46cf-81a1-d299eb173883  896.5G     2% /var/tmp
/var/log
/var/cache
/srv
/root
/home
/
nvme1n1
├─nvme1n1p1 vfat   FAT32 NO_LABEL 4AC6-7B21
└─nvme1n1p2 btrfs                 53e270ad-dfd5-4874-a125-69d21ada6b8d   59.2G    93% /mnt/broken

So from what I understand of the second article.

what I want to do is create a readonly snapshot of my broken install’s @home

then send it somewhere on my new disk.

then create a writable snapshot of that snapshot at /home/

I had part of my old home on my new disk so it was prob running out of space because of that (i thought the snapshot would be compressed and not be the whole size)

as for the black screen… i rembered my system had an issue where it would crash on suspund and garuda default is to suspend after 15 minutes

1 Like

I purposely used the same username and password so I shouldnt have issue right?

also remebered I didn’t make a backup list of my installed flatpaks going to have to figure that out.

for arch packages I a hook (bog i think it was called) that creates a gist of my installed aur and pacman files

It’s the numeric IDs that matter, usually 1000:1000 for the first user, but the group may be 1001 if you enabled autologin when installing.

1 Like

I did enable autologin when I installed this system. my old system had auto login to but not when I first installed it I believe

I suspect that complicates the matter. Can you elaborate?
Folders symlinked from the old home to the new home I guess?

1 Like

no left overs from my previous cp -r /mnt/broken/@home/zany130 /home/

the thing is I have some steam games there so the whole home folder is like 800GB

which if you think about it ofc its going to take awhile and a lot of space to move all that

1 Like

Hm, nvme0n1p2 btrfs has FSAVAIL=896.5G FSUSE%=2%, are the games not in the ext4 labelled GAMES?
You would be moving “just” the 59.2G of the old home anyways.
I think I’m missing something.
df -H says what?

1 Like

This strategy is fine, but you will want to use cp -a instead. cp -a preserves ownership, permissions, timestamps, extended attributes, and recursive copies of directories.

2 Likes

What broke your old install ?
Why would you want to copy your @home

just pull from your old install what you need and archive the rest?

2 Likes

Not even sure it just crashed out of the blue with some strange messages indicating disk faliure , though the disk is fine according to btrfs check and S.M.A.R.T.

so I decided replicate my install on a new disk. with all my old packages, flatpaks, and home folders

that a HDD so I have games I am not activlely playing there

anyway I got my home mostly restored some things like my KDE theme are not quite right (I think this is because i don’t have those themes intalled on my system yet, prob should of installed all my old packages then restore my home folder) but I am logied to steam and all my apps.

now I need to just restore my packages (pacman aur and flatpak)

aur and pacman packages I will use GitHub - DerekTBrown/pacmanity: Package List Gist Backup via ALPM-Hooks

no idea how to get my installed flatpaks from my old install though, like I said before its not bootable and I can’t chroot into it

2 Likes

hmm seems it failed to install my packges for some reason

error: failed retrieving file 'linux-cachyos-6.6.9-1-x86_64.pkg.tar.zst' from cdn-mirror.chaotic.cx : The requested URL returned error: 404
error: failed retrieving file 'linux-cachyos-6.6.9-1-x86_64.pkg.tar.zst' from geo-mirror.chaotic.cx : The requested URL returned error: 404
error: failed retrieving file 'linux-cachyos-6.6.9-1-x86_64.pkg.tar.zst' from br-mirror.chaotic.cx : The requested URL returned error: 404
error: failed retrieving file 'linux-cachyos-6.6.9-1-x86_64.pkg.tar.zst' from bg-mirror.chaotic.cx : The requested URL returned error: 404
error: failed retrieving file 'linux-cachyos-6.6.9-1-x86_64.pkg.tar.zst' from ca-mirror.chaotic.cx : The requested URL returned error: 404
error: failed retrieving file 'linux-cachyos-6.6.9-1-x86_64.pkg.tar.zst' from cl-mirror.chaotic.cx : The requested URL returned error: 404
error: failed retrieving file 'linux-cachyos-6.6.9-1-x86_64.pkg.tar.zst' from de-2-mirror.chaotic.cx : The requested URL returned error: 404
error: failed retrieving file 'linux-cachyos-6.6.9-1-x86_64.pkg.tar.zst' from de-3-mirror.chaotic.cx : The requested URL returned error: 404
error: failed retrieving file 'linux-cachyos-6.6.9-1-x86_64.pkg.tar.zst' from de-4-mirror.chaotic.cx : The requested URL returned error: 404
error: failed retrieving file 'linux-cachyos-headers-6.6.9-1-x86_64.pkg.tar.zst' from cdn-mirror.chaotic.cx : The requested URL returned error: 404
error: failed retrieving file 'linux-cachyos-headers-6.6.9-1-x86_64.pkg.tar.zst' from geo-mirror.chaotic.cx : The requested URL returned error: 404
error: failed retrieving file 'linux-cachyos-headers-6.6.9-1-x86_64.pkg.tar.zst' from br-mirror.chaotic.cx : The requested URL returned error: 404
error: failed retrieving file 'linux-cachyos-headers-6.6.9-1-x86_64.pkg.tar.zst' from bg-mirror.chaotic.cx : The requested URL returned error: 404
error: failed retrieving file 'linux-cachyos-headers-6.6.9-1-x86_64.pkg.tar.zst' from ca-mirror.chaotic.cx : The requested URL returned error: 404
error: failed retrieving file 'linux-cachyos-headers-6.6.9-1-x86_64.pkg.tar.zst' from cl-mirror.chaotic.cx : The requested URL returned error: 404
error: failed retrieving file 'linux-cachyos-headers-6.6.9-1-x86_64.pkg.tar.zst' from de-2-mirror.chaotic.cx : The requested URL returned error: 404
error: failed retrieving file 'linux-cachyos-headers-6.6.9-1-x86_64.pkg.tar.zst' from de-3-mirror.chaotic.cx : The requested URL returned error: 404
error: failed retrieving file 'linux-cachyos-headers-6.6.9-1-x86_64.pkg.tar.zst' from de-4-mirror.chaotic.cx : The requested URL returned error: 404
error: failed retrieving file 'cassowary-0.6-1.4-x86_64.pkg.tar.zst' from cdn-mirror.chaotic.cx : Maximum file size exceeded
warning: too many errors from cdn-mirror.chaotic.cx, skipping for the remainder of this transaction
error: failed retrieving file 'cassowary-0.6-1.4-x86_64.pkg.tar.zst' from geo-mirror.chaotic.cx : Maximum file size exceeded
warning: too many errors from geo-mirror.chaotic.cx, skipping for the remainder of this transaction
error: failed retrieving file 'cassowary-0.6-1.4-x86_64.pkg.tar.zst' from br-mirror.chaotic.cx : Maximum file size exceeded
warning: too many errors from br-mirror.chaotic.cx, skipping for the remainder of this transaction
error: failed retrieving file 'cassowary-0.6-1.4-x86_64.pkg.tar.zst' from bg-mirror.chaotic.cx : Maximum file size exceeded
warning: too many errors from bg-mirror.chaotic.cx, skipping for the remainder of this transaction
error: failed retrieving file 'cassowary-0.6-1.4-x86_64.pkg.tar.zst' from ca-mirror.chaotic.cx : Maximum file size exceeded
warning: too many errors from ca-mirror.chaotic.cx, skipping for the remainder of this transaction
error: failed retrieving file 'cassowary-0.6-1.4-x86_64.pkg.tar.zst' from cl-mirror.chaotic.cx : Maximum file size exceeded
warning: too many errors from cl-mirror.chaotic.cx, skipping for the remainder of this transaction
error: failed retrieving file 'cassowary-0.6-1.4-x86_64.pkg.tar.zst' from de-2-mirror.chaotic.cx : Maximum file size exceeded
warning: too many errors from de-2-mirror.chaotic.cx, skipping for the remainder of this transaction
error: failed retrieving file 'cassowary-0.6-1.4-x86_64.pkg.tar.zst' from de-3-mirror.chaotic.cx : Maximum file size exceeded
warning: too many errors from de-3-mirror.chaotic.cx, skipping for the remainder of this transaction
error: failed retrieving file 'cassowary-0.6-1.4-x86_64.pkg.tar.zst' from de-4-mirror.chaotic.cx : Maximum file size exceeded
warning: too many errors from de-4-mirror.chaotic.cx, skipping for the remainder of this transaction
error: failed retrieving file 'cassowary-0.6-1.4-x86_64.pkg.tar.zst' from gr-mirror.chaotic.cx : Maximum file size exceeded
error: failed retrieving file 'cassowary-0.6-1.4-x86_64.pkg.tar.zst' from in-mirror.chaotic.cx : Maximum file size exceeded
error: failed retrieving file 'cassowary-0.6-1.4-x86_64.pkg.tar.zst' from in-2-mirror.chaotic.cx : Maximum file size exceeded
error: failed retrieving file 'cassowary-0.6-1.4-x86_64.pkg.tar.zst' from in-3-mirror.chaotic.cx : Maximum file size exceeded
error: failed retrieving file 'cassowary-0.6-1.4-x86_64.pkg.tar.zst' from kr-mirror.chaotic.cx : Maximum file size exceeded
error: failed retrieving file 'cassowary-0.6-1.4-x86_64.pkg.tar.zst' from es-mirror.chaotic.cx : Maximum file size exceeded
error: failed retrieving file 'cassowary-0.6-1.4-x86_64.pkg.tar.zst' from es-2-mirror.chaotic.cx : Maximum file size exceeded
error: failed retrieving file 'cassowary-0.6-1.4-x86_64.pkg.tar.zst' from us-mi-mirror.chaotic.cx : Maximum file size exceeded
error: failed retrieving file 'cassowary-0.6-1.4-x86_64.pkg.tar.zst' from us-tx-mirror.chaotic.cx : Maximum file size exceeded
error: failed retrieving file 'cassowary-0.6-1.4-x86_64.pkg.tar.zst' from us-ut-mirror.chaotic.cx : Maximum file size exceeded
warning: failed to retrieve some files
error: failed to commit transaction (unexpected error)
Errors occurred, no packages were upgraded.

Ok this isn’t working out I can’t install reinstall my aur packages as it complains error: could not find all required packages: so I am going with a diffrent approach

I want to fix my old install problem is its seems beyond broken as I can’t even chroot into it

sudo mkdir -p /mnt/broken
sudo mount /dev/nvme1n1p2 /mnt/broken
sudo garuda-chroot /mnt/broken/@
[sudo] password for zany130:
find: '/home/zany130/pCloudDrive': Permission denied
chroot: failed to run command '/bin/sh': No such file or directory

I think some of the base packages like filesystem are missing or corrupt
I do have working snapshots but I couldn’t find anyway to restore them

That looks like network error though.
Compleatly new to linux and having an error witht the Setup Assistant
When they’re all *-mirror.chaotic.cx, commenting out the R2 (first one) in /etc/pacman.d/chaotic-mirrorlist should do.

1 Like

yup it seems like it was a network error. I also couldn’t get aur packages installed using pacmanity for some reason this didn’t work
paru-S $(sed -e '/^$/d' Garuda-Linux.pacmanity | tr '\n' ' ')

I had to get each package name and do a paru -s packagename which was a little annoying

strangely pacman worked fine with the above just not paru I guess you can’t read from a file and pass that to paru?

Anyway
as for flatpaks I just did ls /mnt/broken/@/var/lib/flatpak/app/ to get all flatpaks installed system wide (transferring my home already copied my users flatpaks)

So got everything in place

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.