PBM Azure Storage Config file has unmarshal errors

I’ve got a 3 member replica set and have an Azure Storage accounts prepared for remote storage. I used the template provided in the walk through and filled in the relevant values. Here are the errors and content of the file so you can see the layout. Not sure where to go from here…

Any suggestions would be appreciated!

I may have found a way past this, but I’m still hoping that I get some feedback.

I created an alternate file with different values:

storage:
type: filesystem
filesystem:
path: “/tmp/pbm_backups”

pbm config --file pbm2_config.yaml

That was accepted with resulting values:

pitr:
enabled: false
oplogSpanMin: 0
storage:
type: filesystem
filesystem:
path: /tmp/pbm_backups

Trying the file upload with Azure values still didnt work, but shifting to manual changes like these:

pbm config --set storage.type=azure
pbm config --set storage.azure.prefix=pbm
pbm config --set storage.azure.account=[accountName]
pbm config --set storage.azure.credentials.key=[accessKey]

Resulted in what appears to be a workable config

pbm config
pitr:
enabled: false
oplogSpanMin: 0
compression: s2
storage:
type: azure
azure:
account: [accountName]
prefix: pbm
credentials:
key: ‘***’
filesystem:
path: /tmp/pbm_backups
backup:
oplogSpanMin: 0
compression: s2

I dont like seeing the value for “filesystem” but at least I can continue with testing.

I’m surprised I dont see any conversation on this topic…makes me thing I have something missing somewhere…

Please try using the following template from our docs without adding/removing any spaces before the options.

storage:
  type: azure
  azure:
    account: <your-account>
    container: <your-container>
    prefix: <your-prefix>
    credentials:
      key: <your-access-key>

Sandra, thanks for the reply. I did exactly as you suggested. I pasted the the script directly from the copied template posted on the website. I verified the indentation. Thought I maybe did it wrong so I tried again with the same results. I was able to run a backup and the Azure Storage worked with the configuration I posted.

Do you see any potential problem with having the “filesystem:path: /tmp/pbm_backups” present in the configuration? I cant seem to find a way to edit it out…

@werekind

You’ve missed the spaces before options, at least if to compare the template above with the initial config in the screenshot. For now there shouldn’t be any issues, however to avoid any confusion with config in future, it’s just better to remove it. In order to do so, please create storage config file from template suggested above and pass it again to PBM.

> pbm config
pitr:
  enabled: false
  oplogSpanMin: 0
  compression: s2
storage:
  type: azure
  azure:
    account: test
    container: test
    prefix: pbm
    credentials:
      key: '***'
  filesystem:
    path: /tmp/local_backups
backup:
  oplogSpanMin: 0
  compression: s2
==============================
> pbm config --file=storage-config.yaml
==============================
> pbm config
pitr:
  enabled: false
  oplogSpanMin: 0
  compression: s2
storage:
  type: azure
  azure:
    account: test
    container: test
    prefix: pbm
    credentials:
      key: '***'
backup:
  oplogSpanMin: 0
  compression: s2

Thanks for staying in the conversation, Sandra! I’d really like to get clarity on this.

Today I took output from cat against the file, copied that into a text file. I copied your template above and did the same. Then I compared the two text files using Beyond Compare:

image

Seeing the spaces clearly revealed between my file I applied the file again with the same results:

image

I really don’t see what the problem could be at this point.

OK, I’m clearly suffering from analysis fatigue! I was interpreting your response as "spaces before my option ‘input’ ".

I finally realized I was obviously missing the indent spaces below azure. It applied. Thank you Sandra!!

1 Like

@werekind

Sorry I wasn’t clear enough in my previous reply, but I’m glad it finally worked for you!:slight_smile:

1 Like