You are not logged in.

#1 2015-07-23 21:49:08

zidarsk8
Member
Registered: 2011-12-06
Posts: 97

BTRFS send recieve backups fail

I have a simple script for writing backups to a USB drive, but It always seems to fail, always at the same place

NAME="arch_reci"
CURDATE=$(date "+%F-%H-%M-%S")

btrfs subvolume snapshot -r ${NAME}_@ ${NAME}_${CURDATE}_@
btrfs subvolume snapshot -r ${NAME}_@home ${NAME}_${CURDATE}_@home
btrfs subvolume create /run/media/zidar/backup_disk/manual_laptop_backups/${NAME}_${CURDATE}_@
btrfs subvolume create /run/media/zidar/backup_disk/manual_laptop_backups/${NAME}_${CURDATE}_@home
sync

btrfs send ${NAME}_${CURDATE}_@          | pv | btrfs receive /run/media/zidar/backup_disk/manual_laptop_backups/${NAME}_${CURDATE}_@
btrfs send ${NAME}_${CURDATE}_@home | pv | btrfs receive /run/media/zidar/backup_disk/manual_laptop_backups/${NAME}_${CURDATE}_@home
sync

This is the output

Create a readonly snapshot of 'arch_reci_@' in './arch_reci_2015-07-23-23-03-34_@'
Create a readonly snapshot of 'arch_reci_@home' in './arch_reci_2015-07-23-23-03-34_@home'
Create subvolume '/run/media/zidar/backup_disk/manual_laptop_backups/arch_reci_2015-07-23-23-03-34_@'
Create subvolume '/run/media/zidar/backup_disk/manual_laptop_backups/arch_reci_2015-07-23-23-03-34_@home'
At subvol arch_reci_2015-07-23-23-03-34_@
At subvol arch_reci_2015-07-23-23-03-34_@
15.9GiB 0:04:55 [  55MiB/s] [                   <=>                                                                                                                                                                             ]
At subvol arch_reci_2015-07-23-23-03-34_@home
At subvol arch_reci_2015-07-23-23-03-34_@home
ERROR: send ioctl failed with -2: No such file or directory
76.8GiB 0:14:10 [92.4MiB/s] [                                                                                                                  
ERROR: unexpected EOF in stream.

I also tried without pv, but it makes no difference. Scrub says everything is fine and I just can't seem to copy the subvolume to my backup disk

Any help would nice. Thanks.

Offline

#2 2015-08-20 11:37:20

tsh
Member
From: Munich
Registered: 2014-07-25
Posts: 41
Website

Re: BTRFS send recieve backups fail

Hi, I too had this problem recently.  I did

btrfs balance -musage=1 <subvolume path>

and that seems to have fixed it.  <subvolume path> should be the source subvolume you are using in btrfs-send.

Last edited by tsh (2015-09-03 08:28:16)

Offline

Board footer

Powered by FluxBB