2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

mysqldumpはこうした方がいいね

Last updated at Posted at 2015-05-08
  1. オンラインでバックアップを取る必要がある場合はロック出来ないので以下で!

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```このオプションで出力を指定していると、エラーが起きた場合、ファイルが空で作成されるのでおすすめしない。

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?