pgbackups_s3 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cba68bca1c3791533eecdaa606272d069657efd8
4
- data.tar.gz: b19a55e420cf7c5678de04050df90a700bdd93f2
3
+ metadata.gz: 3f3e02a429a4865906ce2a2c7e71536b37c4b56f
4
+ data.tar.gz: 466bf011cb825f7629652cda050b3efb0e401e07
5
5
  SHA512:
6
- metadata.gz: 197d770f48b476fff20d5a1fa228922ea6959f8f40754d2894e52cc7e6ac691cc36d3d4682427c5b1e45165398004ed8a5abfa2a0a74583a1637e0f6af63be0e
7
- data.tar.gz: 11eb69145134893beb213f603bd8017d824d94265374d5931ff4eb57a6de176efcdd743cd43e1dc5bbf52a04cef4c8c247349e5020b551f9c09d45bd09ff02d1
6
+ metadata.gz: 2c6e95c5016df6f82d50cd021e8296cf4f58fe15f7364e658ddebeb3d3f76b21ec060cace318ca37317de5c0e5308d710286275494242bc7cd4cfc205fcf01a3
7
+ data.tar.gz: 945f6f695848976b0c471a3e039041f47a2550568c1f21c5fb1ace1fe7966a8fbfe14ce9827d5a9af45a0132feb9416b1c37af5219d8985e2e171c845a413277
data/README.md CHANGED
@@ -1,7 +1,51 @@
1
1
  PgbackupsS3
2
2
  =======================================
3
3
 
4
+ This gem allows you to send postgres dumps from Heroku to an S3 bucket. It also
5
+ allows you restore your current database from any of the backups on S3.
4
6
 
5
- gem 'pgbackups_s3'
7
+ ## Setup
6
8
 
7
- rails g pgbackups_s3:install
9
+ To install on your system
10
+
11
+ `gem install pgbackups`
12
+
13
+ To install in rails app, add the following line to your Gemfile
14
+
15
+ `gem 'pgbackups_s3'`
16
+
17
+ Then run: `bundle install`
18
+
19
+ Then create the initialzer that will hold all the settings for the packups
20
+
21
+ `rails g pgbackups_s3:install`
22
+
23
+ Go to `config/initializers/pgbackups_s3.rb` and follow the documentation to get your backups cranking!
24
+
25
+ ## Using the gem
26
+
27
+ ### Back dat database up
28
+
29
+ To run a backup you can either run it in the rails console:
30
+
31
+ `PgbackupsS3.backup`
32
+
33
+ or through a rake task
34
+
35
+ `rake pgbackups_s3:backup`
36
+
37
+ ### List all the backups for a certain day
38
+
39
+ To list all backups for today just run:
40
+
41
+ `PgbackupsS3.list_backups`
42
+
43
+ All the values will default to today if there is no input
44
+
45
+ To specify a specific day of backups, run:
46
+
47
+ `PgbackupsS3.list_backups(YEAR, MONTH, DAY)`
48
+
49
+ This command will print out the keys of all the backups
50
+
51
+ ###
@@ -77,7 +77,7 @@ class PgbackupsS3
77
77
  def send_to_s3
78
78
  print "Shipping that sucka to S3\t"
79
79
  key = File.basename(@tmp_file)
80
- @s3.buckets[@bucket].objects["#{@directories}/#{Date.today.year}/6/#{Date.today.day}/#{key}"].write(:file => @tmp_file)
80
+ @s3.buckets[@bucket].objects["#{@directories}/#{Date.today.year}/#{Date.today.month}/#{Date.today.day}/#{key}"].write(:file => @tmp_file)
81
81
  puts "Backup uploaded to #{@bucket} bucket."
82
82
  end
83
83
 
data/pgbackups_s3.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'pgbackups_s3'
3
- s.version = '0.0.1'
3
+ s.version = '0.0.2'
4
4
  s.date = '2014-07-25'
5
5
  s.summary = %w{Send pgbackups to S3 using aws_sdk}
6
6
  s.description = %w{Send pgbackups to S3 using aws_sdk. This gem also allows
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pgbackups_s3
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Leonard