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 1q95MA-00030u-4c for pgsql-general@arkaria.postgresql.org; Tue, 13 Jun 2023 14:50:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1q95M8-0002qD-LC for pgsql-general@arkaria.postgresql.org; Tue, 13 Jun 2023 14:50:48 +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 1q95M8-0002q4-Am for pgsql-general@lists.postgresql.org; Tue, 13 Jun 2023 14:50:48 +0000 Received: from mail-yw1-x112e.google.com ([2607:f8b0:4864:20::112e]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1q95M3-0029OR-UL for pgsql-general@lists.postgresql.org; Tue, 13 Jun 2023 14:50:47 +0000 Received: by mail-yw1-x112e.google.com with SMTP id 00721157ae682-56d304e5f83so23809237b3.2 for ; Tue, 13 Jun 2023 07:50:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686667842; x=1689259842; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=cUvvnUXPdXSlTY23YGX+5CzYRmrXKI9ygSx13Zt0mSg=; b=kBzll5oLixzxHlTCQmqQxLI/RCvIA4kCTFiwB4V0RQOVdnnIMgYNXj6bWEkWvpGNY9 qjpfdHaWw9Zpls3n4Ug0ENfUCbRgKCfWeYIzK6DiqXzo23bYE1uyAOaynTA074WknCqj K7483T7dpOaQ+HKKn65kw1956kSWQ2QWKGLgt/nBkwNPuceAVuFSqyMIrIreVsC99Iya 158UcCMnDnthp4WcU9Wwb7itoB9Xu5yDz3Cj/UJYIKeVjwVbc6dd5iWTAvLMZeVkHiX7 aHGQWeJXSicKtJToMUmJysta9V9hfGG//9IKVz9g2k1XadjUFljmn66z/35183fdqzbq Bj8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686667842; x=1689259842; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=cUvvnUXPdXSlTY23YGX+5CzYRmrXKI9ygSx13Zt0mSg=; b=Dc+1LkBBbanCMWTizArjRV92KxvB3rlMhIHsgOKtqAc/Co2UsXR/iqC9dH8S9Z6Gal oR+Z2LuSVl0LV+Qf+V61ZbzHL8MRMQfy5qNFyfIopC1n5NWujGhqDEqzNum3aOpOZ7DT DlZHiYZety+/9h5DhNHZS31MHX5YuU/9JCjNSgYMZF2cxfZXst5SIPBKgN/NiJtkDJal DrJAGowq//bh8VRCILd9PYOoEjVTbFXwO9BRcEWNKnq2YM0uaPoK4+FRcx0o4JhxOyl4 yCqW0fDNX/U9vlFTntbW41lVQ+mnY7+hQhz7Pa/FXkH++AmNkhUDLCzuF0oSr8Frrh9e PeEw== X-Gm-Message-State: AC+VfDzEGu6BKVdML+WdvisO3+HrDEN/uSj5EyPChT8TpnTi2dv08TU1 N+V+UI/amZSqfQfMRqRLOvXQr41+/vg= X-Google-Smtp-Source: ACHHUZ4vv89F9k4sknPMobM0Thke81Rq08GERuFcdBgdQN1ZOcmDcTPSb3q9Psbh+eKq1pl+yPBzIA== X-Received: by 2002:a81:b406:0:b0:56d:495d:d3f6 with SMTP id h6-20020a81b406000000b0056d495dd3f6mr2068901ywi.29.1686667842242; Tue, 13 Jun 2023 07:50:42 -0700 (PDT) Received: from ?IPV6:2600:1700:bd2c:b810:c117:fb09:3ceb:f601? ([2600:1700:bd2c:b810:c117:fb09:3ceb:f601]) by smtp.googlemail.com with ESMTPSA id x203-20020a8163d4000000b0055a1cd96212sm3191761ywb.33.2023.06.13.07.50.41 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 13 Jun 2023 07:50:41 -0700 (PDT) Message-ID: <089c97fd-4575-98f2-6b74-10e82ffc1b9e@gmail.com> Date: Tue, 13 Jun 2023 09:50:41 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [Beginner Question] Will the backup wal file take too much storage space? Content-Language: en-US To: pgsql-general@lists.postgresql.org References: From: Ron In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 6/13/23 06:34, Francisco Olarte wrote: [snip] > But if you want to restore to ANY point in time you would need a copy > of the initial state of the database and ALL the wal files. Normally > you do not want to do this, at most you want to restore to "any point > in the last 3 days", in which case you will need a copy of the > datafiles from 3 days ago plus all the wals from there plus change. [snip] > This is confusing. WALs are not backup per se, they are a recovery > mechanism. You do a backup of the main data files and the wal files > because you do not want to stop the world to do the backup. The COPY > of the datafiles and the wals is the backup. If you want to restore to > a very far point in a DB which has very large files it will take a lot > of space. But if you did it that way the copy of the data files will > not be in the initial ( empty ) copy of the datafiles, it will just be > in the wal copy, and it needs to be somewhere if you want to do that. PgBackRest (and presumably barman) handles all this for you.  Even compresses the WAL and data files. -- Born in Arizona, moved to Babylonia.