Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nogweii/heroku-code-backup
Back up your heroku apps locally
https://github.com/nogweii/heroku-code-backup
Last synced: about 1 month ago
JSON representation
Back up your heroku apps locally
- Host: GitHub
- URL: https://github.com/nogweii/heroku-code-backup
- Owner: nogweii
- Created: 2014-03-31T08:12:57.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2014-03-31T08:13:24.000Z (almost 11 years ago)
- Last Synced: 2024-10-15T22:44:47.297Z (3 months ago)
- Language: Ruby
- Homepage:
- Size: 117 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Backing up your Heroku code
This is useful if you already have you [code backed up from github][chrisd] and
want to back up your [Heroku](https://dashboard.heroku.com/apps) apps as well.[chrisd]: https://chrisdown.name/2013/07/05/setting-up-local-github-mirror-with-cgit-git-daemon.html
### Install
Simple: `bundle install`.
It's assumed that you have authenticated using the [Heroku Toolbelt][toolbelt]
before using this script, and have a functioning `~/.netrc` file.[toolbelt]: https://toolbelt.heroku.com/
### Usage
Usage is also simple. Just run the script: `ruby heroku_backup.rb`.
You probably want to put it on a cron job:
20 22 * * * cd /srv/git/heroku_backup ; /usr/bin/ruby heroku_backup.rb >/dev/null 2>&1
This cron job assumes that the user the job executes as (varies, but it might be
`root` or `cron`) has a netrc file set up to authenticate with Heroku, per [the
toolbelt][toolbelt]