server_backups 0.1.9 → 0.1.10
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/Gemfile.lock +1 -1
- data/README.md +12 -5
- data/lib/server_backups/config.rb +2 -2
- data/lib/server_backups/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a62c46884bdb69c28d8442f9c5711beb0ba7eb28
|
4
|
+
data.tar.gz: ac6530a6a782eb72fc2d94459fdfa02b954d4c0d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8d5714431ccf0bc891e452596b015d47aca3261959613e723773331cb2b128cd3cc9089ff4afbaf584298cb37e550bb7dd580ed6bffa775fa970d0a80d702928
|
7
|
+
data.tar.gz: 6775fb69dffdfd5dd598de741cee2abdad6d9fe8acbb5cc3f21d7c293f2eaa9386a10c705182d6bfb4bccdc498760356948513e54afee6ead69132b807828bbb
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -55,7 +55,7 @@ sudo usermod -a -G www-data ubuntu
|
|
55
55
|
sudo usermod -a -G mysql ubuntu
|
56
56
|
```
|
57
57
|
|
58
|
-
###
|
58
|
+
###
|
59
59
|
|
60
60
|
## Usage
|
61
61
|
|
@@ -63,9 +63,16 @@ sudo usermod -a -G mysql ubuntu
|
|
63
63
|
|
64
64
|
Copy `backup_conf.sample.yml` to `~/.backup_conf.yml` and edit the settings.
|
65
65
|
Alternatively you can put the file anywhere, and then specify the path to the file
|
66
|
-
using the `-c` parameter.
|
66
|
+
using the `-c` parameter, or even pipe a config file in through stdin.
|
67
67
|
|
68
|
-
|
68
|
+
The latter option is useful if you'd like to keep passwords and keys in variables,
|
69
|
+
rather than saving them to the filesystem.
|
70
|
+
|
71
|
+
```bash
|
72
|
+
envsubst < back_conf.yml.tmpl | server_backup daily
|
73
|
+
```
|
74
|
+
|
75
|
+
### Set up your crontab.
|
69
76
|
|
70
77
|
* Use `crontab -e` to edit cron configuration.
|
71
78
|
|
@@ -133,7 +140,7 @@ server_backup restore --up_to='two days ago at 3:00 PM'
|
|
133
140
|
# and updated a wordpress plugin. ;)
|
134
141
|
server_backup restore --up_to='March 28 12:00 PM' --time_zone='Singapore'
|
135
142
|
|
136
|
-
```
|
143
|
+
```
|
137
144
|
|
138
145
|
```
|
139
146
|
NAME
|
@@ -164,4 +171,4 @@ website_backup restore app_name
|
|
164
171
|
```
|
165
172
|
|
166
173
|
|
167
|
-
* Everything in /var/www
|
174
|
+
* Everything in /var/www
|
@@ -13,8 +13,8 @@ module ServerBackups
|
|
13
13
|
DEFAULT_LOGFILE_COUNT = 7
|
14
14
|
|
15
15
|
def initialize(config_file = nil)
|
16
|
-
if
|
17
|
-
@config_file =
|
16
|
+
if config_file == '-'
|
17
|
+
@config_file = config_file
|
18
18
|
@config = YAML::safe_load ARGF.read()
|
19
19
|
else
|
20
20
|
@config_file = config_file || default_config_file
|