rosie 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/README.md +48 -6
  2. data/lib/rosie/version.rb +1 -1
  3. metadata +3 -3
data/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  Backup and restore your MySQL db and dependent local assets (e.g. PaperClip uploads)
6
6
 
7
- Named after Rosie, the maid from the Jetsons (http://en.wikipedia.org/wiki/Rosie_the_Robot_Maid#Rosie). The gem provides two rake tasks which will backup or restore a MySQL database along with any dependent file system assets (like uploaded files from PaperClip) into a single timestamped file.
7
+ The gem provides two rake tasks which will backup or restore a MySQL database along with any dependent file system assets (like uploaded files from PaperClip) into a single timestamped file.
8
8
 
9
9
  ## Requirements
10
10
 
@@ -39,16 +39,57 @@ mysql_bin_dir:
39
39
 
40
40
  </pre>
41
41
 
42
- * `backup_dir`: This should be specified relative to your Rails root. This setting would give you `#{Rails.root}/backups`.
43
- * `assets_dir`: This should be specified relative to your Rails root. This directory is the one that is holding any system assets you'd like to have backed up along side the database dump.
42
+ * `backup_dir`: This specifies the directory where the backup files will be stored. It should be specified relative to your Rails root. This setting would give you `#{Rails.root}/backups`.
43
+ * `assets_dir`: This specifies the directory which hold system assets you want to be added to the backup file. This should be specified relative to your Rails root.
44
44
  * `mysql_bin_dir`: If mysql and mysqldump are not on the path of the user running this rake task, you may need to specify the directory where those commandline applications live. This should be an absolute path. By default, Rosie will try to find these in the user's PATH.
45
45
 
46
- ## Validation
47
-
48
- Tested on OSX 10.6/Ubuntu 11
46
+ The generated backup files (zipped tarballs) will be named by timestamp and placed in `backup_dir`.
49
47
 
50
48
  ## Usage
51
49
 
50
+ After installing the gem as described above, add the rosie.yml file to your #{Rails.root}/config/ directory with settings appropriate to your app. The gem installs the following three tasks:
51
+
52
+ * `rosie:config`
53
+ * `rosie:backup`
54
+ * `rosie:restore`
55
+
56
+
57
+ ### Task rosie:config
58
+
59
+ `rosie:config` will show you what it's derived from your config.
60
+ <code><pre>
61
+ % rake rosie:config
62
+ Rosie Config: read from /projects/boilerplate/config/rosie.yml
63
+ mysql: mysql
64
+ mysqldump: mysqldump
65
+ backup dir: /projects/boilerplate/my_backups
66
+ assets dir: /projects/boilerplate/public/my_assets
67
+ </pre></code>
68
+
69
+
70
+ ### Task rosie:backup
71
+
72
+ If you've checked out the configuration, and things look good, you can run a backup like this:
73
+ <pre>
74
+ % rake rosie:backup
75
+ </pre>
76
+ You'll find a new file under your `backups` dir (or whatever you've specified as the backup dir in your config).
77
+
78
+ ### Task rosie:restore
79
+
80
+ To restore, run `rosie:restore`. You'll need to add the commandline parameter `datafile` to tell rosie which file you are trying to restore from.
81
+
82
+ For example:
83
+ <pre>
84
+ % rake rosie:restore datafile=~/Downloads/20110817180817.tgz
85
+ </pre>
86
+
87
+ Rosie does not run migrations, so if you're pulling data from a database whose schema may be out of date with the system on which you're restoring, you probably will want to run a db:migrate after the restore.
88
+
89
+ ## Validation
90
+
91
+ Tested with Ruby 1.9.2-p180 on OSX 10.6/Ubuntu 10.10/11
92
+
52
93
  ## TODO
53
94
  * add ability to backup remote databases (not on localhost)
54
95
  * make Rails2.3.x compatible
@@ -56,3 +97,4 @@ Tested on OSX 10.6/Ubuntu 11
56
97
 
57
98
  ## Credits
58
99
  Developed by Jon Rogers and Jeremy Yun @ 2rye.com
100
+ Named after Rosie, the maid from the Jetsons (http://techland.time.com/2010/04/20/sci-fi-sexy-time-all-time-hottest-robots/500_rosie_jetsons/).
data/lib/rosie/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Rosie
2
- VERSION = '0.0.2'
2
+ VERSION = '0.0.3'
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: rosie
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.2
5
+ version: 0.0.3
6
6
  platform: ruby
7
7
  authors:
8
8
  - Jon Rogers
@@ -11,7 +11,7 @@ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
13
 
14
- date: 2011-08-19 00:00:00 Z
14
+ date: 2011-08-20 00:00:00 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rspec
@@ -81,6 +81,6 @@ rubyforge_project: rosie
81
81
  rubygems_version: 1.8.8
82
82
  signing_key:
83
83
  specification_version: 3
84
- summary: rosie-0.0.2
84
+ summary: rosie-0.0.3
85
85
  test_files: []
86
86