ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: Pavel Isopenko <master@pauli.ru>
To: community@lists.altlinux.org
Subject: Re: [Comm] 2 разные версии PostgreSQL
Date: Thu, 6 Feb 2020 12:36:00 +0300
Message-ID: <863ce4db-3d5b-35b9-2eda-7ce6a57fd92f@pauli.ru> (raw)
In-Reply-To: <CAA8E9_vO1Swzi5j4yzep5b+Fqa3YhaOwDKE8_J9V2iYtyCqY2g@mail.gmail.com>

Добрый.

06.02.2020 10:55, Yuri Khachaturyan пишет:
> ср, 5 февр. 2020 г. в 22:35, <alexei@taf.ru <mailto:alexei@taf.ru>>:
> 
>     Для справки, pg_upgrade это просто хитрое применение комбинации pg_dump
>     и pg_restore из разных версий.
> 
> 
> То есть при использовании pg_upgrade я не выиграю по времени ничего в 
> сравнении с pg_dump и pg_restore?
> 

Когда у меня была похожая задача (прыжок с p7 на p8), то воспользовался 
парой pg_dump + pg_restore таким образом:

1. Ежедневно вечером по crond всё равно отрабатывает примерно такой скрипт

#!/bin/sh
dumpdir=/srv/1cbackup
function compress {
     pg_dump  -U postgres -Fc $base -f $dumpdir/$base;
     }
base=db1; compress;
#
base=db20; compress;
#

На работу пользователей с базами 1С pg_dump не влияет. Полученные копии 
потом отсасываются сервером бэкапов в архивное хранилище.

2. В одну из суббот аккуратно положил srv1cv83, дождался завершения 
бэкапа, скопировал свежие дампы на новый сервер и проделал им 
pg_restore. Старый сервер погасил, IP нового подменил. Собственно всё, 
зашедшие в понедельник пользователи ничего не заметили.

-- 
С уважением, Павел Исопенко
+79165329582
email: pauli@altlinux.org
XMPP: pavelri@jabber.credoaudit.ru


  parent reply	other threads:[~2020-02-06  9:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-05 16:15 ` Michael Shigorin
2020-02-05 19:35     ` alexei
2020-02-06  8:12         ` alexei
2020-02-06  9:36         ` Pavel Isopenko [this message]
2020-02-05 17:45 ` Anton V. Boyarshinov

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=863ce4db-3d5b-35b9-2eda-7ce6a57fd92f@pauli.ru \
    --to=master@pauli.ru \
    --cc=community@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 Community general discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/community/0 community/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 community community/ http://lore.altlinux.org/community \
		mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
	public-inbox-index community

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


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