linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* btrfs send /receive : having problems sending a snapshot back to the original partition
@ 2013-06-30 17:14 Miguel Negrão
  2013-07-01 15:50 ` Stefan Behrens
  0 siblings, 1 reply; 5+ messages in thread
From: Miguel Negrão @ 2013-06-30 17:14 UTC (permalink / raw)
  To: btrfs list

Hi

I'm now sucessfully backing up my ubuntu machine using btrfs send and
btrfs receive. Essentially I do 

mount /dev/sda3 /mnt
cd /mnt
btrfs subvolume snapshot @ backups/@-backupNew
btrfs send -p backups/@-backupOld backups/@-backupNew | pv | btrfs
receive /media/miguel/huge/backups/@

This is working great and most sends take less then a minute. I did a
diff of the original with the send snapshot and except for sockets and
other "weird" files like in /dev all the other files seem to be exactly
the same.

Now I was testing retrieving a snapshot back from the backup disk to the
original partition:

If I do 

btrfs subvolume delete @-backupOld

and then do

btrfs send
-p /media/miguel/huge/backups/@/@-backupNew /media/miguel/huge/backups/@/@-backupOld | pv | btrfs receive/mnt/backups

I get an error: 

ERROR: could not find parent subvolume

Sending via files instead of pipes I can see the error is in btrfs
receive, the btrfs send completes without errors.

Is it what I'm trying to do not possible ? I'm I using the wrong
syntax ? It would be really handy to be able to do this, to make it easy
to go to an old snapshot without having to transfer it in it's full
size, instead transferring just the diff.

Also, how is the -c (clone) option used and does it do ? It's not clear
to me what is it's function, and I haven't seen any example using it on
the web.

thanks,

-- 
Miguel Negrão
http://www.friendlyvirus.org/miguelnegrao


ps: I've set up a Haskell script to do the backups, in case it interests
anyone it's here: https://gist.github.com/miguel-negrao/5895613


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

end of thread, other threads:[~2013-07-03 10:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-30 17:14 btrfs send /receive : having problems sending a snapshot back to the original partition Miguel Negrão
2013-07-01 15:50 ` Stefan Behrens
2013-07-02  9:56   ` Miguel Negrão
2013-07-02 12:05     ` Stefan Behrens
2013-07-03 10:11       ` Miguel Negrão

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).