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 1lqIma-0000hr-69 for pgsql-admin@arkaria.postgresql.org; Mon, 07 Jun 2021 17:11:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lqImX-00013C-9G for pgsql-admin@arkaria.postgresql.org; Mon, 07 Jun 2021 17:11:21 +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 1lqImW-000133-Uh for pgsql-admin@lists.postgresql.org; Mon, 07 Jun 2021 17:11:21 +0000 Received: from mail-ot1-x336.google.com ([2607:f8b0:4864:20::336]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lqImQ-00028z-Oi for pgsql-admin@lists.postgresql.org; Mon, 07 Jun 2021 17:11:20 +0000 Received: by mail-ot1-x336.google.com with SMTP id j11-20020a9d738b0000b02903ea3c02ded8so3842082otk.5 for ; Mon, 07 Jun 2021 10:11:14 -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=XPDZiLqNQh/gn2FwhptXLSk9yIkqonKknDEgLO6ofho=; b=Gc4Af7wXicYpzAfgqaQM/i2uafDWi/hCSSyS5euWiy2mKjFAj6r15xtsu3SIX1PXPg WjndUWUEwZNfXSCTFW0yqBquXa/smHRv2Fy1d7LI4LOMtGpbbeRpz37QGC8xiFKodi7l 3EZJQksJWzFiqODIH+RM3pM2QswP4bEeflTB3J3PA0xxUIrWV9RcLd1yLILV2/lumBbF TFP9ZaQYkJuPTH74Yxoxh3HZR1qCgiDL8HfoCAKD+3wv8Nv9jDgchEPR2sEhVr04GzZJ USAoYRO78oN4nKt0Lm585tFm4JTjk0onYKBS4bLnUL0reCKBOS0us9GsWS/VS3EQCHnX PbJg== 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=XPDZiLqNQh/gn2FwhptXLSk9yIkqonKknDEgLO6ofho=; b=JMPYj318viuiVUulv2rokJ4BIAc/bO3MZlQoUBLvEn+LikK50SqZmEdKyIeRak0e+W +i0t7G4azpddo/y0e9h+oWcEwmXZZy4f9IGuovmEKr0eghy7aF3kbCsWfHumH44y/GJC lH8xKQty1GayWRrRMA5d1ucbfO39n7k/tZ1WB5jDxQIhkUXSW/Ahf6L177iKejJfHXvP 2mCLzXC6Ki8nFUxndt+H4FY8RtRglC5MhikhHLAmyz5OrJAgA8pCHX6BgzY5AHe/8HWW N/2KfhbvbYL6KOLIRykcjXy0uNIIpYSsmSM+hQvrlo3La307ABMzF53BNcVocSV1twCm c/ZQ== X-Gm-Message-State: AOAM532voXfq8z+KMJ/qPn3oVA0DmKgP8UkXzhPkoc/m6QKO9wO38Ing oISJIqG3jg5L041Ja6tLsJ2NfXKFVBsQAA== X-Google-Smtp-Source: ABdhPJw745x8ci30ntj9yVMtzyhPlwzVAna22NuaxcfpINthXgJL4mXhvYwMqeKhY6CquyCiYDBaXg== X-Received: by 2002:a05:6830:1254:: with SMTP id s20mr6909715otp.265.1623085872520; Mon, 07 Jun 2021 10:11:12 -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 l28sm2449793otd.66.2021.06.07.10.11.11 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 07 Jun 2021 10:11:11 -0700 (PDT) Subject: Re: Automate pg_basebackup in linux To: pgsql-admin@lists.postgresql.org References: <345839be-63ea-5a68-da74-4121cfddbf88@gmail.com> <20210607155634.GM20766@tamriel.snowman.net> From: Ron Message-ID: Date: Mon, 7 Jun 2021 12:11:10 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20210607155634.GM20766@tamriel.snowman.net> 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 6/7/21 10:56 AM, Stephen Frost wrote: > Greetings, > > * Ron (ronljohnsonjr@gmail.com) wrote: >> On 6/5/21 12:14 PM, SMAX Inbound wrote: >>> is there any script to automate pg_basebackup in linux using cron job.. >>> i.e. shell script that will automate taking basebackup weekly, and >>> removing previous backup and wal files once base backup is successfully >>> completed... >>> >> If you know any shell scripting languages, such a script is easy to write. >> (Are you saying that you don't know "shell"?) > Writing a script that actually does everything correct is actually > really hard, unfortunately. I know, I tried (and using perl too, not > just unix shell...). Leveraging pg_basebackup makes it a bit easier as That's what I meant: script to run pg_bb. -- Angular momentum makes the world go 'round.