Hi, We know snapshot is on a point of time. Is this point of time tracked internally by some sort of sequence number, or the timestamp showed by "snap ls", or something else? I noticed that when "deep cp", the timestamps of all snapshot are changed to copy-time. Say I create a snapshot at 1PM and make a copy at 3PM, the timestamp of snapshot in the copy is 3PM. If I rollback the copy to this snapshot, I'd assume it will actually bring me back to the state of 1PM. Is that correct? If the above is true, I won't be able to rely on timestamp to track snapshots. Say I create a snapshot every hour and make a backup by copy at the end of the day. Then the original image is damaged and backup is used to restore the work. On this backup image, how do I know which snapshot was on 1PM, which was on 2PM, etc.? Any advices to track snapshots properly in such case? I can definitely build something else to help on this, but I'd like to know how much Ceph can support it. Thanks! Tony
On Fri, Aug 4, 2023 at 7:49 AM Tony Liu <tonyliu0592@hotmail.com> wrote:
Hi,
We know snapshot is on a point of time. Is this point of time tracked internally by some sort of sequence number, or the timestamp showed by "snap ls", or something else?
Hi Tony, The timestamp in "rbd snap ls" output is the snapshot creation timestamp.
I noticed that when "deep cp", the timestamps of all snapshot are changed to copy-time.
Correct -- exactly the same as the image creation timestamp (visible in "rbd info" output).
Say I create a snapshot at 1PM and make a copy at 3PM, the timestamp of snapshot in the copy is 3PM. If I rollback the copy to this snapshot, I'd assume it will actually bring me back to the state of 1PM. Is that correct?
Correct.
If the above is true, I won't be able to rely on timestamp to track snapshots.
Say I create a snapshot every hour and make a backup by copy at the end of the day. Then the original image is damaged and backup is used to restore the work. On this backup image, how do I know which snapshot was on 1PM, which was on 2PM, etc.? Any advices to track snapshots properly in such case?
I would suggest embedding that info along with any additional metadata needed in the snapshot name. Thanks, Ilya
Thank you Ilya for confirmation! Tony ________________________________________ From: Ilya Dryomov <idryomov@gmail.com> Sent: August 4, 2023 04:51 AM To: Tony Liu Cc: dev@ceph.io; ceph-users@ceph.io Subject: Re: [ceph-users] snapshot timestamp On Fri, Aug 4, 2023 at 7:49 AM Tony Liu <tonyliu0592@hotmail.com> wrote:
Hi,
We know snapshot is on a point of time. Is this point of time tracked internally by some sort of sequence number, or the timestamp showed by "snap ls", or something else?
Hi Tony, The timestamp in "rbd snap ls" output is the snapshot creation timestamp.
I noticed that when "deep cp", the timestamps of all snapshot are changed to copy-time.
Correct -- exactly the same as the image creation timestamp (visible in "rbd info" output).
Say I create a snapshot at 1PM and make a copy at 3PM, the timestamp of snapshot in the copy is 3PM. If I rollback the copy to this snapshot, I'd assume it will actually bring me back to the state of 1PM. Is that correct?
Correct.
If the above is true, I won't be able to rely on timestamp to track snapshots.
Say I create a snapshot every hour and make a backup by copy at the end of the day. Then the original image is damaged and backup is used to restore the work. On this backup image, how do I know which snapshot was on 1PM, which was on 2PM, etc.? Any advices to track snapshots properly in such case?
I would suggest embedding that info along with any additional metadata needed in the snapshot name. Thanks, Ilya
participants (2)
-
Ilya Dryomov
-
Tony Liu