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

rotate doesn't work while using in a config file #248

Open tferriez opened 6 years ago

tferriez commented 6 years ago

Hello,

The following config file works as expected except the rotate option :

production: host: localhost port: 27017 username: admin password: xxxx ssl: enabled: true insecure: true client_cert_file: /etc/ssl/xxxxxx.pem log_dir: /var/log/mongodb-consistent-backup backup: method: mongodump name: default location: /var/lib/mongodb-consistent-backup rotate: max_backups: 2 archive: method: tar notify: method: none upload: method: none

The log indicates :

[2018-01-23 17:15:11,566] [INFO] [MainProcess] [Stage:run:95] Completed running stage mongodb_consistent_backup.Archive with task Tar in 2.02 seconds [2018-01-23 17:15:11,572] [INFO] [MainProcess] [Rotate:rotate:57] Backup rotation is disabled, skipping [2018-01-23 17:15:11,573] [INFO] [MainProcess] [Rotate:symlink:83] Updating default latest symlink to current backup path: /var/lib/mongodb-consistent-backup/default/20180123_1714 [2018-01-23 17:15:11,573] [INFO] [MainProcess] [Rotate:symlink:89] Updating default previous symlink to: /var/lib/mongodb-consistent-backup/default/20180123_1713 [2018-01-23 17:15:11,574] [INFO] [MainProcess] [Main:run:461] Completed mongodb-consistent-backup in 22.12 sec

Regards,

Thomas

tferriez commented 6 years ago

Hi,

As a workaround, i do :

mongodb-consistent-backup --config /path/config --rotate.max_backups X

timvaillancourt commented 6 years ago

Thanks @tferriez, could I get your output from:

mongodb-consistent-backup --version

Thanks

tferriez commented 6 years ago

Hi,

Here is the output :

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

It seams the same problem occurs with the log dir option

corey-hammerton commented 6 years ago

mongdb-consistent-backup version 1.3.0 is not affected by this bug.