Skip to content

Commit

Permalink
Update pg_backups.rb
Browse files Browse the repository at this point in the history
Copy changes to CLI output.
  • Loading branch information
Matthew Soldo committed Nov 12, 2014
1 parent ea87121 commit cf33fd4
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions lib/heroku/command/pg_backups.rb
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def backup_status
elsif backup[:finished_at]
"Failed"
elsif backup[:started_at]
"Running"
"Capturing"
else
"Pending"
end
Expand Down Expand Up @@ -225,10 +225,9 @@ def capture_backup

backup = hpg_client(attachment).backups_capture
display <<-EOF
Hit Ctrl-C at any time to stop watching progress; the backup
will continue running. You can monitor its progress by running
heroku pg:backups info or stop a running backup with
heroku pg:backups cancel.
Use Ctrl-C at any time to stop monitoring progress; the backup
will continue running. Use heroku pg:backups info to check progress.
Stop a running backup with heroku pg:backups cancel.
#{attachment.name} ---backup---> #{backup_name(backup[:num])}
Expand Down Expand Up @@ -271,10 +270,9 @@ def restore_backup

backup = hpg_client(attachment).backups_restore(backup[:to_url])
display <<-EOF
Hit Ctrl-C at any time to stop watching progress; the restore
will continue running. You can monitor its progress by running
heroku pg:backups info or stop a running restore with
heroku pg:backups cancel.
Use Ctrl-C at any time to stop monitoring progress; the backup
will continue restoring. Use heroku pg:backups to check progress.
Stop a running restore with heroku pg:backups cancel.
#{backup_name(backup[:num])} ---restore---> #{attachment.name}
Expand Down Expand Up @@ -337,7 +335,7 @@ def schedule_backups

attachment = generate_resolver.resolve(db, "DATABASE_URL")
hpg_client(attachment).schedule(schedule_opts)
display "Scheduled nightly backups for #{attachment.name}"
display "Scheduled automatic daily backups for #{attachment.name}"
end

def unschedule_backups
Expand All @@ -350,10 +348,10 @@ def unschedule_backups
attachment.name =~ /#{s[:name]}/
end
if schedule_id.nil?
display "No nightly backups for #{attachment.name} found"
display "No automatic daily backups for #{attachment.name} found"
else
hpg_client(attachment).unschedule(schedule_id)
display "Stopped nightly backups for #{attachment.name}"
display "Stopped automatic daily backups for #{attachment.name}"
end
end

Expand Down

0 comments on commit cf33fd4

Please sign in to comment.