Forum
  • Search
  • Member List
  • Calendar
Hello There, Guest! Login Register — Login with Facebook

home backup files vanish
Thank you for your donation

Thread Closed 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threaded Mode | Linear Mode
home backup files vanish
27th Apr, 2021, 06:13 PM
Post: #9
alcina Offline
Registered
Posts: 9
Joined: Sep 2015
Reputation: 1
RE: home backup files vanish
Ok, I finally have some time to look again at this! I've left the rm -f "$FILE" line in xbian-storager hashed out and it's been backing up fine despite the exit code of 1 from the pipe.

To try to find out what program in the pipe is exiting with 1, as xbian-storager is a bash script, I utilised $PIPESTATUS to grab the exit code of each program in the pipe. Slightly complicated as the pipe isn't simply a linear command but I think I have it right (please correct if I am wrong!):
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}' && echo "Inner-Inner: ${PIPESTATUS[0]} ${PIPESTATUS[1]}" >> /root/pipestatus) | $packcmd -1 >> "$FILE" && echo "Outer-Inner: ${PIPESTATUS[0]} ${PIPESTATUS[1]} ${PIPESTATUS[2]}" >> /root/pipestatus) 2>&1 | cpb
echo "Outer: ${PIPESTATUS[0]} ${PIPESTATUS[1]}" >> /root/pipestatus

After running "backup now" from the GUI the contents of /root/pipestatus are:
Code:
Inner-Inner: 0 0
Outer-Inner: 0 0 0
Outer: 0 1

So I think the error is coming from cpb, i.e the second exit code in the pipe as a whole. But I don't know why. /tmp/xbiancopy.log contains lots of stuff relating to successful btrfs and ends "Operation sucessfully completed!". /tmp/backuphome.log contains the lines starting with positive digits from the output of pv in the pipe as the grep implies.
Find all posts by this user
« Next Oldest | Next Newest »
Thread Closed 


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

  • View a Printable Version
  • Send this Thread to a Friend
  • Subscribe to this thread
Forum Jump:

Current time: 20th May, 2025, 08:43 AM Powered By MyBB, © 2002-2025 MyBB Group.