-
オンラインでバックアップを取る必要がある場合はロック出来ないので以下で!
DB=fuga MYSQL_PWD=password mysqldump -h example.jp -u hoge --force --single-transaction --quote-names --default-character-set=binary --compress --add-drop-database --add-drop-table --databases $DB --log-error=$DB.log | gzip > $DB.gz
- dump取得後にgzip圧縮もしてる
-
--result-file=file_name, -r file_name
このオプションで出力を指定していると、エラーが起きた場合、ファイルが空で作成されるのでおすすめしない。
More than 5 years have passed since last update.
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme
List of users who liked
22