Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t1A4m-00EzbI-CH for pgsql-general@arkaria.postgresql.org; Wed, 16 Oct 2024 19:52:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1t1A4j-009F9j-AI for pgsql-general@arkaria.postgresql.org; Wed, 16 Oct 2024 19:52:53 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t1A4i-009F9a-Io for pgsql-general@lists.postgresql.org; Wed, 16 Oct 2024 19:52:53 +0000 Received: from relay3-d.mail.gandi.net ([217.70.183.195]) by makus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t1A4f-001Ej6-E7 for pgsql-general@lists.postgresql.org; Wed, 16 Oct 2024 19:52:51 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id 753CD60004; Wed, 16 Oct 2024 19:52:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vondra.me; s=gm1; t=1729108365; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=VLlg+a13cNo35dFJYSby6MoJo2bSeKQ8rqrDfFQP5Ac=; b=pY33qf+cBQpgYlJPrpecxSDZfQMNt/SRkK+oMbVd7SYJN6rVKDW0ZmWZ6oqwQJFUt5Zc62 RkPpg4VCjAu7UcgaAup4FHyQGrztTZWfpsWEm6wEmOEJMF6Wbo4cWDyEamoVElZqU+QlJY X7lF291cpXc9rjbv9nMuv//dwuXVgDY1hQFviEXVDN3brg2X5xS1WUCCqxvtj7Vi2aNtzq 9zH3aGlnKrwAI9uYGEybvon7ybrICUAtbPwi/17LpunGnk6c4AgMQlmTaxGjbzus0djckD s85+U1UT6m6bDQ9wc12+wFULrVjPsmFDHuKuN1pPUH2UmDTecw2B8JU/Halh2A== Message-ID: Date: Wed, 16 Oct 2024 21:52:44 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Backup To: Andy Hartman , pgsql-general@lists.postgresql.org References: Content-Language: en-US From: Tomas Vondra In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-GND-Sasl: tomas@vondra.me List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 10/16/24 21:37, Andy Hartman wrote: > I am very new to Postgres and have always worked in the mssql world. I'm > looking for suggestions on DB backups. I currently have a DB used to > store Historical information that has images it's currently around 100gig.  > > I'm looking to take a monthly backup as I archive a month of data at a > time. I am looking for it to be compressed and have a machine that has > multiple cpu's and ample memory. > > Suggestions on things I can try ?   > I did a pg_dump using these parms > --format=t --blobs lobarch > > it ran my device out of storage: > > pg_dump: error: could not write to output file: No space left on device > > I have 150gig free on my backup drive... can obviously add more > > looking for the quickest and smallest backup file output... > > Thanks again for help\suggestions  > You didn't specify the Postgres version - that matters, because older pg_dump versions (before PG 16) do not support compression. Since PG 16 you can use either -Fc or -Fd (instead of the tar format), and it'll compress the output using gzip. Alternatively, you can use --compress=method:level (the supported methods depend on how the packages were built, no idea what platform you're on etc.). See https://www.postgresql.org/docs/current/app-pgdump.html If you're on older version, you should be able to write the dump to standard output, and compress that way. Something like pg_dump -Fc | gzip -c > compressed.dump.gz However, be aware that pg_dump is more an export tool than a backup suitable for large databases / quick recovery. It won't allow doing PITR and similar stuff. regards -- Tomas Vondra