home backup files vanish
|
18th Apr, 2021, 03:33 AM
Post: #7
|
|||
|
|||
RE: home backup files vanish
Ok...so I ran:
Code: btrfs subvolume snapshot -r /home /root/.snaps/home-20210417 It resulted: Code: Create a readonly snapshot of '/home' in '/root/.snaps/home-20210417' Then, to copy the snapshot to an image file on the NAS, I ran: Code: btrfs send -v /root/.snaps/home-20210417 > /mnt/ReadyNAS2/xbian/newbackups/home-20210417.img Code: At subvol /root/.snaps/home-20210417 The file was happily sitting there on the NAS Then, to make it a bit more like /usr/local/sbin/xbian-storager I ran: Code: btrfs send -v /root/.snaps/home-20210417 | gzip -1 >> /mnt/ReadyNAS2/xbian/newbackups/home-20210417.img.gz Code: At subvol /root/.snaps/home-20210417 The file was happily sitting there on the NAS So I installed a syslogger and ran "backup now" from the GUI. All happened exactly as before: the file appeared, it got bigger until it was finished, then immediately disappeared. The relevant syslog lines are: Code: Apr 17 16:13:55 xbiansnug btrfs-auto-snapshot: xbiancopy mount /mnt/ReadyNAS2/xbian/newbackups/xbiansnug_backup_home_2021-04-17.img.gz To me it looks like the file is getting deleted the moment after it is created. I am presuming lines 1659-1662 in xbian-storager are relevant: Code: if [ "$RC" -ne 0 ]; then It's looking like it's not receiving an exit code of 0 and so is deleting the file. So I nobbled those lines in xbian-storager: Code: if [ "$RC" -ne 0 ]; then and ran "backup now" from the GUI. The file appeared on the NAS, it got bigger and bigger until it was nearly the same size as /home, then...it stayed! The contents of /root/exitcode was, as expected, "1" I ran it again to reproduce the problem. The resultant gzipped image files are all slightly different sizes, with the ones being created by xbian-storager being smaller. I am presuming that is to do with the fact that xbian-storager is taking a snapshot immediately before copying the image over and not much has changed (if I understand vaguely how btrfs snapshots work...) Code: -rw-rw-rw- 1 recovery nasbackup 5845568491 Apr 17 16:03 home-20210417.img.gz So...next question is to find out why the btrfs send is exiting with code 1, and, is it actually a faulty image or is it a restorable image. Am considering line 1646 of xbian-storager: Code: ( btrfs send -v "${tmp_dir}/home/@ro" | pv -i 20 -n -s $(du -sxb ${tmp_dir}/home/@ro | awk '{printf "%d", $1*1.08}') | $packcmd -1 >> "$FILE") 2>&1 | cpb |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
home backup files vanish - alcina - 16th Apr, 2021, 02:19 AM
RE: home backup files vanish - Nachteule - 16th Apr, 2021, 11:39 PM
RE: home backup files vanish - alcina - 17th Apr, 2021, 07:16 PM
RE: home backup files vanish - Nachteule - 17th Apr, 2021, 08:26 PM
RE: home backup files vanish - alcina - 17th Apr, 2021, 11:39 PM
RE: home backup files vanish - Nachteule - 18th Apr, 2021, 12:37 AM
RE: home backup files vanish - alcina - 18th Apr, 2021 03:33 AM
RE: home backup files vanish - Nachteule - 18th Apr, 2021, 04:14 AM
RE: home backup files vanish - alcina - 27th Apr, 2021, 06:13 PM
RE: home backup files vanish - Nachteule - 28th Apr, 2021, 09:25 PM
RE: home backup files vanish - alcina - 29th Apr, 2021, 02:55 AM
RE: home backup files vanish - Nachteule - 13th May, 2021, 11:14 PM
|