Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

heroku pg:backups capture --expire is missing #1471

Closed
mikehale opened this issue Mar 23, 2015 · 3 comments
Closed

heroku pg:backups capture --expire is missing #1471

mikehale opened this issue Mar 23, 2015 · 3 comments

Comments

@mikehale
Copy link
Contributor

$ heroku pg:backups -a my-app
=== Backups
ID    Backup Time                Status                              Size    Database
----  -------------------------  ----------------------------------  ------  --------
b006  2015-03-23 20:38:10 +0000  Finished 2015-03-23 20:38:12 +0000  2.57MB  IVORY
b005  2015-03-23 20:37:48 +0000  Finished 2015-03-23 20:37:49 +0000  2.57MB  IVORY

=== Restores
 !    No restores found. Use `heroku pg:backups restore` to restore a backup

$ heroku pg:backups capture DATABASE_URL --expire -a my-app
 !    Invalid argument: "--expire"
Usage: heroku pg:backups [subcommand]

 Interact with built-in backups. Without a subcommand, it lists all
 available backups. The subcommands available are:

  info BACKUP_ID                 # get information about a specific backup
  capture DATABASE               # capture a new backup
  restore [[BACKUP_ID] DATABASE] # restore a backup (default latest) to a database (default DATABASE_URL)
  public-url BACKUP_ID           # get secret but publicly accessible URL for BACKUP_ID to download it
  cancel                         # cancel an in-progress backup
  delete BACKUP_ID               # delete an existing backup
  schedule DATABASE              # schedule nightly backups for given database
    --at '<hour>:00 <timezone>'  #   at a specific (24h clock) hour in the given timezone
  unschedule DATABASE            # stop nightly backup for database
  schedules                      # list backup schedule

$ heroku version
heroku-toolbelt/3.30.3 (x86_64-darwin10.8.0) ruby/1.9.3
@mikehale
Copy link
Contributor Author

/cc @uhoh-itsmaciek

@mikehale
Copy link
Contributor Author

I just learned that --expire is currently implicit in all heroku pg:backups capture invocations. This means that by deafult old backups will silently be removed as you hit your plan maximum instead of failing to capture a new backup. Or to put it another way new backups will always be captured and old ones will be deleted as needed when the plan limit is reached.

@msakrejda
Copy link
Contributor

Right, we expire by default now. Since we allow a larger number of backups, this shouldn't be an issue and we can retrieve accidentally-expired backups for a few days afterward via support ticket.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants