pg:backups CLI copy changes
mattsoldo opened this issue · 5 comments
I finished a review of the CLI copy changes for the new pg:backups. I've already submitted a few in this commit.
CLI Changes
$ heroku pg:backups
Currently:
$ heroku pg:backups
ID Backup Time Status Size Database
---- ------------------------- ------------------------------------------ ----- ---------
b001 2014-11-12 19:19:59 +0000 Finished 2014-11-12 19:22:32 +0000 (143MB) 143MB COLORLESS
Change
- remove size from status (it is redundant)
- Sort backups and restores DESC by backup time
- Change to:
## Backups:
ID Backup Time Status Size Database
---- ------------------------- ------------------------------------------ ----- ---------
b002 2014-11-12 19:19:59 +0000 In Progress (60 MB) COLORLESS
b001 2014-11-12 19:19:59 +0000 Finished 2014-11-12 19:22:32 +0000 (143 MB) 143MB COLORLESS
## Restores:
ID Backup Time Status Size Database
---- ------------------------- ------------------------------------------ ----- ---------
r001 2014-11-12 19:19:59 +0000 Finished 2014-11-12 19:22:32 +0000 (143MB) 143MB COLORLESS
heroku pg:backups capture
Submitted changes:
$ heroku pg:backups capture
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.
HEROKU_POSTGRESQL_PINK ---backup---> b003
pg:backups info
Propose that we remove pg:backups info altogether. Except for manual vs automatic, everything else is available in the pg:backups view. The manual vs backup is inferrable from the capture time.
$ pg:backups schedule
Current: Scheduled nightly backups for #{attachment.name}
- Change to
Scheduled automatic daily backups for #{attachment.name}
if there is not time argument - Change to
Scheduled automatic daily backups at #{time} for #{attachment.name}
if there is a time argument
$ pg:backups unschedule
If not scheduled:
Current: No nightly backups for #{attachment.name} found
Change to (submitted): No automatic daily backups for #{attachment.name} found
If Scheduled:
Current: Stopped nightly backups for #{attachment.name}
Change to (submitted): Stopped automatic daily backups for #{attachment.name}
pg:copy
Change this command to show a list of copies that have been performed or are in progress
ID Backup Time Status Size Database
---- ------------------------- ------------------------------------------ ----- ---------
c001 2014-11-12 19:19:59 +0000 Finished 2014-11-12 19:22:32 +0000 (143MB) 143MB COLORLESS
Sounds great. Some questions / comments:
- One other thing I wanted to include is size of the source database for backups (since people frequently get confused about size of DB versus size of backup--I'm happy to address this another way if there's something better). Is there a good place to put this? Maybe change Aize to
250MB / (143MB compressed)
or something like that? - I agree that
pg:backups info
is largely redundant, but with--verbose
, it lets you access logs for that transfer. Is there another way to put this? (Although for manual vs. automatic, we could usea001
vsb001
, like PGBackups currently does--no need to have that inferred from timestamp) - Argument-less
pg:copy
for listing feels really weird. I don't have a better suggestion, so I'll just implement that for now, but wanted to raise the point again because complaining is easy ;)
I agree that pg:backups info is largely redundant, but with --verbose, it lets you access logs for that transfer. Is there another way to put this? (Although for manual vs. automatic, we could use a001 vs b001, like PGBackups currently does--no need to have that inferred from timestamp)
I agree with @deafbybeheading on this. We want a way for users to access backup logs. @mattsoldo can you find a way to do that? Otherwise, let's eep info
as the command to do that, and even have it include the logs by default. I feel the issue with the current setup is that customers won't necessarily know that logs are available.
Argument-less pg:copy for listing feels really weird.
I also agree here. On the rest, we do plural (like backups
). Would heroku pg:copies
be clearer?
Most of it is in #102, except the pg:copy/ies part.
@hgmnz @cyberdelia @deafbybeheading I also agree that users should have access. I think it makes sense to leave it in pg:info, but without the --verbose flag. I'm going to take another look at it now.
@mattsoldo thanks. Well, @cyberdelia is a bit blocked on product at this point. I think if we get in a room we can come up with the right UX to keep this moving. Do you have some time tomorrow at the office?