Percona-Lab / mongodb_consistent_backup

A tool for performing consistent backups of MongoDB Clusters or Replica Sets
https://www.percona.com
Apache License 2.0
276 stars 81 forks source link

[v1.4.1] Backup to s3 not read from config file #312

Open megamorf opened 5 years ago

megamorf commented 5 years ago

Issue Description

When running mongodb-consistent-backup with the configuration file below, all steps are executed successfully apart from the upload to s3. I've checked conformance to the example config multiple times but apparently the s3 section in the config file is never evaluated properly.

Passing settings as commandline parameters works but is not a good option since it exposes secrets needlessly:

/usr/bin/mongodb-consistent-backup --config /etc/mongodb-consistent-backup.conf --verbose --upload.method s3 --upload.s3.region eu-west-1 --upload.s3.access_key "<redacted>" --upload.s3.secret_key "<redacted>" --upload.s3.bucket_name backup-bucket

Debug Information

Version

mongodb-consistent-backup --version
mongodb-consistent-backup version: 1.4.1, git commit hash: a3b02b5bbe7f34c3cdd6989101aba940d958c47e
Python version: 2.7.14
Python modules:
    Fabric: 1.14.0
    pymongo: 3.6.0
    multiprocessing: 0.70a1
    yaml: 3.12
    boto: 2.48.0
    filechunkio: 1.8

/etc/mongodb-consistent-backup.conf

production_s3:
  archive:
    method: tar
  authdb: admin
  backup:
    location: /data/backup/mongodb
    method: mongodump
    name: aws-en-prod
  host: localhost
  log_dir: /var/log/mongodb-consistent-backup
  notify:
    method: none
  port: 27017
  rotate:
    max_days: 90
  upload:
    method: s3
    remove_uploaded: false
    s3:
      region: eu-west-1
      access_key: <redacted>
      secret_key: <redacted>
      bucket_name: backup-bucket
megamorf commented 4 years ago

Any update on this?

delgod commented 4 years ago

Hi Sebastian!

feel free to create PR, we will be happy to review it