Snapshots are read-only, so all changes to the image can only be applied to the 
HEAD revision.

In general, you should take a snapshot prior to export / export-diff to ensure 
consistent images:

  rbd snap create rbd/small@snap1
  rbd export rbd/small@snap1 ./foo

  rbd import ./foo backup/small
  rbd snap create backup/small@snap1

  ** rbd/small and backup/small are now consistent through snap1 -- rbd/small 
might have been modified post snapshot

  rbd snap create rbd/small@snap2
  rbd export-diff --from-snap snap1 rbd/small@snap2 ./foo.diff
  rbd import-diff ./foo.diff backup/small

  ** rbd/small and backup/small are now consistent through snap2.  import-diff 
automatically created backup/small@snap2 after importing all changes. 

-- 

Jason Dillaman 
Red Hat 
dilla...@redhat.com 
http://www.redhat.com 


----- Original Message -----
From: "Steve Anthony" <sma...@lehigh.edu>
To: ceph-users@lists.ceph.com
Sent: Tuesday, March 3, 2015 2:06:44 PM
Subject: [ceph-users] import-diff requires snapshot exists?

Hello,

I've been playing with backing up images from my production site
(running 0.87) to my backup site (running 0.87.1) using export/import
and export-diff/import-diff. After initially exporting and importing the
image (rbd/small to backup/small) I took a snapshot (called test1) on
the production cluster, ran export-diff from that snapshot, and then
attempted to import-diff the diff file on the backup cluster.

# rbd import-diff ./foo.diff backup/small
start snapshot 'test1' does not exist in the image, aborting
Importing image diff: 0% complete...failed.
rbd: import-diff failed: (22) Invalid argument

This works fine if I create a test1 snapshot on the backup cluster
before running import-diff. However, it appears that the changes get
written into backup/small not backup/small@test1. So unless I'm not
understanding something, it seems like the content of the snapshot on
the backup cluster is of no importance, which makes me wonder why it
must exist at all.

Any thoughts? Thanks!

-Steve

-- 
Steve Anthony
LTS HPC Support Specialist
Lehigh University
sma...@lehigh.edu



_______________________________________________
ceph-users mailing list
ceph-users@lists.ceph.com
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
_______________________________________________
ceph-users mailing list
ceph-users@lists.ceph.com
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com

Reply via email to