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

Upload Rsync prepare_dest_dir prepares wrong location #267

Closed corey-hammerton closed 6 years ago

corey-hammerton commented 6 years ago

When using the rsync upload functionality the logs say that prepare_dest_dir() works flawlessly, but the RsyncUploadThread uses the configured rsync path as the destination. When it runs it complains that the destination directory on the target server does not exist. Upon investigation the prepare_dest_dir() runs "mkdir -p self.base_dir"

We cannot effectively use the rsync upload if prepare_dest_dir does not run mkdir -p on self.rsync_path

Update https://github.com/Percona-Lab/mongodb_consistent_backup/blob/master/mongodb_consistent_backup/Upload/Rsync/Rsync.py#L76 with `"mkdir", "-p", self.rsync_path