Class: Fourchette::Pgbackups
- Inherits:
-
Object
- Object
- Fourchette::Pgbackups
- Includes:
- Logger
- Defined in:
- lib/fourchette/pgbackups.rb
Instance Method Summary collapse
- #copy(from, to) ⇒ Object
-
#initialize ⇒ Pgbackups
constructor
A new instance of Pgbackups.
Methods included from Logger
Constructor Details
#initialize ⇒ Pgbackups
Returns a new instance of Pgbackups.
5 6 7 |
# File 'lib/fourchette/pgbackups.rb', line 5 def initialize @heroku = Fourchette::Heroku.new end |
Instance Method Details
#copy(from, to) ⇒ Object
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/fourchette/pgbackups.rb', line 9 def copy from, to ensure_pgbackups_is_present(from) ensure_pgbackups_is_present(to) from_url, from_name = pg_details_for(from) to_url, to_name = pg_details_for(to) @client = Heroku::Client::Pgbackups.new pgbackup_url(from)+'/api' @client.create_transfer(from_url, from_name, to_url, to_name) end |