Skip to content

Commit

Permalink
Filter backups by current cloud.
Browse files Browse the repository at this point in the history
  • Loading branch information
arangamani committed Mar 27, 2014
1 parent d8dfcd0 commit 702be0b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions libraries/provider_rightscale_backup.rb
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,12 @@ def find_latest_backup(lineage, timestamp, from_master = nil)
"completed==true"
]
filter << "from_master==#{from_master}" if from_master

# Add cloud href to the list of filters so we only get backups in the current cloud as we can't restore backups
# from a different cloud.
cloud_href = @api_client.get_instance.cloud.href
filter << "cloud_href==#{cloud_href}"

backup = @api_client.backups.index(:lineage => lineage, :filter => filter)
backup.first
end
Expand Down

0 comments on commit 702be0b

Please sign in to comment.