s3backup 0.6.2 → 0.6.3

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -2,3 +2,7 @@
2
2
 
3
3
  * 1 major enhancement:
4
4
  * Initial release
5
+ === 0.6.3 2010-01-16
6
+ * mod Access Error if the bucket was not found
7
+ * mod bug if directory name has white space
8
+
data/README.rdoc CHANGED
@@ -12,21 +12,25 @@ It can be Cryptnize upload files if password and salt are configured.
12
12
 
13
13
  == SYNOPSIS:
14
14
 
15
- To use remotebackup,you should prepare backup configuretion by yaml such below.
16
- ------------------------------------------------------------
17
- bucket: "bucket name"
18
- directories:
19
- - "absolute path to directory for backup/restore"
20
- - "absolute path to directory for backup/restore"
21
- access_key_id: 'Amazon access_key_id'
22
- secret_access_key: 'Amazon secret_access_key'
23
- password: 'password for aes. (optional)'
24
- salt: 'HexString(16 length) (must when password is specified) '
25
- ------------------------------------------------------------
26
-
27
- command:
28
-
29
- for backup:
15
+ To use remotebackup,you should prepare backup configuretion file by yaml such below.
16
+ bucket: "bucket name"
17
+ directories:
18
+ - "absolute path to directory for backup/restore"
19
+ - "absolute path to directory for backup/restore"
20
+ access_key_id: 'Amazon access_key_id'
21
+ secret_access_key: 'Amazon secret_access_key'
22
+ password: 'password for aes. (optional)'
23
+ salt: 'HexString(16 length) (must when password is specified) '
24
+ proxy_host: proxy host address if you use proxy.
25
+ proxy_port: proxy port if you use proxy.
26
+ proxy_user: login name for proxy server if you use proxy.
27
+ proxy_password: login password for proxy server if you use proxy.
28
+ *If directories isn't specified when restore, it restores all directories in bucket.
29
+
30
+ == COMMAND:
31
+
32
+ === backup
33
+
30
34
  s3backup [-f configuration file] [-v verbose message] [-l path for log] [-h help]
31
35
 
32
36
  configuration file path to file written above contents. default is ./backup.yml
@@ -34,7 +38,8 @@ for backup:
34
38
  path for log defaut starndard output.
35
39
  help help message
36
40
 
37
- for restore:
41
+ === restore
42
+
38
43
  s3backup -r [-f configuration file] [-v verbose message] [-l path for log] [-o output dir] [-h help]
39
44
 
40
45
  configuration file path to file written above contents. default is ./backup.yml
@@ -3,6 +3,7 @@ require 'tempfile'
3
3
  require 'fileutils'
4
4
  require 's3backup/s3log'
5
5
  require 's3backup/tree_info'
6
+ require 's3backup/crypt'
6
7
  module S3backup
7
8
  class Manager
8
9
  DEFAULT_BUF_READ_SIZE=1024*1024*128
@@ -38,8 +39,8 @@ module S3backup
38
39
  sub_dir.push(file) if File.directory?(dir+"/"+file)
39
40
  end
40
41
  exclude = ""
41
- exclude = exclude + " --exclude=" + sub_dir.join(" --exclude=") if sub_dir.length != 0
42
- cmd = "(cd #{File.dirname(dir)};tar -czvf #{path} #{exclude} #{File.basename(dir)} > /dev/null 2>&1)"
42
+ exclude = exclude + " --exclude=" + sub_dir.map{|d| d.gsub(' ','\ ')}.join(" --exclude=") if sub_dir.length != 0
43
+ cmd = "(cd #{File.dirname(dir).gsub(' ','\ ')};tar -czvf #{path.gsub(' ','\ ')} #{exclude} #{File.basename(dir).gsub(' ','\ ')} > /dev/null 2>&1)"
43
44
  S3log.debug(cmd)
44
45
  system(cmd)
45
46
  unless $?.success?
@@ -47,7 +48,7 @@ module S3backup
47
48
  end
48
49
  end
49
50
  def from_tgz(path,dir)
50
- cmd = "tar -xzvf #{path} -C #{dir} > /dev/null 2>&1"
51
+ cmd = "tar -xzvf #{path.gsub(' ','\ ')} -C #{dir.gsub(' ','\ ')} > /dev/null 2>&1"
51
52
  S3log.debug(cmd)
52
53
  system(cmd)
53
54
  unless $?.success?
@@ -1,6 +1,5 @@
1
1
  require 'cgi'
2
2
  require 'aws/s3'
3
- require 's3backup/crypt'
4
3
  module S3backup
5
4
  class S3Wrapper
6
5
  attr_reader :bucket
@@ -22,7 +21,7 @@ module S3backup
22
21
  if create_flg
23
22
  begin
24
23
  @bucket = AWS::S3::Bucket.find(@bucket_name)
25
- rescue AWS::S3::NoSuchBucket
24
+ rescue
26
25
  @bucket = create_bucket
27
26
  end
28
27
  else
data/lib/s3backup.rb CHANGED
@@ -2,5 +2,5 @@ $:.unshift(File.dirname(__FILE__)) unless
2
2
  $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
3
3
 
4
4
  module S3backup
5
- VERSION = '0.6.2'
5
+ VERSION = '0.6.3'
6
6
  end
data/script/console CHANGED
File without changes
data/script/destroy CHANGED
File without changes
data/script/generate CHANGED
File without changes
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: s3backup
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
4
+ version: 0.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takeshi Morita
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-10-25 00:00:00 +09:00
12
+ date: 2010-01-15 00:00:00 +09:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -93,7 +93,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
93
93
  requirements: []
94
94
 
95
95
  rubyforge_project: s3backup
96
- rubygems_version: 1.3.4
96
+ rubygems_version: 1.3.5
97
97
  signing_key:
98
98
  specification_version: 3
99
99
  summary: S3Backup is a backup tool to local directory to Amazon S3.