X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 8F19B5E4A15 for ; Sat, 4 Sep 2004 04:48:42 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 07914-02 for ; Sat, 4 Sep 2004 03:48:32 +0000 (GMT) Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by svr1.postgresql.org (Postfix) with ESMTP id 064185E50D2 for ; Sat, 4 Sep 2004 04:25:36 +0100 (BST) Received: from manage.24online (unknown [202.164.39.130]) by svr4.postgresql.org (Postfix) with ESMTP id 7B28B5B07A9 for ; Fri, 3 Sep 2004 15:40:02 +0000 (GMT) Received: from [192.168.200.2] ([172.16.0.141]) by manage.24online (8.9.3p2/8.9.3) with ESMTP id VAA05173; Fri, 3 Sep 2004 21:08:20 +0530 Subject: Re: Create Linux Script for PostgreSQL database backup From: Sanjay Arora Reply-To: skpobox@gawab.com To: Kaolin Fire Cc: pgsql-admin@postgresql.org, research_2004@yahoo.com In-Reply-To: <4136C42B.50303@tentacle.net> References: <20040901132055.17178.qmail@web61008.mail.yahoo.com> <200409020744.03552.tech@glastonburymusic.org.uk> <4136C42B.50303@tentacle.net> Content-Type: text/plain Organization: Transcontinental Impex Pvt. Ltd. Message-Id: <1094225309.3105.33.camel@Sewak.Asr.Lan> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 (1.2.2-5) Date: 03 Sep 2004 20:58:29 +0530 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=4.5 tagged_above=0.0 required=5.0 tests=RCVD_IN_BL_SPAMCOP_NET, RCVD_IN_DSBL, RCVD_IN_NJABL_PROXY X-Spam-Level: **** X-Archive-Number: 200409/35 X-Sequence-Number: 14738 On Thu, 2004-09-02 at 12:26, Kaolin Fire wrote: > > echo "1 3 * * * postgres /usr/local/bin/pg_dumpall > > ~/backup.sql" >> /etc/crontab > > note to remember the two >>'s so you don't obliterate your crontab like > I just did. > Would someone tell of a modification to this script that would: 1. create a file/directory based upon the date & time to create the backup file in. ;-) [some people are shameless about asking about pre-cooked food] 2. If a file DB has large objects..to dump it seperately...or does one have to enumerate each of the databases individually & dump them, in this case. 3. In case, databases have to be dumped seperately in the above...any script to find out existing databases, if they have lo and dump accordingly. 4. Take care that each file size does not exceed OS file limits. You must always help the shameless & the lazy....for they are Gods own people ;-) With best regards. Sanjay.