jmstacey-cfbackup 0.7.0 → 0.7.1

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.
data/.gitignore ADDED
@@ -0,0 +1,6 @@
1
+ pkg
2
+ rdoc
3
+ tmp
4
+ test/tmp
5
+ test/tmp/data
6
+ .DS_Store
data/CHANGELOG.markdown CHANGED
@@ -1,6 +1,15 @@
1
1
  CFBackup ChangeLog
2
2
  ==================
3
3
 
4
+ 0.7.1 2009-05-19
5
+ -----------------
6
+ * Version bump and re-release of 0.6.1 because the published gem by GitHub was marked as 0.7.0.
7
+
8
+ 0.6.1 2009-05-19
9
+ -----------------
10
+ * Use official Rackspace CloudFiles API from GitHub
11
+ * Corrected case issue on case-sensitive filesystems
12
+
4
13
  0.6.0 2009-05-03
5
14
  -----------------
6
15
  * Added example_scripts to RDoc.
data/README.markdown CHANGED
@@ -6,7 +6,9 @@ CFBackup is a small ruby program that transfers files or directories from the lo
6
6
  Features
7
7
  -----------
8
8
 
9
- * Backup a single file or directory (recursion uses pseudo directories)
9
+ * Push (backup) a single file or directory (uses pseudo directories)
10
+ * Pull (restore) a single file or directory
11
+ * Delete (rotate) remote objects
10
12
  * Pipe data straight to container
11
13
  * Free transfers over local Rackspace network for Slicehost/Cloud Server
12
14
  customers in DFW1 datacenter
@@ -30,7 +32,8 @@ Install
30
32
  Configuration
31
33
  -----------
32
34
 
33
- CFBackup will look in the following places (in order) for the configuration file named cfconfig.yml
35
+ A sample configuration file named cfconfig.yml should have be placed in /etc if installed as a gem.
36
+ CFBackup will look in the following places (in order) for the configuration file named cfconfig.yml:
34
37
 
35
38
  * Hidden in home directory (~/.cfbackup.yml)
36
39
  * Non-hidden in present working directory (./cfbackup.yml)
data/Rakefile CHANGED
@@ -1,17 +1,22 @@
1
- require 'rubygems'
2
1
  require 'rake'
3
2
 
3
+ $LOAD_PATH.unshift('lib')
4
+
4
5
  begin
5
6
  require 'jeweler'
6
7
  Jeweler::Tasks.new do |gem|
7
8
  gem.name = "cfbackup"
8
- gem.summary = %Q{TODO}
9
+ gem.summary = "A simple ruby program intended to serve as a useful tool for automated backups to Mosso Cloud Files."
10
+ gem.description = "A simple ruby program intended to serve as a useful tool for automated backups to Mosso Cloud Files."
9
11
  gem.email = "jon@jonsview.com"
10
12
  gem.homepage = "http://github.com/jmstacey/cfbackup"
11
13
  gem.authors = ["Jon Stacey"]
12
14
 
13
15
  # Dependencies
14
- gem.add_dependency('jmstacey-ruby-cloudfiles', '>=1.3.3')
16
+ gem.add_dependency('rackspace-cloudfiles', '>=1.3.0.3')
17
+
18
+ # Include Files
19
+ gem.files.include %w(lib/optcfbackup.rb)
15
20
 
16
21
  # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
17
22
  end
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :major: 0
3
- :minor: 6
4
- :patch: 0
3
+ :minor: 7
4
+ :patch: 1
data/cfbackup.gemspec ADDED
@@ -0,0 +1,66 @@
1
+ Gem::Specification.new do |s|
2
+ s.name = %q{cfbackup}
3
+ s.version = "0.7.1"
4
+
5
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
6
+ s.authors = ["Jon Stacey"]
7
+ s.date = %q{2009-05-19}
8
+ s.default_executable = %q{cfbackup}
9
+ s.description = %q{A simple ruby program intended to serve as a useful tool for automated backups to Mosso Cloud Files.}
10
+ s.email = %q{jon@jonsview.com}
11
+ s.executables = ["cfbackup"]
12
+ s.extra_rdoc_files = [
13
+ "LICENSE",
14
+ "README.markdown"
15
+ ]
16
+ s.files = [
17
+ ".gitignore",
18
+ "CHANGELOG.markdown",
19
+ "LICENSE",
20
+ "README.markdown",
21
+ "Rakefile",
22
+ "VERSION.yml",
23
+ "bin/cfbackup",
24
+ "cfbackup.gemspec",
25
+ "cfconfig.yml",
26
+ "conf/cfconfig.yml",
27
+ "example_scripts/piped.sh",
28
+ "example_scripts/temp_directory.sh",
29
+ "lib/cfbackup.rb",
30
+ "lib/optcfbackup.rb",
31
+ "lib/optcfbackup.rb",
32
+ "temp/README",
33
+ "test/cfbackup_test.rb",
34
+ "test/cfconfig.yml",
35
+ "test/data/data.txt",
36
+ "test/data/folder_1/file1.txt",
37
+ "test/data/folder_1/file2.txt",
38
+ "test/data/folder_1/folder_3/file1.txt",
39
+ "test/data/folder_2/file1.txt",
40
+ "test/data/folder_2/file2.txt",
41
+ "test/test_helper.rb"
42
+ ]
43
+ s.has_rdoc = true
44
+ s.homepage = %q{http://github.com/jmstacey/cfbackup}
45
+ s.rdoc_options = ["--charset=UTF-8"]
46
+ s.require_paths = ["lib"]
47
+ s.rubygems_version = %q{1.2.0}
48
+ s.summary = %q{A simple ruby program intended to serve as a useful tool for automated backups to Mosso Cloud Files.}
49
+ s.test_files = [
50
+ "test/cfbackup_test.rb",
51
+ "test/test_helper.rb"
52
+ ]
53
+
54
+ if s.respond_to? :specification_version then
55
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
56
+ s.specification_version = 2
57
+
58
+ if current_version >= 3 then
59
+ s.add_runtime_dependency(%q<rackspace-cloudfiles>, [">= 1.3.0.3"])
60
+ else
61
+ s.add_dependency(%q<rackspace-cloudfiles>, [">= 1.3.0.3"])
62
+ end
63
+ else
64
+ s.add_dependency(%q<rackspace-cloudfiles>, [">= 1.3.0.3"])
65
+ end
66
+ end
data/cfconfig.yml ADDED
@@ -0,0 +1,2 @@
1
+ username: xxxxxxxxxxxxx
2
+ api_key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
data/conf/cfconfig.yml ADDED
@@ -0,0 +1,2 @@
1
+ username: xxxxxxxxxxxxx
2
+ api_key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
@@ -0,0 +1,17 @@
1
+ #!/bin/sh
2
+
3
+ # In this example, data is piped directly from the backup to a Cloud Files
4
+ # container, bypassing the intermediate temp directory step
5
+ #
6
+ # This is an example script that you could use in combination with CFBackup.
7
+ # Modify it to suit your needs. Rename to file without an extension if you
8
+ # are going to place in /etc/cron.daily.
9
+
10
+ CONTAINER=backups
11
+ NOW=$(date +_%b_%d_%y)
12
+
13
+ # Backup all MySQL databases
14
+ mysqldump -u root -pPASSWORD --all-databases --flush-logs --lock-all-tables | gzip -9 | cfbackup --action push --pipe_data --container $CONTAINER:mysql_all_backup$NOW.sql.gz
15
+
16
+ # Create main backup archive
17
+ tar -cvf - /home/user /etc /usr/local/nginx | gzip -9 | cfbackup --action push --pipe_data --container $CONTAINER:main_backup$NOW.tar.gz
@@ -0,0 +1,24 @@
1
+ #!/bin/sh
2
+
3
+ # In this example, backups are first created and placed in a temporary
4
+ # holding directory. Then, the entire directory is uploaded to
5
+ # Cloud Files. Finally, the temp directory is cleared in preparation
6
+ # for the next backup.
7
+ #
8
+ # This is an example script that you could use in combination with CFBackup.
9
+ # Modify it to suit your needs. Rename to file without an extension if you
10
+ # are going to place in /etc/cron.daily.
11
+
12
+ cd ~/cfbackup/temp
13
+ CONTAINER=backups
14
+ NOW=$(date +_%b_%d_%y)
15
+
16
+ # Dump all MySQL databases
17
+ mysqldump -u root -pPASSWORD --all-databases --flush-logs --lock-all-tables | gzip -9 > mysql_all_backup$NOW.sql.gz
18
+
19
+ # Create main backup archive
20
+ tar -czvf main_backup$NOW.tar.gz /home/user /etc /usr/local/nginx
21
+
22
+ cd ~/cfbackup
23
+ cfbackup --action push --local_path temp/ --container $CONTAINER
24
+ rm -f temp/*
data/lib/cfbackup.rb CHANGED
@@ -106,7 +106,7 @@ class CFBackup
106
106
 
107
107
  puts "Warning: 5GB maximum filesize"
108
108
  object = @container.create_object(@opts.options.remote_path, true)
109
- object.write("STDIN")
109
+ object.write
110
110
  end # push_piped_data()
111
111
 
112
112
  def push_files
File without changes
data/temp/README ADDED
@@ -0,0 +1,5 @@
1
+ You could use this as a temporary holding directory
2
+ in combination with the temp_directory.sh script
3
+ example in the example_scripts directory.
4
+
5
+ This file exists so that git doesn't delete this directory.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jmstacey-cfbackup
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jon Stacey
@@ -9,20 +9,20 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-05-03 00:00:00 -07:00
12
+ date: 2009-05-19 00:00:00 -07:00
13
13
  default_executable: cfbackup
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
- name: jmstacey-ruby-cloudfiles
16
+ name: rackspace-cloudfiles
17
17
  type: :runtime
18
18
  version_requirement:
19
19
  version_requirements: !ruby/object:Gem::Requirement
20
20
  requirements:
21
21
  - - ">="
22
22
  - !ruby/object:Gem::Version
23
- version: 1.3.3
23
+ version: 1.3.0.3
24
24
  version:
25
- description:
25
+ description: A simple ruby program intended to serve as a useful tool for automated backups to Mosso Cloud Files.
26
26
  email: jon@jonsview.com
27
27
  executables:
28
28
  - cfbackup
@@ -32,14 +32,21 @@ extra_rdoc_files:
32
32
  - LICENSE
33
33
  - README.markdown
34
34
  files:
35
+ - .gitignore
35
36
  - CHANGELOG.markdown
36
37
  - LICENSE
37
38
  - README.markdown
38
39
  - Rakefile
39
40
  - VERSION.yml
40
41
  - bin/cfbackup
41
- - lib/OptCFBackup.rb
42
+ - cfbackup.gemspec
43
+ - cfconfig.yml
44
+ - conf/cfconfig.yml
45
+ - example_scripts/piped.sh
46
+ - example_scripts/temp_directory.sh
42
47
  - lib/cfbackup.rb
48
+ - lib/optcfbackup.rb
49
+ - temp/README
43
50
  - test/cfbackup_test.rb
44
51
  - test/cfconfig.yml
45
52
  - test/data/data.txt
@@ -74,7 +81,7 @@ rubyforge_project:
74
81
  rubygems_version: 1.2.0
75
82
  signing_key:
76
83
  specification_version: 2
77
- summary: TODO
84
+ summary: A simple ruby program intended to serve as a useful tool for automated backups to Mosso Cloud Files.
78
85
  test_files:
79
86
  - test/cfbackup_test.rb
80
87
  - test/test_helper.rb