public
Description: Backup with s3 and ruby
Homepage:
Clone URL: git://github.com/niky81/s3rbackup.git
Click here to lend your support to: s3rbackup and make a donation at www.pledgie.com !
niky81 (author)
Sun Nov 30 11:14:02 -0800 2008
commit  87ef5369158c446db96686f42e2de24bc3811167
tree    dd15f9d9c971ad24ff7ae4a9dd8b02837c4fc30e
parent  343095aa18ccb198b1d46254b37f43be02312851
s3rbackup / README
100644 68 lines (55 sloc) 2.263 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
- s3rbackup
It's a backup system based on amazon s3 backend.
 
- Features
* One command to backup a directory, one command to retrieve.
* Compressed file on S3, transparent compression/decompression on local system.
* Local database with metadata of every file, database can be also automatically
saved and retrived from S3.
* Query to database for file searching.
* Multiple database at one time
* Multiple compression type (see doc/stats.txt for speed results) selectable from config or command line
 
- Install
sudo gem install niky81-s3rbackup -s http://gems.github.com
 
- Configure
You need a file called ~/.s3rbackup/config.yml in your home directory
(see doc/config.*) with:
 
access_key_id: your_amazon_access_key
secret_access_key: your_secret_access_key
bucket: your_default_bucket (can be changed in command line)
sync_db: false (true if local db must be sync with remote S3 db)
bucket_db: your_database_bucket (if sync_db is true)
bucket_log: s3rbackup_nik_log (if you want to specify where to log)
log: true (if you want logging)
 
 
- How work
There are three file:
s3rbackup.rb script for backup
s3query.rb script for quering the database
s3dbsync.rb library
 
* s3rbackup.rb
To backup a directory:
s3rbackup.rb test_dir/
To backup a directory with a backup name and a description:
s3rbackup.rb -n "backup name" -d "backup description" test_dir/
You can add multiple directory to a single backup:
s3rbackup.rb -n "backup name" -d "backup description" test_dir/ test_dir1/ test_dir2/
 
* s3query.rb
To query your database and get backup files it's based on command:
s3query.rb [options] <search|get|unpack|delete> parameters
 
To search a word on database:
s3query.rb search test
To search file only by name on database:
s3query.rb search name=test
To search only file bigger than 1Mb on database:
s3query.rb search size>1000000
To search by date
s3query.rb search "datetime<2008/06/25_22:10"
to get all file that match name=test:
s3query.rb get name=test
to get and extract all file that match name=test
s3query.rb unpack name=test
to get and extract only the lastest version of all file that match name=test
s3query.rb unpack name=test --newer
In similar way you can use delete.
 
- Question
Ask to me sacchi.nicola@gmail.com.
 
- FAQ