Uploaded image for project: 'Percona Backup for MongoDB'
  1. Percona Backup for MongoDB
  2. PBM-701

Prevent restore to time which isn't covered by PITR chunks

Details

    • Bug
    • Status: Done
    • Medium
    • Resolution: Fixed
    • 1.6.0
    • 1.6.0
    • None
    • None

    Description

      Hi,

      It's possible to restore to time which isn't covered by PITR chunks.

      Backup snapshots:
        2021-08-04T13:16:34Z [complete: 2021-08-04T13:16:55]
        2021-08-04T13:18:09Z [complete: 2021-08-04T13:18:31]
        2021-08-04T13:21:07Z [complete: 2021-08-04T13:21:28]
        2021-08-04T13:31:19Z [complete: 2021-08-04T13:31:41]
        2021-08-04T13:33:38Z [complete: 2021-08-04T13:34:04]
        2021-08-04T13:34:45Z [complete: 2021-08-04T13:35:07]
        2021-08-04T13:48:44Z [complete: 2021-08-04T13:49:06]
        2021-08-04T14:18:15Z [complete: 2021-08-04T14:18:37]
      
      PITR <off>:
        2021-08-04T13:16:55 - 2021-08-04T13:57:48
        2021-08-04T14:18:37 - 2021-08-04T14:19:23
      
        config: [{ 2021-08-04T13:16:55 - 2021-08-04T13:58:02} { 2021-08-04T14:18:37 - 2021-08-04T14:19:38}]
        rs1: [{ 2021-08-04T13:16:55 - 2021-08-04T13:57:48} { 2021-08-04T14:18:37 - 2021-08-04T14:19:27}]
        rs2: [{ 2021-08-04T13:16:55 - 2021-08-04T13:58:01} { 2021-08-04T14:18:37 - 2021-08-04T14:19:23}]
      
      pbm restore --time=2021-08-04T14:00:00
      ....Restore to the point in time '2021-08-04T14:00:00' has started
      
      pbm logs -t0 -n rs1 -s D -e "pitrestore"
      2021-08-04T14:20:15Z I [rs1/localhost:27019] [pitrestore/2021-08-04T14:00:00Z] recovery successfully finished
      2021-08-04T14:20:15Z I [rs1/localhost:27019] [pitrestore/2021-08-04T14:00:00Z] oplog replay finished on {1628085468 2} <1628085600>
      2021-08-04T14:20:14Z I [rs1/localhost:27019] [pitrestore/2021-08-04T14:00:00Z] replay chunks
      2021-08-04T14:20:14Z I [rs1/localhost:27019] [pitrestore/2021-08-04T14:00:00Z] oplog replay finished on {1628084945 5}
      2021-08-04T14:20:14Z I [rs1/localhost:27019] [pitrestore/2021-08-04T14:00:00Z] starting oplog replay
      2021-08-04T14:20:14Z I [rs1/localhost:27019] [pitrestore/2021-08-04T14:00:00Z] restoring users and roles
      2021-08-04T14:20:06Z I [rs1/localhost:27019] [pitrestore/2021-08-04T14:00:00Z] mongorestore finished
      2021-08-04T14:20:03Z I [rs1/localhost:27019] [pitrestore/2021-08-04T14:00:00Z] snapshot 2021-08-04T13:48:44Z
      2021-08-04T14:20:01Z I [rs1/localhost:27019] [pitrestore/2021-08-04T14:00:00Z] recovery started
      

      Attachments

        Activity

          People

            andrew.pogrebnoi Andrew Pogrebnoi
            sandra.romanchenko Sandra Romanchenko
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Smart Checklist