backup 1.3.0 → 1.3.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -22,11 +22,27 @@
22
22
 
23
23
  - Custom
24
24
 
25
- I built in a simple class (called: Custom) that will allow you to manually create a SQL dump using a shell command.
26
- This looks basically the same as the other options, except that you will have to write (probably) only a "single
27
- line'd shell command" to generate a sql dump file. Once you generate the file, Backup will take care of the rest
28
- of the (optional)archiving, compressing, encrypting and pushing to Amazon S3 or any remote server that supports SSH.
25
+ Custom enables you to, regardless whether "Backup" supports your database type or not, to still enable you to make backups and benefit from the other features!
26
+ There is just one thing you must do yourself inside one of the configuration files that Backup provides, and that is (assuming you know how to create a SQL dump through the command line for your database type), to actually create that command. If you don't how, you can probably find out how when searching through "google". Usually, it takes just "one line" to make a SQL dump, regardless of what database type we're talking about. So now, if you know that particular command to generate that SQL dump for your database, you're practically set to benefit from "Backup"!
29
27
 
28
+ ==== Again, whether "Backup" has an adapter that supports your database or not,
29
+ ==== if you are able to generate the SQL dump through command line, you will still benefit from the following:
30
+
31
+ - Backup Archiving
32
+ - Backup Compression
33
+ - Backup Encryption (see below)
34
+ - Backup Cleaning (see below)
35
+ - Backup Transfer to S3
36
+ - Backup Transfer through SSH(SCP) to any remote server
37
+
38
+ The only difference is that you now have to know how to produce a SQL dump yourself. Here's an example of the PostgreSQL command:
39
+
40
+ pg_dump -U {user-name} {source_db} -f {dumpfilename.sql}
41
+
42
+ So, after you experimented using the command you found, and see it works, you just copy that 'working command' inside the configuration files in a special section,
43
+ and you're set to use it with "Backup" and benefit from the other features!
44
+
45
+
30
46
 
31
47
  === Encryption
32
48
 
@@ -54,7 +70,9 @@ It will now automagically remove the oldest backup from for example, S3, when th
54
70
  - I wanted it to take less than 2 minutes to set up
55
71
  - I wanted it to support (AT LEAST) both SQLite3 as well as MySQL
56
72
  - I wanted it to support an additional (custom) adapter incase the database type isn't SQLite3 or MySQL
57
- - I wanted it to support some encryption
73
+ - I wanted it to support compression
74
+ - I wanted it to support archiving
75
+ - I wanted it to support encryption
58
76
  - I wanted to be able to store my files on my private backup server and on Amazon S3
59
77
  - I wanted it to be able to automatically (and optionally) remove old backups to keep S3/backup server costs low
60
78
 
data/Rakefile CHANGED
@@ -17,8 +17,8 @@ begin
17
17
  }
18
18
 
19
19
  gem.email = "meskyan@gmail.com"
20
- gem.homepage = "http://github.com/meskyanichi/backup"
21
- gem.authors = ["meskyanichi"]
20
+ gem.homepage = ""
21
+ gem.authors = ["Michael van Rooijen"]
22
22
  gem.add_dependency "aws-s3", ">= 0.6.2"
23
23
  gem.add_dependency "net-ssh", ">= 2.0.15"
24
24
  gem.add_dependency "net-scp", ">= 1.0.2"
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.3.0
1
+ 1.3.1
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{backup}
8
- s.version = "1.3.0"
8
+ s.version = "1.3.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["meskyanichi"]
12
- s.date = %q{2009-10-09}
11
+ s.authors = ["Michael van Rooijen"]
12
+ s.date = %q{2009-10-10}
13
13
  s.description = %q{
14
14
  “Backup” is a RubyGem, written for Ruby on Rails. It's main purpose is to Backup any
15
15
  files to Amazon S3 or any remotely accessible server through SSH (SCP). It supports database
@@ -38,6 +38,7 @@ Gem::Specification.new do |s|
38
38
  "generators/backup_files/templates/db.rake",
39
39
  "generators/backup_files/templates/s3.rake",
40
40
  "generators/backup_files/templates/s3.yml",
41
+ "generators/backup_files/templates/setup.rake",
41
42
  "generators/backup_files/templates/ssh.rake",
42
43
  "generators/backup_files/templates/ssh.yml",
43
44
  "lib/backup.rb",
@@ -56,7 +57,7 @@ Gem::Specification.new do |s|
56
57
  "lib/backup/transfer/s3.rb",
57
58
  "lib/backup/transfer/ssh.rb"
58
59
  ]
59
- s.homepage = %q{http://github.com/meskyanichi/backup}
60
+ s.homepage = %q{}
60
61
  s.rdoc_options = ["--charset=UTF-8"]
61
62
  s.require_paths = ["lib"]
62
63
  s.rubygems_version = %q{1.3.5}
@@ -17,10 +17,13 @@ class BackupFilesGenerator < Rails::Generator::Base
17
17
  # Generate the Rake Tasks
18
18
  m.directory "lib/tasks"
19
19
  m.directory "lib/tasks/backup"
20
- m.file "config.rake", "lib/tasks/backup/config.rake"
21
- m.file "s3.rake", "lib/tasks/backup/s3.rake"
22
- m.file "ssh.rake", "lib/tasks/backup/ssh.rake"
23
- m.file "db.rake", "lib/tasks/backup/db.rake"
20
+ m.directory "lib/tasks/backup/files"
21
+ m.file "config.rake", "lib/tasks/backup/config.rake"
22
+ m.file "s3.rake", "lib/tasks/backup/s3.rake"
23
+ m.file "ssh.rake", "lib/tasks/backup/ssh.rake"
24
+ m.file "db.rake", "lib/tasks/backup/db.rake"
25
+ m.file "setup.rake", "lib/tasks/backup/setup.rake"
26
+ m.file "backup.sqlite3", "lib/tasks/backup/files/backup.sqlite3"
24
27
 
25
28
  # Generate the YAML files
26
29
  m.directory "config/backup"
@@ -0,0 +1,28 @@
1
+ namespace :backup do
2
+ namespace :setup do
3
+ desc "Automatically sets up Capistrano Structure for you!"
4
+ task :capistrano => :environment do
5
+ puts 'Looking for shared path!'
6
+ if File.directory?("../../shared") then
7
+ puts 'Found shared path!'
8
+ puts 'Looking for db folder in shared path!'
9
+ unless File.directory?("../../shared/db") then
10
+ puts 'Cound not find db folder in shared path! Creating it now!'
11
+ %x{ mkdir -p ../../shared/db }
12
+ else
13
+ puts 'Found db folder in shared path!'
14
+ end
15
+
16
+ puts 'Looking for backup.sqlite3 in shared/db path!'
17
+ unless File.exist?("../../shared/db/backup.sqlite3") then
18
+ puts 'Could not find, creating it now!'
19
+ %x{ cp #{RAILS_ROOT}/lib/tasks/backup/files/backup.sqlite3 ../../shared/db/backup.sqlite3 }
20
+ else
21
+ puts "backup.sqlite3 already exists in the shared/db folder! Skipping backup.sqlite3 creation!"
22
+ end
23
+ %x{ ln -nfs #{RAILS_ROOT}/../../shared/db/backup.sqlite3 #{RAILS_ROOT}/db/backup.sqlite3 }
24
+ puts "Set up a symbolic link to the backup.sqlite3 inside #{RAILS_ROOT}/db/ folder!"
25
+ end
26
+ end
27
+ end
28
+ end
@@ -9,7 +9,7 @@ module Backup
9
9
 
10
10
  # Initialize the process
11
11
  # Executing multiple processes
12
- #
12
+ #
13
13
  # - Archive
14
14
  # Archives the specified folder to a .tar
15
15
  # - Compress
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: backup
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
- - meskyanichi
7
+ - Michael van Rooijen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-10-09 00:00:00 +02:00
12
+ date: 2009-10-10 00:00:00 +02:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -65,6 +65,7 @@ files:
65
65
  - generators/backup_files/templates/db.rake
66
66
  - generators/backup_files/templates/s3.rake
67
67
  - generators/backup_files/templates/s3.yml
68
+ - generators/backup_files/templates/setup.rake
68
69
  - generators/backup_files/templates/ssh.rake
69
70
  - generators/backup_files/templates/ssh.yml
70
71
  - lib/backup.rb
@@ -83,7 +84,7 @@ files:
83
84
  - lib/backup/transfer/s3.rb
84
85
  - lib/backup/transfer/ssh.rb
85
86
  has_rdoc: true
86
- homepage: http://github.com/meskyanichi/backup
87
+ homepage: ""
87
88
  licenses: []
88
89
 
89
90
  post_install_message: