ALT Linux sysadmins discussion
 help / color / mirror / Atom feed
From: "Nikolay A. Fetisov" <naf@naf.net.ru>
To: sysadmins@lists.altlinux.org
Subject: Re: [Sysadmins] правильный бекап mysql
Date: Tue, 12 Feb 2013 19:34:13 +0400
Message-ID: <1360683253.21063.11.camel@v3405.naf.net.ru> (raw)
In-Reply-To: <5117B674.8080304@altlinux.ru>

В Вс, 10/02/2013 в 19:02 +0400, Anton Gorlov пишет:
> all -а подскажите как правильно бекапить базы mysql..
> Вернее не совсем понятно как правильно бекапить хранимки/вьюшки.
> В дампе почему-то при использовании ключа -R вьюшка как минимум 
> получается заккоментирована

Хранимые процедуры в MySQL, во всяком случаев в 5.1,
- хранятся в базе mysql, таблица proc - для всех баз;
- и по-умолчанию (без ключа --routines) mysqldump их не сохраняет.

Вытащить только хранимые процедуры для базы $DB можно чем-то вида
/usr/bin/mysqldump --routines --no-create-info --skip-triggers \
                   --no-data  --no-create-db  $DB

По представлениям - каких-либо вопросов не возникало, mysqldump
по-умолчанию  их выводит вместе со всем остальным, восстанавливаются
они тоже как обычно.

-- 
С уважением,
Николай Фетисов



      parent reply	other threads:[~2013-02-12 15:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-10 15:02 Anton Gorlov
2013-02-12 12:39 ` Yuriy Kashirin
2013-02-12 15:34 ` Nikolay A. Fetisov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1360683253.21063.11.camel@v3405.naf.net.ru \
    --to=naf@naf.net.ru \
    --cc=sysadmins@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux sysadmins discussion

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/sysadmins/0 sysadmins/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 sysadmins sysadmins/ http://lore.altlinux.org/sysadmins \
		sysadmins@lists.altlinux.org sysadmins@lists.altlinux.ru sysadmins@lists.altlinux.com
	public-inbox-index sysadmins

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.sysadmins


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git