mys3ql 0.0.5 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +8 -7
- data/lib/mys3ql/s3.rb +1 -1
- data/lib/mys3ql/shell.rb +1 -1
- data/lib/mys3ql/version.rb +1 -1
- metadata +3 -3
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# mys3ql = mysql + s3
|
2
2
|
|
3
|
-
Simple backup of your
|
3
|
+
Simple backup of your MySQL database onto Amazon S3.
|
4
4
|
|
5
5
|
|
6
6
|
## Quick start
|
@@ -19,8 +19,9 @@ To restore from the latest backup (plus binlogs if present):
|
|
19
19
|
|
20
20
|
$ mys3ql restore
|
21
21
|
|
22
|
-
By default mys3ql looks for a configuration file at
|
22
|
+
By default mys3ql looks for a configuration file at `~/.mys3ql`. You can override this like so:
|
23
23
|
|
24
|
+
$ mys3ql [command] -c FILE
|
24
25
|
$ mys3ql [command] --config=FILE
|
25
26
|
|
26
27
|
|
@@ -41,7 +42,7 @@ Second, create your config file:
|
|
41
42
|
# Path (with trailing slash) to mysql commands e.g. mysqldump
|
42
43
|
bin_path: /usr/local/mysql/bin/
|
43
44
|
# If you are using MySql binary logging:
|
44
|
-
# Path to the binary logs, should match the
|
45
|
+
# Path to the binary logs, should match the log_bin option in your my.cnf.
|
45
46
|
# Comment out if you are not using mysql binary logging
|
46
47
|
bin_log: /var/lib/mysql/binlog/mysql-bin
|
47
48
|
|
@@ -56,16 +57,16 @@ If you only have one database to back up on your server, you can put the config
|
|
56
57
|
|
57
58
|
## Binary logging
|
58
59
|
|
59
|
-
To use incremental backups you need to enable binary logging by making sure that the MySQL config file (my.cnf) has the following line in it:
|
60
|
+
To use incremental backups you need to enable binary logging by making sure that the MySQL config file (`/etc/my.cnf`) has the following line in it:
|
60
61
|
|
61
62
|
log_bin = /var/db/mysql/binlog/mysql-bin
|
62
63
|
|
63
|
-
The MySQL user needs to have the RELOAD and the SUPER privileges
|
64
|
+
The MySQL user needs to have the RELOAD and the SUPER privileges. These can be granted with the following SQL commands (which need to be executed as the MySQL root user):
|
64
65
|
|
65
66
|
GRANT RELOAD ON *.* TO 'user_name'@'%' IDENTIFIED BY 'password';
|
66
67
|
GRANT SUPER ON *.* TO 'user_name'@'%' IDENTIFIED BY 'password';
|
67
68
|
|
68
|
-
You may need to run mys3ql's incremental backup with special permissions (sudo)
|
69
|
+
You may need to run mys3ql's incremental backup with special permissions (sudo) depending on the ownership of the binlogs directory.
|
69
70
|
|
70
71
|
N.B. the binary logs contain updates to all the databases on the server. This means you can only switch on incremental backups for one database per server, because the logs will be purged each time a database is dumped.
|
71
72
|
|
@@ -79,7 +80,7 @@ Marc-André Cournoyer's [mysql_s3_backup](https://github.com/macournoyer/mysql_s
|
|
79
80
|
|
80
81
|
- tests ;)
|
81
82
|
- remove old dump files (s3)
|
82
|
-
- restore from non-latest dump
|
83
|
+
- (restore from non-latest dump)
|
83
84
|
|
84
85
|
|
85
86
|
## Questions, Problems, Feedback
|
data/lib/mys3ql/s3.rb
CHANGED
data/lib/mys3ql/shell.rb
CHANGED
@@ -5,7 +5,7 @@ module Mys3ql
|
|
5
5
|
def run(command)
|
6
6
|
log command
|
7
7
|
result = `#{command}`
|
8
|
-
log "==> #{result}"
|
8
|
+
log "==> #{result}" unless result.empty?
|
9
9
|
raise ShellCommandError, "error (exit status #{$?.exitstatus}): #{command} ==> #{result}: #{$?}" unless $?.success?
|
10
10
|
result
|
11
11
|
end
|
data/lib/mys3ql/version.rb
CHANGED
metadata
CHANGED