Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mAvkC-0007OO-7L for pgsql-admin@arkaria.postgresql.org; Tue, 03 Aug 2021 14:50:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mAvkA-0004s0-84 for pgsql-admin@arkaria.postgresql.org; Tue, 03 Aug 2021 14:50:10 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mAvk9-0004rs-Sk for pgsql-admin@lists.postgresql.org; Tue, 03 Aug 2021 14:50:09 +0000 Received: from mail-oi1-x235.google.com ([2607:f8b0:4864:20::235]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mAvk6-0003xK-Sa for pgsql-admin@lists.postgresql.org; Tue, 03 Aug 2021 14:50:09 +0000 Received: by mail-oi1-x235.google.com with SMTP id 21so28420099oin.8 for ; Tue, 03 Aug 2021 07:50:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=H5SqIGbgH9bEkIbMpY0Ing3Qrk2AzpeqWOUWeo8vuT4=; b=vHtAMWV+GDM9lOgUbyINjBZhc+Jqrne7Nxy4u3NP3wFJicKkmxeL95s7xJlq0lJEaG W/h7jtehSErH42Ne8CAh3xJGTdvNv+4KSmzwHfRQXumIWrhJs+ksJHSzhuZKR3F1zYOH nlqc2NVM3EqiAd92WvZglohW/rbnN97nQh1maW93ZWjUcsOCP6ONbjCUtk+2JPyRDkrv COl6H6FZzPbHFL3m+Qc9Cj+jUJJGP4cZStCWXPOwHiLWHeebi6dJCsQpIs5iilCzUlce JDJr66f9CEqd97XrmiG6B99JuQqdQs461iFbXU0LShQBAUe+TtZ21ICms6Y5MUg9mOii 3UVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=H5SqIGbgH9bEkIbMpY0Ing3Qrk2AzpeqWOUWeo8vuT4=; b=kCD463aqHQucppztGLtWWHgL0PDlrOkTUJyTLmflNArH0UL97SpafcP7cM+xOumaW/ g6pMRgMhfjjrUzyEgQBv0USDysrFi6hplJCvz+argd01fYli6UJ+rNaY4Z35Twbeq74k TR2xfGfPZxoUKsXDt61BUZmgewrflRSsutNXM02gyqne30NZwD7sjVrcJLCDE1knPvQh heqxB8BZGzX4LJWou13sUveun/BuXx+qfs053u+vG9JDpJk2gVOBjvxvzy0G+r7rmRgp 5NxkVw1rTZ1DrIwcWOViw/T3zO0sPATf3n9TJChmxm/a2rxIHOp8S0H7OEdYNFZINbGR q+eQ== X-Gm-Message-State: AOAM533NLN/2TsSK7Xzb8bnoNVkenQ9KMKNdsawXrbhLwH2fvubzbInM 5pkshMBvKsJWHeGnta5uoVPJJoVlTfhFfg== X-Google-Smtp-Source: ABdhPJxSYg+GukCpnHhobSTr79EZ3UwT/bgbh/EGMfmGI+sDqpr33TnqLtjfd78+AdVkUfr35FD+dA== X-Received: by 2002:a05:6808:188a:: with SMTP id bi10mr15111354oib.73.1628002204375; Tue, 03 Aug 2021 07:50:04 -0700 (PDT) Received: from [192.168.88.10] (ip174-67-141-204.no.no.cox.net. [174.67.141.204]) by smtp.googlemail.com with ESMTPSA id bc42sm2218507oob.39.2021.08.03.07.50.03 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 03 Aug 2021 07:50:03 -0700 (PDT) Subject: Re: Migration struggles To: pgsql-admin@lists.postgresql.org References: From: Ron Message-ID: Date: Tue, 3 Aug 2021 09:50:03 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 8/3/21 9:31 AM, Christian Lehmann wrote: > Hi all > i am currently building a ansible-managed pg13-cluster. Ansible not > only configures postgres pgbouncer etc but also creates roles and > manages pg_hba. > > Now I am planning and documenting the upcoming migration. Do you have > a good idea, how i could proceed without a lot of sed'ing or similar > hacky things? > > - if i use pg_dumpall, i have the "create role"-statements which will fail > - if i use pg_dump i have to backup all db's one by one In bash, I'd use psql to generate a list of user databases, and then loop through that list. > - pg_dumpall -a only gives me the data, -s is only the schema. This > might be the most promising approach, backing up schema, then data and > importing it on the new server. But still it would be more convenient > to just run one command. > > Any other ideas I have not found out yet? And any other comments what > could possibly go wrong? > > thanks a lot > chris > -- Angular momentum makes the world go 'round.