niky81-s3rbackup 0.2.3 → 0.2.4
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/README +14 -6
- data/lib/s3dbsync.rb +1 -1
- metadata +1 -1
data/README
CHANGED
|
@@ -2,17 +2,19 @@
|
|
|
2
2
|
It's a backup system based on amazon s3 backend.
|
|
3
3
|
|
|
4
4
|
- Features
|
|
5
|
-
One command to backup a directory, one command to retrieve.
|
|
6
|
-
Compressed file on S3, transparent compression/decompression on local system.
|
|
7
|
-
Local database with metadata of every file, database can be also automatically
|
|
8
|
-
saved
|
|
9
|
-
Query to database for file searching.
|
|
5
|
+
* One command to backup a directory, one command to retrieve.
|
|
6
|
+
* Compressed file on S3, transparent compression/decompression on local system.
|
|
7
|
+
* Local database with metadata of every file, database can be also automatically
|
|
8
|
+
saved and retrived from S3.
|
|
9
|
+
* Query to database for file searching.
|
|
10
|
+
* Multiple database at one time
|
|
10
11
|
|
|
11
12
|
- Install
|
|
12
13
|
sudo gem install niky81-s3rbackup -s http://gems.github.com
|
|
13
14
|
|
|
14
15
|
- Configure
|
|
15
|
-
You need a file called ~/.s3rbackup/config.yml in your home directory
|
|
16
|
+
You need a file called ~/.s3rbackup/config.yml in your home directory
|
|
17
|
+
(see doc/config.*) with:
|
|
16
18
|
|
|
17
19
|
access_key_id: your_amazon_access_key
|
|
18
20
|
secret_access_key: your_secret_access_key
|
|
@@ -54,3 +56,9 @@ to get and extract all file that match name=test
|
|
|
54
56
|
to get and extract only the lastest version of all file that match name=test
|
|
55
57
|
s3query.rb unpack name=test --newer
|
|
56
58
|
In similar way you can use delete.
|
|
59
|
+
|
|
60
|
+
- Question
|
|
61
|
+
Ask to me sacchi.nicola@gmail.com.
|
|
62
|
+
|
|
63
|
+
- FAQ
|
|
64
|
+
|
data/lib/s3dbsync.rb
CHANGED
|
@@ -20,6 +20,7 @@ class S3SyncDb
|
|
|
20
20
|
#download db
|
|
21
21
|
begin
|
|
22
22
|
buck_db = Bucket.find(config["bucket_db"])
|
|
23
|
+
db_file = S3Object.find('s3rbackup_yaml_db', config["bucket_db"])
|
|
23
24
|
rescue
|
|
24
25
|
#devo crearlo
|
|
25
26
|
if config["sync_db"]
|
|
@@ -30,7 +31,6 @@ class S3SyncDb
|
|
|
30
31
|
return
|
|
31
32
|
end
|
|
32
33
|
#lo copio in locale
|
|
33
|
-
db_file = S3Object.find('s3rbackup_yaml_db', config["bucket_db"])
|
|
34
34
|
open(@db_file, 'w') do |file|
|
|
35
35
|
S3Object.stream('s3rbackup_yaml_db', config["bucket_db"]) do |chunk|
|
|
36
36
|
file.write chunk
|