backup_aws_s3 0.0.1 → 0.0.2
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.
- checksums.yaml +4 -4
- data/README.md +22 -23
- data/bin/backup_aws_s3 +5 -0
- data/lib/backup_aws_s3/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ebdc5b00abdba6e3f576489e8e5283e9ab7e3e7d
|
4
|
+
data.tar.gz: 212de3ae9f611cd6be427cb315653be02c843a7b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee28a5d71a93ab8caa6100bd5f88b3d775494bb3b0af5fa2e6a17504084a9061bbfc8782f49ee80dacf41ce74647c7560cdff356fc26416e970d64985bb8f60c
|
7
|
+
data.tar.gz: b62160e1899ae7820dd976dee1e45cb9a55e1005caacf57e9c22598f6bf052228dd0d5817bfe25b9e48c6e38012dd3aa94c2c5afe47908181b8e118370fbeb2e
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# BackupAwsS3
|
2
2
|
|
3
|
-
|
3
|
+
Backup s3 folders to another s3
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -20,42 +20,41 @@ Or install it yourself as:
|
|
20
20
|
|
21
21
|
## Pre-Requisites Installss
|
22
22
|
|
23
|
-
|
23
|
+
### Install s3s3mirror
|
24
24
|
|
25
25
|
In your terminal
|
26
26
|
|
27
|
-
$ cd ~
|
28
|
-
$ git clone git@github.com:cobbzilla/s3s3mirror.git
|
29
|
-
|
30
|
-
$ sudo apt-get install s3cmd
|
27
|
+
$ cd ~
|
28
|
+
$ git clone git@github.com:cobbzilla/s3s3mirror.git
|
29
|
+
$ sudo apt-get install s3cmd
|
31
30
|
|
32
31
|
Insert you aws keys
|
33
|
-
|
32
|
+
|
33
|
+
$ s3cmd --configure
|
34
34
|
|
35
35
|
|
36
|
-
$ sudo touch /var/log/s3s3mirror.log
|
37
|
-
$ sudo chmod 777 /var/log/s3s3mirror.log
|
36
|
+
$ sudo touch /var/log/s3s3mirror.log
|
37
|
+
$ sudo chmod 777 /var/log/s3s3mirror.log
|
38
38
|
|
39
|
-
## Create Enviroment Variables
|
39
|
+
## Create Enviroment Variables in /etc/enviroments
|
40
40
|
|
41
|
-
export S3_BUCKET_BACKUP="xxxxxxxxxxx"
|
42
|
-
export S3_ACCESS_KEY_ID="xxxxxxxxxxx"
|
43
|
-
export S3_SECRET_KEY_ID="xxxxxxxxxxx"
|
44
|
-
S3S3MIRROR_PATH='/home/USERNAME/s3s3mirror'
|
41
|
+
export S3_BUCKET_BACKUP="xxxxxxxxxxx"
|
42
|
+
export S3_ACCESS_KEY_ID="xxxxxxxxxxx"
|
43
|
+
export S3_SECRET_KEY_ID="xxxxxxxxxxx"
|
44
|
+
export S3S3MIRROR_PATH='/home/USERNAME/s3s3mirror'
|
45
45
|
|
46
|
-
|
46
|
+
## Usage
|
47
47
|
|
48
|
-
$ ruby backup_uploads.rb identification_name source dest keep
|
48
|
+
$ ruby backup_uploads.rb identification_name source dest keep
|
49
|
+
|
50
|
+
source and dest are: bucket_name/folder/subfolder...
|
49
51
|
|
50
|
-
Example
|
51
|
-
# erp
|
52
|
-
$ ruby backup_uploads.rb "erp_ultimos_30_dias" "scproduction/" "${S3_BUCKET_BACKUP}/upload_files/erp/$(date +%Y.%m.%d.%H.%M.%S)/" 30
|
53
|
-
$ ruby backup_uploads.rb "erp_20_em_20_minutos" "scproduction/" "${S3_BUCKET_BACKUP}/upload_files/erp/$(date +%Y.%m.%d.%H.%M.%S)/" 216
|
54
|
-
# redmine
|
55
|
-
$ ruby backup_uploads.rb "redmine_ultimos_30_dias" "redmineseucondominioproduction/" "${S3_BUCKET_BACKUP}/upload_files/redmine/$(date +%Y.%m.%d.%H.%M.%S)/" 30
|
56
|
-
$ ruby backup_uploads.rb "redmine_20_em_20_minutos" "redmineseucondominioproduction/" "${S3_BUCKET_BACKUP}/upload_files/redmine/$(date +%Y.%m.%d.%H.%M.%S)/" 316
|
52
|
+
### Example
|
57
53
|
|
54
|
+
$ ruby backup_uploads.rb "app1_last_30_days" "scproduction/" "${S3_BUCKET_BACKUP}/upload_files/app1/$(date +%Y.%m.%d.%H.%M.%S)/" 30
|
55
|
+
$ ruby backup_uploads.rb "app1_20_in_20_minuts" "scproduction/" "${S3_BUCKET_BACKUP}/upload_files/erp/$(date +%Y.%m.%d.%H.%M.%S)/" 216
|
58
56
|
|
57
|
+
## Feel free to put commands above in crontab
|
59
58
|
|
60
59
|
## Contributing
|
61
60
|
|
data/bin/backup_aws_s3
ADDED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: backup_aws_s3
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rodrigo Mendonca
|
@@ -55,7 +55,8 @@ dependencies:
|
|
55
55
|
description: Backup folders storaged in aws s3.
|
56
56
|
email:
|
57
57
|
- denoww@gmail.com
|
58
|
-
executables:
|
58
|
+
executables:
|
59
|
+
- backup_aws_s3
|
59
60
|
extensions: []
|
60
61
|
extra_rdoc_files: []
|
61
62
|
files:
|
@@ -65,6 +66,7 @@ files:
|
|
65
66
|
- README.md
|
66
67
|
- Rakefile
|
67
68
|
- backup_aws_s3.gemspec
|
69
|
+
- bin/backup_aws_s3
|
68
70
|
- lib/backup_aws_s3.rb
|
69
71
|
- lib/backup_aws_s3/version.rb
|
70
72
|
homepage: ''
|