rails-backup-migrate 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/README.textile +2 -0
- data/lib/rails-backup-migrate/version.rb +1 -1
- data/lib/tasks/rails-backup-migrate.rake +17 -13
- metadata +4 -4
data/README.textile
CHANGED
@@ -31,6 +31,8 @@ h2. Compatibility
|
|
31
31
|
|
32
32
|
Tested initially on 'redmine' using rails 2.3.11 and some simpler tests with rails 3. Has been tested with MySQL and Sqlite3 databases. Further testing with postgres to be done.
|
33
33
|
|
34
|
+
This requires a system with access to the `tar` command in your path. (Easy for Mac & *nixes, may require a posix environment such as cygwin under Windows.)
|
35
|
+
|
34
36
|
h2. Contributors
|
35
37
|
|
36
38
|
Matt Connolly - main author of gem
|
@@ -50,10 +50,14 @@ namespace :site do
|
|
50
50
|
task :files, [:backup_file] => [:_add_files_directory_to_archive, :_finish_archive] do |t,args|
|
51
51
|
end
|
52
52
|
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
53
|
+
end
|
54
|
+
|
55
|
+
desc "Backup everything: schema, database to yml, and all files in 'files' directory. Default backup file is 'site-backup.tgz'"
|
56
|
+
task :backup, [:backup_file] => [
|
57
|
+
'site:backup:_save_db_schema',
|
58
|
+
'site:backup:_save_db_to_yml',
|
59
|
+
'site:backup:_add_files_directory_to_archive',
|
60
|
+
'site:backup:_finish_archive'] do
|
57
61
|
end
|
58
62
|
|
59
63
|
|
@@ -100,24 +104,24 @@ namespace :site do
|
|
100
104
|
RailsBackupMigrate.clean_up
|
101
105
|
end
|
102
106
|
|
103
|
-
desc "Erase and reload entire db schema and data from backup file. Runs `rake db:schema:load`."
|
107
|
+
desc "Erase and reload entire db schema and data from backup file. Runs `rake db:schema:load`. Runs `rake db:schema:load`"
|
104
108
|
task :db, [:backup_file] => [:_restore_db_from_yml] do |t, args|
|
105
109
|
RailsBackupMigrate.clean_up
|
106
110
|
end
|
107
111
|
|
108
|
-
desc "
|
109
|
-
task :
|
112
|
+
desc "Restore all files in the 'files' directory. Default backup file is 'site-backup.tgz'."
|
113
|
+
task :files, [:backup_file] => [:_restore_files_directory] do |t,args|
|
110
114
|
RailsBackupMigrate.clean_up
|
111
115
|
end
|
112
116
|
|
113
117
|
end
|
114
118
|
|
115
|
-
desc "
|
116
|
-
task :
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
119
|
+
desc "Erase and reload db schema and data from backup files, and restore all files in the 'files' directory. Default backup file is 'site-backup.tgz'. Runs `rake db:schema:load`."
|
120
|
+
task :restore, [:backup_file] => [
|
121
|
+
'site:restore:_restore_db_schema',
|
122
|
+
'db:schema:load',
|
123
|
+
'site:restore:_restore_db_from_yml',
|
124
|
+
'site:restore:_restore_files_directory'] do
|
121
125
|
end
|
122
126
|
|
123
127
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-backup-migrate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 6
|
10
|
+
version: 0.0.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Matt Connolly
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-07-01 00:00:00 +10:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|