Script fails for some reason on some snapshots.
root@gr7-mail-web:/mnt/snapshots/daily# btrfs-sync -v /mnt/snapshots/daily/@* [email protected]:/mnt/snapshots
- Check source
- Check destination
- Skip existing '/mnt/snapshots/daily/@home_2020-03-07_062501'
- Synchronizing '/mnt/snapshots/daily/@_2020-03-07_062501' using seed '@snapshots/daily/@home_2020-03-07_062501'... ERROR: chown o257-10-0 failed: No such file or directory time elapsed [0:00:00] | rate [2.65MiB/s] | total size [2.26MiB] Delete subvolume (no-commit): '/mnt/snapshots/@_2020-03-07_062501'
- Retrying '/mnt/snapshots/daily/@_2020-03-07_062501'...
- Synchronizing '/mnt/snapshots/daily/@_2020-03-07_062501' using seed '@snapshots/daily/@home_2020-03-07_062501'... ERROR: chown o257-10-0 failed: No such file or directory time elapsed [0:00:00] | rate [2.78MiB/s] | total size [2.25MiB] Delete subvolume (no-commit): '/mnt/snapshots/@_2020-03-07_062501'
- Retrying '/mnt/snapshots/daily/@_2020-03-07_062501'...
- Synchronizing '/mnt/snapshots/daily/@_2020-03-07_062501' using seed '@snapshots/daily/@home_2020-03-07_062501'... ERROR: chown o257-10-0 failed: No such file or directory time elapsed [0:00:00] | rate [2.63MiB/s] | total size [2.25MiB] Delete subvolume (no-commit): '/mnt/snapshots/@_2020-03-07_062501' Abort
Also needed to install the package pv in order to get process info too work.
I wonder if those got cleaned up by another utility that you might have in your system?
I have something similar. I set up automatic btrfs-snapshot sync in NCP but found that the space occupied on my destination drive is far too small. So I ran btrfs-sync manually and got this:
sudo btrfs-sync -d /media/usb0/ncp-snapshots /media/usb1/ncp-snapshots
* Synchronizing '/media/usb0/ncp-snapshots/weekly_2020-12-05_201703'...
ERROR: chown o257-13846-0 failed: No such file or directory
time elapsed [0:00:00] | rate [1.26MiB/s] | total size [ 157KiB]
Delete subvolume (no-commit): '/media/usb1/ncp-snapshots/weekly_2020-12-05_201703'
* Retrying '/media/usb0/ncp-snapshots/weekly_2020-12-05_201703'...
* Synchronizing '/media/usb0/ncp-snapshots/weekly_2020-12-05_201703'...
ERROR: chown o257-13846-0 failed: No such file or directory
time elapsed [0:00:00] | rate [1.48MiB/s] | total size [ 157KiB]
Delete subvolume (no-commit): '/media/usb1/ncp-snapshots/weekly_2020-12-05_201703'
* Retrying '/media/usb0/ncp-snapshots/weekly_2020-12-05_201703'...
* Synchronizing '/media/usb0/ncp-snapshots/weekly_2020-12-05_201703'...
ERROR: chown o257-13846-0 failed: No such file or directory
time elapsed [0:00:00] | rate [1.19MiB/s] | total size [ 157KiB]
Delete subvolume (no-commit): '/media/usb1/ncp-snapshots/weekly_2020-12-05_201703'
Abort
I can confirm that o257-13846-0 doesn't exist in the source directory.
OK, I managed to successfully run btrfs-sync after doing a manual send and receive for that first snapshot. I'm not sure though if I gleamed the correct arguments from btrfs-sync, so this doesn't feel super safe.