I changed my Rpi4 and USB stick that was VFAT format to ext4.
Same issue. backup works until 99% then
Code:
Cloning root/@, 1347331675 of 1360941086, 99% done
Cloning subvolume root snapshot @ failed
Operation failed with error E_COPY_DATA!
this is a crazy situation.
Should I do some fsck, or btrfs check? what is the command sending E_COPY_DATA error?
The data is copied via
btrfs send | btrfs receive
and if this operation fails with error, E_COPY_DATA will returned as error
You can look in the file /usr/sbin/btrfs-auto-snapshot and search for this error
BTW, I am currently also struggling with the backup function for me, the kswapd0 process (the process occupies 100% of one core) totally slows down the backup. I have noticed this for about 6 weeks.
Where this suddenly comes from I can not explain, probably by newer kernel versions.
However, I have already found the reason:
It's the line MY_MIN_FREE_KBYTES=75000 in the file /usr/sbin/btrfs-auto-snapshot. If you reduce the value to 22500, the kswapd0 doesn't go crazy anymore
This value is used for setting /proc/sys/vm/min_free_kbytes while backup is running.
Of course this makes no sense since 75000 means only 75MByte, which is a ridiculous value with 4 or even 8GB of system memory. however, the value has a significant impact. Maybe a kernel bug in newer versions
Perhaps, changing this value will help you too
You can start checking filesystem by running
Terminal
sudo btrfs scrub start /
sudo watch btrfs scrub status /
- Trying with a Rpi3.
- Set MY_MIN_FREE_KBYTES=22500
- btrfs checking
still the same 99% error
Maybe it is about kernel version?
No, I made a couple of backups yesterday to network share and external usb disk, all were finished without any error.
Must be something different
Yesterday I could make a backup on another install made on a Rpi4 rev 1.1.
Terminal
sudo cat /sys/firmware/devicetree/base/model;echo
"Raspberry Pi 4 Model B Rev 1.1"
I still don't know and understand what was going wrong...
Will push more information on this thread if I find why
OK. I changed/switch SD cards, Rpi4 v1.2 (8GB, 4GB), Rpi v1.1 (4GB)
I still don't know why I cannot make backup,
I am doing a simple install, following these steps
1. Flashing with "XBian_2020.12.04_rpi4.img" (downloaded on dec 8th)
2. First time boot (to expand filesystem). Change xbian password. Add ~/.ssh/authorized_keys
3. Reboot
4. Change interface language, change keyboard layout and input to "french".
5. Activate "preference/advance mode" (to forgot backup alerts)
6. Make backup to /media/usb0/xbian.img (from Kodi/Xbian or xbian-config), on different USB sticks
Code:
Error during copying data occoured (87)
I could only make my backup from an already one year old installed xbian (with various apt install/update/upgrade)...
This is all very strange.
I just found my spare cd-card (32GB) again, so tomorrow I will install a fresh image and test the backup with my Pi4/4GB.