s3snapshot 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -0,0 +1,4 @@
1
+ A simple backup utility to create time based snapshots similar to time machine on s3.
2
+ All options are command line based so they can easily be scripted with cron.
3
+ Supports multiple daily backups, as well as rolling daily and weekly.
4
+ For daily, it keeps the newest complete backup for the day, for weekly it keeps the last day in the week.
@@ -28,7 +28,14 @@ module S3snapshot
28
28
  files = get_local_files
29
29
 
30
30
  files.each do |file|
31
- path = "#{prefix_path}/#{file[@local_dir.length..-1]}"
31
+ file_name = file[@local_dir.length..-1];
32
+
33
+ #Strip the leading "/" from file paths
34
+ if file_name.length > 0 && file_name[0] == '/'
35
+ file_name = file[1..-1]
36
+ end
37
+
38
+ path = "#{prefix_path}/#{file_name}"
32
39
 
33
40
  puts "uploading '#{file}' to '#{@bucket_name}/#{path}'"
34
41
 
@@ -1,3 +1,3 @@
1
1
  module S3snapshot
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: s3snapshot
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 17
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 6
10
- version: 0.0.6
9
+ - 7
10
+ version: 0.0.7
11
11
  platform: ruby
12
12
  authors:
13
13
  - Todd
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-09-26 00:00:00 Z
18
+ date: 2011-09-28 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: fog