Make PITR mongodb with backup in s3 google

Hi! I have some problem - i setup Percona in docker container with storage in S3 Google
My config:

pitr:
  enabled: true
  oplogSpanMin: 5
  compression: s2
storage:
  type: s3
  s3:
    provider: gcs
    region: europe-west4
    endpointUrl: https://storage.googleapis.com
    bucket: test-mongo
    prefix: mongo-test
    credentials:
      access-key-id: 'xxx'
      secret-access-key: 'xxx'
    maxUploadParts: 10000
    storageClass: STANDARD
    insecureSkipTLSVerify: false

When i’ll make backup

docker exec percona pbm backup --compression=gzip

This backup appears in S3, i’ll got ansver

Starting backup '2022-07-05T14:59:54Z'....
Backup '2022-07-05T14:59:54Z' to remote store 's3://https://storage.googleapis.com/backups-mongo-central/mongo-devel' has started

But if i’ll start command

docker exec percona pbm list

i will got

Backup snapshots:

PITR <on>:

And in log -

docker logs percona

2022-07-05T15:00:16.000+0000 D [pitr] start_catchup
2022-07-05T15:00:16.000+0000 E [pitr] init: catchup: no backup found, a new backup is required to start PITR
2022-07-05T15:00:46.000+0000 D [pitr] start_catchup
2022-07-05T15:00:46.000+0000 E [pitr] init: catchup: no backup found, a new backup is required to start PITR

the reason is that the backup is in S3?

1 Like

Hi, @Denis_Sazhin
I think you need to do a normal backup (rather than PITR) at first. After the normal backup is successful, (you can verify by listing to make sure it is successful), then try PITR backup because PITR need a full backup as an anchor/base.

1 Like

I think so too, but I don’t understand how I can make a backup to the file system if my config says save to s3

1 Like

Hi @Denis_Sazhin,

Could you please show output from pbm status -s backups? pbm list is less informative. it does not show all backups like failed or in-progress.

your logs should contain information about the ‘2022-07-05T14:59:54Z’ backup status. check it. PITR does not work without successful backup. failed, canceled, or in-progress backup is not valid to start oplog slicing (PITR)

Also, it’s better to use pbm logs command. it prints output from all pbm agents. not only from the single.

2 Likes

Hi! @Dmytro_Zghoba
You’re right, I actually had a user permission error, thanks!

1 Like