Revision 13259
Added by Aaron Marcuse-Kubitza over 10 years ago
db.sh | ||
---|---|---|
251 | 251 |
|
252 | 252 |
mysql_snapshot() # usage: [live=] [from=...] [to=...] mysql_snapshot |
253 | 253 |
{ |
254 |
echo_func; kw_params from to; local_export live="${live-1}" |
|
255 |
local from="${from:-/var/lib/mysql}"; local to="${to:-$from.bak}" |
|
256 |
sudo mkdir "$to" |
|
257 |
|
|
258 |
mysql_ctl stop |
|
259 |
prep_try; local_dir="$from" remote_url="$to" inplace=1 "try" sudo upload |
|
260 |
# inplace: for large files, don't re-copy entire file |
|
261 |
mysql_ctl start |
|
262 |
rethrow |
|
254 |
echo_func; kw_params from to; local from="${from:-/var/lib/mysql}" |
|
255 |
ctl=mysql_ctl db_snapshot |
|
263 | 256 |
} |
264 | 257 |
|
265 | 258 |
|
Also available in: Unified diff
lib/sh/db.sh: mysql_snapshot(): use new db_snapshot()