linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* btrfs receive error recovery
@ 2015-05-09 11:52 Axel Burri
  2015-05-10  3:11 ` Duncan
  0 siblings, 1 reply; 2+ messages in thread
From: Axel Burri @ 2015-05-09 11:52 UTC (permalink / raw)
  To: linux-btrfs

Hi btrfs team

I'm the developer of "btrbk" [1], which uses btrfs send/receive to
create backups. In case of errors, "btrfs receive" leaves the partially
received subvolume behind, causing some trouble for subsequent
incremental backups. As I can see in the wiki, "Delete partially
received subvolumes on error" is on the TODO list. Until then, what
would be the best way to check if the received subvolume needs to be
deleted?

As "btrfs receive" does always return an exit value of "1" on errors, I
cannot rely on this (e.g. if a file with the received name already
exists, I also get an exit code=1, but then I do NOT want to delete
anything).

Also, "btrfs subvolume show <partially-received-subvol>" does not
complain either.

Do you have any hints on how I can check for this? (and no, parsing
stderr messages is not an option)


Thanks in advance,

- Axel


[1] https://www.digint.ch/btrbk/
    https://github.com/digint/btrbk

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-05-10  3:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-09 11:52 btrfs receive error recovery Axel Burri
2015-05-10  3:11 ` Duncan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).