meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
linux:fs:btrfs:send [2024/11/20 17:24] niziaklinux:fs:btrfs:send [2024/11/21 17:32] (current) niziak
Line 1: Line 1:
 ====== send / receive ====== ====== send / receive ======
 +
 +grub-install --target=x86_64-efi --efi-directory=/target/@rootfs/boot/efi --boot-directory=/target/@rootfs/boot --bootloader-id=debian --recheck --no-floppy
 +update-grub 
 +
 +mount --rbind /dev  /target/@rootfs/dev
 +mount --rbind /proc /target/@rootfs/proc
 +mount --rbind /sys  /target/@rootfs/sys
 +chroot /target/@rootfs /bin/bash --login
 +
 +grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=debian --recheck --no-floppy
 +Installing for x86_64-efi platform.
 +grub-install: error: cannot find a device for /boot/grub (is /dev mounted?).
 +
  
 ===== migrate to new storage ===== ===== migrate to new storage =====
Line 102: Line 115:
  
 <code bash> <code bash>
-rsync -avxHAXPW --exclude=".snapshots" 192.168.177.161::rootfs /target/@rootfs+rsync -avHAXPW --exclude=".snapshots" 192.168.177.161::rootfs /target/@rootfs 
 +</code> 
 + 
 +Try ssh to correct permission errors 
 +<code bash> 
 +rsync -avHAXPW --exclude=".snapshots" ssh://user@192.168.177.161/target/@rootfs/ /target/@rootfs
 </code> </code>
  
Line 110: Line 128:
 </code> </code>
  
 +Even if rsync daemon is started from root account (on src host) it cannot read some files according to normal permissions:
 +<code>
 +rsync: [sender] send_files failed to open "/var/spool/postfix/pid/unix.local" (in rootfs): Permission denied (13)
 +rsync: [sender] send_files failed to open "/var/spool/postfix/pid/unix.retry" (in rootfs): Permission denied (13)
 +rsync: [sender] send_files failed to open "/var/spool/postfix/pid/unix.smtp" (in rootfs): Permission denied (13)
 +</code>
  
 +workaround is to start rsync daemon on dst host with the same rsyncd.conf config and start rsync from src host:
  
- +<code bash> 
-rsync -avxHAXPW --numeric-ids /target/@rootfs/ +rsync -avxHAXPW --exclude=".snapshots" /target/@rootfs 192.168.177.171::rootfs  
- +</code>
- +
-rsync -arAXHvW --exclude=".snapshots" --exclude='/dev' --exclude='/proc' --exclude='/sys' /oldroot/ /rpool/ +
-$ rsync -vuar host1:/var/www host2:/var/www+
  
  
 tar: tar:
-  * 'c'reate +  * ''-c'' create 
-  *        -p, --preserve-permissions, --same-permissions +  * ''-p''''--preserve-permissions''''--same-permissions'' extract information about file permissions  (default  for  superuser
-              extract information about file permissions  (default  for  supe‐ +  * ''-s'''' --preserve-order''''--same-order'' Sort names to extract to match archive 
-              ruser+  * ''-f''''--file=ARCHIVE'' Use  archive  file  or  device  ARCHIVE.   If this option is not given, tar will first examine the enviro 
- +             
- +             
-       -s, --preserve-order, --same-order +
-              Sort names to extract to match archive +
- +
-       -f, --file=ARCHIVE +
-              Use  archive  file  or  device  ARCHIVE.   If this option is not +
-              given, tar will first examine the enviro +
-               +
-              +
 Sender: Sender:
 <code bash> <code bash>