heroku_multi_backup 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +47 -2
- data/lib/heroku_multi_backup/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3c19b2b16eeadff614a73069fb66c0a146f166db
|
4
|
+
data.tar.gz: 01e69b38106495e0db39c7a1d4ad4ce60da16e01
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a0803b04cd202cc08906b0cdc88e7842cdf88aef38aa9d41278e3111594814329f309d7f048425b1586dd3156b93e4240dc5d49c881ba1794bf76e469b068b8b
|
7
|
+
data.tar.gz: 71201f7e4de578526d5d187e51153640314f3087bc7568d317b502a5b2c347255a16d44da6c2588c3a189864be13271777b0c6ae90e9645230aa2ab6e1745735
|
data/README.md
CHANGED
@@ -1,6 +1,10 @@
|
|
1
1
|
# HerokuMultiBackup
|
2
2
|
|
3
|
-
|
3
|
+
The aim of this gem is to create backup of databases from on Heroku and upload it on Amazon S3. The gem is a very simple container of a rake task which can be executed manually or a scheduler can be used.
|
4
|
+
|
5
|
+
Initially heroku used to provide a back up add-on which has been now discountinued in favour of the pg backup service ([check here](https://devcenter.heroku.com/articles/heroku-postgres-backups)).
|
6
|
+
The problem I faced was when we have multiple applications on heroku, the service has to be executed for all the applications. Also there is no automated way of doing this and hence the rake task is created.
|
7
|
+
In this gem, one can specify all the applications the backup is required and the heroku user credentials in the environment variables and if the user has permission to access the app, backup will be taken. Detailed usage is given below:
|
4
8
|
|
5
9
|
## Installation
|
6
10
|
|
@@ -20,7 +24,44 @@ Or install it yourself as:
|
|
20
24
|
|
21
25
|
## Usage
|
22
26
|
|
23
|
-
|
27
|
+
To use this gem on heroku, add the environment variables using
|
28
|
+
```ruby
|
29
|
+
heroku config:set somevar=someval
|
30
|
+
```
|
31
|
+
On the local development system , I personally use [foreman](https://github.com/ddollar/foreman) and use env file to specify the variables.
|
32
|
+
A sample env file:
|
33
|
+
```ruby
|
34
|
+
S3_ACCESS_ID=******
|
35
|
+
#Access Id for Amazon S3 server
|
36
|
+
S3_ACCESS_SECRET=****
|
37
|
+
#Access secret for Amazon S3 server
|
38
|
+
S3_REGION=****
|
39
|
+
#Region of your Amazon S3 server
|
40
|
+
S3_BUCKET=****
|
41
|
+
#Name of the bucket you want the backup files to be uploaded to
|
42
|
+
APPNAME=app1,app2,app3
|
43
|
+
#List of all applications whose backup has to be taken
|
44
|
+
HEROKU_USERNAME=me@myemail.com
|
45
|
+
#Username for heroku
|
46
|
+
HEROKU_API_KEY=*****
|
47
|
+
#API key for heroku
|
48
|
+
#NOTE: Username and api key are used for authentication and checking if user has access to all apps listed.
|
49
|
+
```
|
50
|
+
Once this is done run the rake task as:
|
51
|
+
```ruby
|
52
|
+
rake heroku_multi_backup:autobackup
|
53
|
+
```
|
54
|
+
If you are using foreman use:
|
55
|
+
```ruby
|
56
|
+
foreman run rake heroku_multi_backup:autobackup
|
57
|
+
```
|
58
|
+
And voila ! Files will be uploaded to your bucket.
|
59
|
+
|
60
|
+
##TODO
|
61
|
+
|
62
|
+
- Add tests.
|
63
|
+
- Add support fr dropbox .
|
64
|
+
- Add support for google drive.
|
24
65
|
|
25
66
|
## Contributing
|
26
67
|
|
@@ -29,3 +70,7 @@ TODO: Write usage instructions here
|
|
29
70
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
30
71
|
4. Push to the branch (`git push origin my-new-feature`)
|
31
72
|
5. Create a new Pull Request
|
73
|
+
|
74
|
+
##References
|
75
|
+
I must accept that the idea for this gem has come using [pgbackup-archive gem](https://github.com/kjohnston/pgbackups-archive) and I have also used his code as reference.
|
76
|
+
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: heroku_multi_backup
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- The Dark Lord
|
@@ -86,8 +86,8 @@ dependencies:
|
|
86
86
|
- - "~>"
|
87
87
|
- !ruby/object:Gem::Version
|
88
88
|
version: '2'
|
89
|
-
description:
|
90
|
-
|
89
|
+
description: It automates the backup process of heroku and uploads the backup file
|
90
|
+
to the amazon s3 cloud servers.
|
91
91
|
email:
|
92
92
|
- contactme@rushabhhathi.com
|
93
93
|
executables: []
|
@@ -101,7 +101,7 @@ files:
|
|
101
101
|
- lib/heroku_multi_backup/version.rb
|
102
102
|
- lib/railtie.rb
|
103
103
|
- lib/tasks/heroku_multi_backup_autobackup.rake
|
104
|
-
homepage:
|
104
|
+
homepage: https://github.com/SauronTheGreat/heroku_multi_backup
|
105
105
|
licenses:
|
106
106
|
- MIT
|
107
107
|
metadata: {}
|