diff --git a/README.md b/README.md index d03b1e65..f3db19b6 100644 --- a/README.md +++ b/README.md @@ -128,21 +128,8 @@ Change DATABASE URL (e.g after a rollback) ### Backup -Create a backup +See [Docs](./docs/heroku-backup.md) -`heroku pg:backups:capture --app ` - -The following command will provide a URL to where the backup can be downloaded (expires after 60 minutes) - -`heroku pg:backups:url b001 --app ` - -To restore a backup, use - -`heroku pg:backups:restore b001 DATABASE_URL --app ` - -To see the backup schedule - -`heroku pg:backus:schedules --app ` ## AWS diff --git a/docs/heroku-backup.md b/docs/heroku-backup.md index b7ee97f5..a3b72d9b 100644 --- a/docs/heroku-backup.md +++ b/docs/heroku-backup.md @@ -1,6 +1,26 @@ -### list backups +### List backups ``` heroku login heroku pg:backups --app skillbox-prod ``` + + +### Create a backup + +`heroku pg:backups:capture --app ` + +The following command will provide a URL to where the backup can be downloaded (expires after 60 minutes) + +`heroku pg:backups:url b001 --app ` + +To restore a backup, use + +`heroku pg:backups:restore b001 DATABASE_URL --app ` + +To see the backup schedule + +`heroku pg:backus:schedules --app ` + +To download a backup use +`heroku pg:backups:download --app `