Skip to content

Commit

Permalink
Merge pull request ManageIQ#332 from agrare/fix_pg_backup_error_no_su…
Browse files Browse the repository at this point in the history
…ch_file_or_dir

Fix ENOENT error from backup_pg_compress
  • Loading branch information
bdunne authored Jan 26, 2018
2 parents 7e14373 + b391b10 commit cd8fcb9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/gems/pending/util/postgres_admin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ def self.backup_pg_compress(opts)

path = Pathname.new(opts.delete(:local_file))

FileUtils.mkdir_p(path.dirname)
Dir.mktmpdir("vmdb_backup", path.dirname) do |dir|
runcmd("pg_basebackup", opts, :z => nil, :format => "t", :xlog_method => "fetch", :pgdata => dir)
FileUtils.mv(File.join(dir, "base.tar.gz"), path)
Expand Down

0 comments on commit cd8fcb9

Please sign in to comment.